aboutsummaryrefslogtreecommitdiff
path: root/Sema/SemaStmt.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-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-03-05remove the source location arguments to various target query methods.Chris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47954 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-01-29Rewriting of @synchronized. This has one FIXME in it. But this should allow ↵Fariborz Jahanian
@sychronized to be rewritten. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46533 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-29AST for @synchronized.Fariborz Jahanian
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46524 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-16Move promoteExprToType from being a static method in SemaExpr.cpp to beingChris Lattner
a method named ImpCastExprToType in Sema. Use this method to insert implicit casts for case statements from their operand type to the condition type of the switch. This fixes a crash on test/CodeGen/statements.c, reported by Eli Friedman. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46083 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-10Recover from user typo not having proper @interface decl and a bad foreach decl.Fariborz Jahanian
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45839 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-10Allow messaging expression as foreach's collection expression.Fariborz Jahanian
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45793 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-07Issue diagnostics if more than one declaration in objectove-c's foreach-stmt ↵Fariborz Jahanian
header. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45708 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-05twiks based on Chris's comment. No need to iterate thru a list of declarationsFariborz Jahanian
in a foreach-statement which is illegal (but not yet caught) . git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45615 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-04Minor refactoring of foreach's semantics code per Chris's suggetion.Fariborz Jahanian
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45604 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-04Merge all the 'assignment' diagnostic code into one routine, decloning Chris Lattner
it from several places. This merges the diagnostics, making them more uniform and fewer in number. This also simplifies and cleans up the code. Some highlights: 1. This removes a bunch of very-similar diagnostics. 2. This renames AssignmentCheckResult -> AssignConvertType 3. This merges PointerFromInt + IntFromPointer which were always treated the same. 4. This updates a bunch of test cases that have minor changes to the produced diagnostics. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45589 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-04Patch to add semantics check for ObjC2's foreacn statement.Fariborz Jahanian
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45561 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-03give better diagnostics for converting between function pointer and void*.Chris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45556 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-04Simplified setting up Method's scope before generating AST for its nody.Fariborz Jahanian
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44576 91177308-0d34-0410-b5e6-96231b3b80d8
2007-11-27Move the null pointer constant check from ↵Steve Naroff
Sema::CheckSingleInitializer/ActOnCallExpr/CheckMessageArgumentTypes/ActOnReturnStmt to Sema::CheckSingleAssignmentConstraints. This makes sure all null pointer assignments are considered compatible. Thanks to Seo Sanghyeon for the bug, follow-through, and patch! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44366 91177308-0d34-0410-b5e6-96231b3b80d8
2007-11-27Add more semantic analysis for inline asm statements.Anders Carlsson
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44349 91177308-0d34-0410-b5e6-96231b3b80d8
2007-11-25Check that the clobber registers are valid.Anders Carlsson
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44311 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-23Check asm input and output expressions.Anders Carlsson
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44289 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-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-07AST for objective-c's @throw statement and its pretty-printing.Fariborz Jahanian
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43802 91177308-0d34-0410-b5e6-96231b3b80d8
2007-11-02AST for @try statement.Fariborz Jahanian
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43640 91177308-0d34-0410-b5e6-96231b3b80d8
2007-11-02AST for @finally statement.Fariborz Jahanian
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43629 91177308-0d34-0410-b5e6-96231b3b80d8
2007-11-01AST build for @catch clause (this is work in progress).Fariborz Jahanian
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43628 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-10Emit a warning when the body of an if block is a NullStmt.Anders Carlsson
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42840 91177308-0d34-0410-b5e6-96231b3b80d8
2007-10-07move IdentifierTable.h from liblex to libbasic.Chris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42730 91177308-0d34-0410-b5e6-96231b3b80d8
2007-09-21Make case sorting deterministic by not depending on pointer Chris Lattner
values. Patch mostly by Gabor Greif for PR1682. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42203 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-16Updated VC++ build system.Hartmut Kaiser
Silenced a couple of VC++ warnings. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41994 91177308-0d34-0410-b5e6-96231b3b80d8
2007-09-13Move Decl::NextDeclarator (w/ setters/getters) down to ScopedDecl/FieldDecl.Steve Naroff
Decl is now svelte:-) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41935 91177308-0d34-0410-b5e6-96231b3b80d8
2007-09-13Phase 2 of making the Decl class more lightweight...Steve Naroff
Move Identifier/Loc instance variables (and associated getters/setters) down from Decl to ScopedDecl/FieldDecl. Objc AST's can now inherit from Decl without getting instance variables and types that are C specific. For now, I am keeping NextDeclarator, since I believe it may be useful to ObjC. If not, it can be moved later. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41934 91177308-0d34-0410-b5e6-96231b3b80d8
2007-09-06Added LabelLoc to GotoStmt to record the source location of the label tokenTed Kremenek
in the actual GotoStmt. Fixed bug where GotoStmt::getSourceRange incorrectly used the target LabelStmt to compute its extent. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41745 91177308-0d34-0410-b5e6-96231b3b80d8
2007-09-03Add a method required by the VC++ STL, patch by Hartmut Kaiser!Chris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41687 91177308-0d34-0410-b5e6-96231b3b80d8
2007-09-01Finish converting SwitchStmt AST to source ranges.Steve Naroff
Move DumpSourceRange() to DumpStmt(). Now -parse-ast-dump will display source range info for all stmts/exprs. One day we should implement the source range protocol for Decls. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41670 91177308-0d34-0410-b5e6-96231b3b80d8
2007-08-31Convert more statments over to SourceRanges...Steve Naroff
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41666 91177308-0d34-0410-b5e6-96231b3b80d8
2007-08-31Move SourceRange protocol from Expr->Stmt.Steve Naroff
Converted many of the statements over. Still a hanful left... git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41663 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-28Emit a slightly better warning for unused values for unary and binary operators:Chris Lattner
t2.c:3:18: warning: expression result unused x = ++x, ++y, y+2; ~~~~~~~~~~~~^ ~~~ git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41551 91177308-0d34-0410-b5e6-96231b3b80d8
2007-08-28now that all the infrastructure is in place, enforce C99 6.8.5p3.Chris Lattner
Note the FIXME: we need some way to mark a decl erroneous :) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41524 91177308-0d34-0410-b5e6-96231b3b80d8
2007-08-28If the condition of a for statement is promoted, make sure theChris Lattner
implicit cast gets linked back into the AST. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41523 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 a bug reported by Keith BauerChris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41452 91177308-0d34-0410-b5e6-96231b3b80d8