aboutsummaryrefslogtreecommitdiff
path: root/Parse/ParseStmt.cpp
AgeCommit message (Collapse)Author
2008-03-15Make a major restructuring of the clang tree: introduce a top-levelChris Lattner
lib dir and move all the libraries into it. This follows the main llvm tree, and allows the libraries to be built in parallel. The top level now enforces that all the libs are built before Driver, but we don't care what order the libs are built in. This speeds up parallel builds, particularly incremental ones. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48402 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-13handle __extension__ properly at block scope.Chris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48332 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-13instead of passing in null end location info, pass in the same as start.Chris Lattner
This still isn't right, but is slightly nicer. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48331 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-13improve DeclStmt to be able to store SourceRange info correctly.Chris Lattner
Set the start of DeclStmt range. Right now the end is meaningless though. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48330 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-11Several cleanups surrounding Parser::ParseAsmStatement() and ↵Steve Naroff
Parser::FuzzyParseMicrosoftAsmStatement(). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46977 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-09Behave correctly if a constraint expression is invalid.Anders Carlsson
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46910 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-08Use getLogicalLineNumber() in FuzzyParseMicrosoftAsmStatement(), it's more ↵Steve Naroff
general and simplifies the code. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46885 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-08Support fuzzy parsing MS line-oriented __asm's that originate from a macro ↵Steve Naroff
(a case where we can't obtain source line info). As the test case indicates, we don't currently support line-oriented asm statements that mix file/macro body tokens. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46878 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-07- Add support for fuzzy parsing line-oriented __asm's (yuck).Steve Naroff
- Change handling of __w64 to a built-in macro. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46864 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-07Implement -fms-extensions. This allows us to fuzzy parse non-standard MS ↵Steve Naroff
constructs used in "windows.h". git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46838 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-05Handle simple asm statements correctly.Anders Carlsson
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46777 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-05Fix Parser::ParseObjCTryStmt() to allow for trailing @-keyword ↵Steve Naroff
statements/expressions. This bug fix is the result of not having 2-token lookahead to recognize specific @-keywords. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46768 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-31Fix http://llvm.org/bugs/show_bug.cgi?id=1967.Steve Naroff
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46616 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-29Bunch of type defs, etc. for @synchronized.Fariborz Jahanian
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46520 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-07Substituted all instances of the string "Objc" for "ObjC". This fixesTed Kremenek
some naming inconsistencies in the names of classes pertaining to Objective-C support in clang. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45715 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-04Added a comment, minor refactoring of foreach parsing code per Chris's ↵Fariborz Jahanian
suggestion. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45601 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-04Minor changes as suggested by Chris L.Fariborz Jahanian
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45598 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-03Patch to parse/build AST ObjC2's foreach statement.Fariborz Jahanian
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45539 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-29Don't attribute in file headers anymore. See llvmdev for theChris Lattner
discussion of this change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45410 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-27Fix a crash on a top-level objc string, patch by Nico WeberChris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45370 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-12remove todoChris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44922 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-01Test commitSeo Sanghyeon
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44488 91177308-0d34-0410-b5e6-96231b3b80d8
2007-11-23Keep track of whether the asm is volatile or not.Anders Carlsson
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44297 91177308-0d34-0410-b5e6-96231b3b80d8
2007-11-22Store output and input operands as well as clobber information in the ↵Anders Carlsson
AsmStmt. Ted, could you please review the serialization/deserialization code? git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44266 91177308-0d34-0410-b5e6-96231b3b80d8
2007-11-21GCC fails if there is a trailing colon but no clobbers.Anders Carlsson
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44265 91177308-0d34-0410-b5e6-96231b3b80d8
2007-11-20Store inline asm code in the AST.Anders Carlsson
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44255 91177308-0d34-0410-b5e6-96231b3b80d8
2007-11-11Replace 2 method definition actions (ActOnFunctionDefBody, ↵Steve Naroff
ActOnMethodDefBody) with 1 method definition action (ActOnFinishFunctionBody). I can't think of any reason that we would need two action hooks. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44000 91177308-0d34-0410-b5e6-96231b3b80d8
2007-11-08Refactored parsing of main function body for reuse by objective-c methods.Fariborz Jahanian
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43898 91177308-0d34-0410-b5e6-96231b3b80d8
2007-10-30More support for rewriting ObjC intefaces. Still some edge cases to handle...Steve Naroff
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43493 91177308-0d34-0410-b5e6-96231b3b80d8
2007-10-29improve error recovery handling broken 'then' or 'else' stmts in Chris Lattner
if statements. This implements Sema/if-empty-body.c:f3, silencing a bogus secondary warning. It also improve the location info for the nullstmts created for recovery purposes. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43440 91177308-0d34-0410-b5e6-96231b3b80d8
2007-10-29Fix a parser bug on labeled inline asm stmts, allowing usChris Lattner
to parse stuff like: asm volatile("1: rex64/fxrstor (%[fx])\n\t" "2:\n" ".section .fixup,\"ax\"\n" "3: movl $-1,%[err]\n" " jmp 2b\n" ".previous\n" ".section __ex_table,\"a\"\n" " .align 8\n" " .quad 1b,3b\n" ".previous" : [err] "=r" (err) : [fx] "cdaSDb" (fx), "m" (*fx), "0" (0)); This reduces # diagnostics on PR1750 from 49 to 37. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43434 91177308-0d34-0410-b5e6-96231b3b80d8
2007-10-29Implement *skeletal* support for representing GNU inline asm stmts in the AST,Chris Lattner
resolving a crash on a .i file in PR1750. We now generate 49 errors on the .i file in that bug. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43433 91177308-0d34-0410-b5e6-96231b3b80d8
2007-10-11Implemented parsing of objctive-c protocol conforming type used in Fariborz Jahanian
an identifier statement. Fixed up pretty priting to print this type correctly. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42866 91177308-0d34-0410-b5e6-96231b3b80d8
2007-10-09switch more code to use Token::is/isNot where possible.Chris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42797 91177308-0d34-0410-b5e6-96231b3b80d8
2007-10-04this patch accomodates clattner's comments on expression processing in ↵Fariborz Jahanian
@try-statement. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42611 91177308-0d34-0410-b5e6-96231b3b80d8
2007-09-19Patch to parse objective-c's @try-statement and @throw-statement.Fariborz Jahanian
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42148 91177308-0d34-0410-b5e6-96231b3b80d8
2007-09-16Rename statement actions (from Parse-prefix to ActOn-prefix).Steve Naroff
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42000 91177308-0d34-0410-b5e6-96231b3b80d8
2007-09-16Rename expression actions (from Parse-prefix to ActOn-prefix).Steve Naroff
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41997 91177308-0d34-0410-b5e6-96231b3b80d8
2007-08-31Fix a bug/missing-feature Ted noticed: the 'unused' warning should notChris Lattner
warn about the last stmt in a stmtexpr, f.e. there should be no warning for: int maxval_stmt_expr(int x, int y) { return ({int _a = x, _b = y; _a > _b ? _a : _b; }); } git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41655 91177308-0d34-0410-b5e6-96231b3b80d8
2007-08-27extwarn about decls intermixed with code in c89 mode.Chris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41477 91177308-0d34-0410-b5e6-96231b3b80d8
2007-08-27implement a fixme: __extension__ marker on decls in compound stmts.Chris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41473 91177308-0d34-0410-b5e6-96231b3b80d8
2007-08-26Fix test/Parser/if-scope-*.c. Patch by Neil Booth!Chris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41471 91177308-0d34-0410-b5e6-96231b3b80d8
2007-08-26Break the assumption that any sort of scope (e.g. a loop scope) can Chris Lattner
hold declarations. Instead, introduce a new "DeclScope" scope type that holds them explicitly. For now, all scopes have this bit, but in the future we can use them to fix some issues Neil noticed. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41431 91177308-0d34-0410-b5e6-96231b3b80d8
2007-08-22optimize scope push/pop to avoid work in the common case.Chris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41265 91177308-0d34-0410-b5e6-96231b3b80d8
2007-08-22Fix the scoping issue Neil pointed out for the rest ofChris Lattner
the selection statements and iteration statements. Add spec citations. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41264 91177308-0d34-0410-b5e6-96231b3b80d8
2007-08-22Fix a nasty C99 scope issue that Neil pointed out (for ifs)Chris Lattner
This fixes test/Parser/control-scope.c git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41263 91177308-0d34-0410-b5e6-96231b3b80d8
2007-07-22Refactor switch analysis to make it possible to detect duplicate case valuesAnders Carlsson
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@40388 91177308-0d34-0410-b5e6-96231b3b80d8
2007-07-22Catch goto's with a missing identifier, patch by Neil Booth.Chris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@40381 91177308-0d34-0410-b5e6-96231b3b80d8
2007-07-20At one point there were going to be lexer and parser tokens.Chris Lattner
Since that point is now long gone, we should rename LexerToken to Token, as it is the only kind of token we have. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@40105 91177308-0d34-0410-b5e6-96231b3b80d8
2007-07-18Add initial switch stmt support, patch by Anders Carlsson!Chris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@39989 91177308-0d34-0410-b5e6-96231b3b80d8