- Sep 28, 2008
-
-
rdar://6252231Chris Lattner authored
by decaying __builtin_va_list's type when forming builtins. On x86-64 (and other targets) __builtin_va_list is a typedef for an array. llvm-svn: 56768
-
- Sep 27, 2008
-
-
Zhongxing Xu authored
llvm-svn: 56749
-
Ted Kremenek authored
Internally store the body of a BlockExpr using a Stmt* instead of a CompoundStmt*, and use the getBody() method to do the appropriate checking. This both removes the type-punning warnings in Expr.cpp and also makes BlockExpr have more consistency checks against modifications to its body (via StmtIterator). llvm-svn: 56710
-
Ted Kremenek authored
Use a union instead of a bunch of magic casts to implement a variant. This removes the type-punning errors for DeclGroup. llvm-svn: 56708
-
Ted Kremenek authored
llvm-svn: 56706
-
- Sep 26, 2008
-
-
Ted Kremenek authored
llvm-svn: 56672
-
Ted Kremenek authored
Move VLA processing logic from LiveVariables to CFG construction. This way all dataflow analyses "see" the VLA size expressions. llvm-svn: 56655
-
Steve Naroff authored
This fixes <rdar://problem/6248392> clang: Error when using address of stack variable inside block. llvm-svn: 56652
-
Daniel Dunbar authored
llvm-svn: 56638
-
- Sep 25, 2008
-
-
Ted Kremenek authored
Documentation and testing are pending. llvm-svn: 56611
-
- Sep 24, 2008
-
-
Steve Naroff authored
This fixes <rdar://problem/6240616> clang: Assertion failed when using typedef and Blocks. llvm-svn: 56554
-
- Sep 23, 2008
-
-
Daniel Dunbar authored
for type. - PR2817 llvm-svn: 56482
-
- Sep 19, 2008
-
-
Ted Kremenek authored
Implement second part of PR 2600: NSError** parameter may be null, and should be checked before being dereferenced. llvm-svn: 56318
-
- Sep 17, 2008
-
-
Steve Naroff authored
Block literals are now represented by the concrete BlockExpr class. This is cleanup (removes a FIXME). No functionality change. llvm-svn: 56288
-
Steve Naroff authored
^(expression) or ^(int arg1, float arg2)(expression) ...is no longer supported. All block literals now require a compound statement. llvm-svn: 56257
-
- Sep 16, 2008
-
-
Ted Kremenek authored
motivated because it became clear that the number of subclasses of ProgramPoint would expand and we ran out of bits to represent a pointer variant. As a plus of this change, BlockEdge program points can now be represented explicitly without using a cache of CFGBlock* pairs in CFG. llvm-svn: 56245
-
- Sep 13, 2008
-
-
Ted Kremenek authored
"Here is a patch what replaces std::ostream with llvm::raw_ostream. This patch covers the AST library, but ignores Analysis lib." llvm-svn: 56185
-
- Sep 12, 2008
-
-
Douglas Gregor authored
Give string literals const element typesin C++, and cope with the deprecated C++ conversion from a string literal to a pointer-to-non-const-character llvm-svn: 56137
-
- Sep 11, 2008
-
-
Argyrios Kyrtzidis authored
llvm-svn: 56093
-
- Sep 10, 2008
-
-
Argyrios Kyrtzidis authored
llvm-svn: 56043
-
Argyrios Kyrtzidis authored
Add new 'CXXConditionDeclExpr' expression node used for a 'condition' declaration, e.g: "if (int x=0) {...}". It is a subclass of DeclRefExpr and the main difference is that CXXConditionDeclExpr owns the declaration that it references. llvm-svn: 56033
-
- Sep 09, 2008
-
-
Steve Naroff authored
- Replace string comparisons with pre-defined idents. - Avoid calling isBuiltinObjCType() to avoid two checks. - Remove isBuiltinObjCType(), since it was only used in Sema::MergeTypeDefDecl(). - Have Sema::MergeTypeDefDecl() set the new type. This is a moidified version of an patch by David Chisnall. llvm-svn: 55990
-
Steve Naroff authored
llvm-svn: 55989
-
- Sep 06, 2008
-
-
Steve Naroff authored
llvm-svn: 55862
-
- Sep 05, 2008
-
-
Ted Kremenek authored
Change struct forward declarations and definitions to use unique RecordDecls, as opposed to creating a single RecordDecl and reusing it. This change effects both RecordDecls and CXXRecordDecls, but does not effect EnumDecls (yet). The motivation of this patch is as follows: - Capture more source information, necessary for refactoring/rewriting clients. - Pave the way to resolve ownership issues with RecordDecls with the forthcoming addition of DeclGroups. Current caveats: - Until DeclGroups are in place, we will leak RecordDecls not explicitly referenced by the AST. For example: typedef struct { ... } x; The RecordDecl for the struct will be leaked because the TypedefDecl doesn't refer to it. This will be solved with DeclGroups. - This patch also (temporarily) breaks CodeGen. More below. High-level changes: - As before, TagType still refers to a TagDecl, but it doesn't own it. When a struct/union/class is first referenced, a RecordType and RecordDecl are created for it, and the RecordType refers to that RecordDecl. Later, if a new RecordDecl is created, the pointer to a RecordDecl in RecordType is updated to point to the RecordDecl that defines the struct/union/class. - TagDecl and RecordDecl now how a method 'getDefinition()' to return the TagDecl*/RecordDecl* that refers to the TagDecl* that defines a particular enum/struct/class/union. This is useful from going from a RecordDecl* that defines a forward declaration to the RecordDecl* that provides the actual definition. Note that this also works for EnumDecls, except that in this case there is no distinction between forward declarations and definitions (yet). - Clients should no longer assume that 'isDefinition()' returns true from a RecordDecl if the corresponding struct/union/class has been defined. isDefinition() only returns true if a particular RecordDecl is the defining Decl. Use 'getDefinition()' instead to determine if a struct has been defined. - The main changes to Sema happen in ActOnTag. To make the changes more incremental, I split off the processing of enums and structs et al into two code paths. Enums use the original code path (which is in ActOnTag) and structs use the ActOnTagStruct. Eventually the two code paths will be merged, but the idea was to preserve the original logic both for comparison and not to change the logic for both enums and structs all at once. - There is NO CHAINING of RecordDecls for the same RecordType. All RecordDecls that correspond to the same type simply have a pointer to that type. If we need to figure out what are all the RecordDecls for a given type we can build a backmap. - The diff in CXXRecordDecl.[cpp,h] is actually very small; it just mimics the changes to RecordDecl. For some reason 'svn' marks the entire file as changed. Why is CodeGen broken: - Codegen assumes that there is an equivalence between RecordDecl* and RecordType*. This was true before because we only created one RecordDecl* for a given RecordType*, but it is no longer true. I believe this shouldn't be too hard to change, but the patch was big enough as it is. I have tested this patch on both the clang test suite, and by running the static analyzer over Postgresql and a large Apple-internal project (mix of Objective-C and C). llvm-svn: 55839
-
Ted Kremenek authored
Remove "NextDecl" from RecordDecl. This change touches many files that where RecordDecl or CXXRecordDecl was constructed, always with an argument of 'NULL' for the previous declaration. The motivation behind this change is that chaining the RecordDecls is simply unnecessary. Once we create multiple RecordDecls for the same struct/union/class, clients that care about all the declarations of the same struct can build a back map by seeing which Decls refer to the same RecordType. llvm-svn: 55821
-
- Sep 04, 2008
-
-
Ted Kremenek authored
- Within for loops, 'continue' should jump to a basic block containing the increment code llvm-svn: 55800
-
Steve Naroff authored
llvm-svn: 55768
-
Steve Naroff authored
llvm-svn: 55767
-
- Sep 03, 2008
-
-
Steve Naroff authored
Highlights... - 4 new AST nodes, BlockExpr, BlockStmtExpr, BlockExprExpr, BlockDeclRefExpr. - Sema::ActOnBlockStart(), ActOnBlockError(), ActOnBlockStmtExpr(), ActOnBlockExprExpr(), ActOnBlockReturnStmt(). Next steps... - hack Sema::ActOnIdentifierExpr() to deal with block decl refs. - add attribute handler for byref decls. - add test cases. llvm-svn: 55710
-
Daniel Dunbar authored
uses which refer to methods not properties. - Not yet wired in Sema. llvm-svn: 55681
-
- Sep 02, 2008
-
-
Ted Kremenek authored
- Remove method 'isForwardDecl'; this functionality is already provided by 'isDefinition()' - Move method definitions to be co-located with other RecordDecl methods. llvm-svn: 55649
-
Ted Kremenek authored
- Don't serialize out the NextDeclarator field. It is unused and deprecated. - Serialize out the NextDecl pointer. llvm-svn: 55644
-
Ted Kremenek authored
- Added method 'isForwardDeclaration', a predicate method that returns true if a RecordDecl represents a forward declaration. - Added method 'getDefinitionDecl', a query method that returns a pointer to the RecordDecl that provides the actual definition of a struct/union. llvm-svn: 55642
-
Ted Kremenek authored
- Change constructor and create methods to accept a CXXRecordDecl* (RecordDecl*) instead of a ScopedDecl* for PrevDecl. This causes the type checking to be more tight and doesn't break any code. RecordDecl: - Don't use the NextDeclarator field in ScopedDecl to represent the previous declaration. This is a conflated use of the NextDeclarator field, which will be removed anyway when DeclGroups are fully implemented. - Instead, represent (a soon to be implemented) chain of RecordDecls using a NextDecl field. The last RecordDecl in the chain is always the 'defining' RecordDecl that owns the FieldDecls. The other RecordDecls in the chain are forward declarations. llvm-svn: 55640
-
- Sep 01, 2008
-
-
Nuno Lopes authored
llvm-svn: 55603
-
- Aug 30, 2008
-
-
Anders Carlsson authored
llvm-svn: 55572
-
Daniel Dunbar authored
- Change Obj-C runtime message API, drop the ObjCMessageExpr arg in favor of just result type and selector. Necessary so it can be reused in situations where we don't want to cons up an ObjCMessageExpr. - Update aggregate binary assignment to know about special property ref lvalues. - Add CodeGenFunction::EmitCallArg overload which takes an already emitted rvalue. Add CodeGenFunction::StoreComplexIntoAddr. Disabled logic in Sema for parsing Objective-C dot-syntax that accesses methods. This code does not search in the correct order and the AST node has no way of properly representing its results. Updated StmtDumper to print a bit more information about ObjCPropertyRefExprs. llvm-svn: 55561
-
- Aug 28, 2008
-
-
Steve Naroff authored
Parser support for blocks is almost complete...just need to add support for the __block() storage class qualifier. llvm-svn: 55495
-
Daniel Dunbar authored
with correct width. - PR2728. Also, fix PR2727 test case. llvm-svn: 55493
-