- Sep 11, 2008
-
-
Argyrios Kyrtzidis authored
llvm-svn: 56096
-
Argyrios Kyrtzidis authored
llvm-svn: 56094
-
Daniel Dunbar authored
(1) Additional arguments to variadic methods should have default promotions applied. (2) Additional arguments to non-variadic methods were allowed. llvm-svn: 56084
-
Daniel Dunbar authored
no method declaration was found. - This was allowing arrays to pass "by value" among other things. Add assert in CodeGen that arguments cannot have array type. llvm-svn: 56080
-
Daniel Dunbar authored
CheckMessageArgumentTypes. - No functionality change. llvm-svn: 56079
-
- Sep 10, 2008
-
-
Steve Naroff authored
llvm-svn: 56064
-
Steve Naroff authored
llvm-svn: 56063
-
Argyrios Kyrtzidis authored
Implement Sema support for the 'condition' part of C++ selection-statements and iteration-statements (if/switch/while/for). llvm-svn: 56044
-
Argyrios Kyrtzidis authored
llvm-svn: 56042
-
- Sep 09, 2008
-
-
Argyrios Kyrtzidis authored
Make IdentifierResolver::isDeclInScope regard declarations of a parent 'control' scope as part of the current scope. The 'control' scope is the 'condition' scope of if/switch/while statements and the scope that contains the for-init-statement and 'condition' of a for statement. e.g: if (int x = 0 /*'control' scope*/) { // x will be regarded as part of this substatement scope. } else { // and as part of this substatement scope too. } llvm-svn: 56020
-
Argyrios Kyrtzidis authored
Make Sema pass the LangOptions to IdentifierResolver's constructor. llvm-svn: 56015
-
Argyrios Kyrtzidis authored
No functionality change. llvm-svn: 56014
-
Argyrios Kyrtzidis authored
llvm-svn: 56002
-
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
-
- Sep 08, 2008
-
-
Daniel Dunbar authored
- Patch from Kevin Tew. llvm-svn: 55940
-
- Sep 07, 2008
-
-
Nico Weber authored
llvm-svn: 55887
-
- Sep 06, 2008
-
-
Steve Naroff authored
llvm-svn: 55862
-
- Sep 05, 2008
-
-
Ted Kremenek authored
Add comment back that Argiris pointed out that I mistakenly removed (the comments below it were stale, so I accidently removed the whole thing). llvm-svn: 55841
-
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
llvm-svn: 55822
-
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
-
-
Daniel Dunbar authored
which are inherited from base clases or protocols. llvm-svn: 55790
-
Steve Naroff authored
Added a couple FIXME's wrt PointLikeType. If the author reads this, it would be great to get some background on this class (thanks in advance). llvm-svn: 55778
-
Steve Naroff authored
llvm-svn: 55768
-
Steve Naroff authored
llvm-svn: 55767
-
Mon P Wang authored
spaces llvm-svn: 55765
-
- Sep 03, 2008
-
-
Daniel Dunbar authored
- PR2730 llvm-svn: 55739
-
Daniel Dunbar authored
- Currently CodeGen always returns a conservative value for this (-1 or 0 depending on the context). llvm-svn: 55735
-
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
-
Ted Kremenek authored
llvm-svn: 55707
-
Daniel Dunbar authored
- Allow any Objective-C object types to devolve to type id in a ?: expression. This matches gcc behavior more closely. llvm-svn: 55705
-
Daniel Dunbar authored
- Now also searches for correct setter method. - There are still some issues regarding validation of the setter method and access of read-only properties. llvm-svn: 55686
-
- Sep 02, 2008
-
-
Ted Kremenek authored
When creating CXXRecordDecls and RecordDecls within ActOnTag, hook up the new [CXX]RecordDecl with the RecordDecl chain. llvm-svn: 55652
-
Eli Friedman authored
offset-of-like expressions. llvm-svn: 55627
-
Eli Friedman authored
anywhere near correct in terms of missing cases and missing diagnostics, but it's good enough to handle the uses in the Linux system headers, which are currently a constant pain for compiling applications on Linux. llvm-svn: 55621
-
Eli Friedman authored
type-checking pointer subtraction; if the canonical types aren't used, the qualifiers won't always get stripped off correctly. llvm-svn: 55620
-
Eli Friedman authored
I'll try to come up with a correct fix for the testcase sometime soon. llvm-svn: 55614
-
- Sep 01, 2008
-
-
Ted Kremenek authored
- warn about nonnull being applied to functions with no pointer arguments - continue processing argument list in the attribute when we encounter a non-pointer parameter being marked as nonnull - when no argument list is specified, only mark pointers as nonnull. This fixes PR 2732 and radar 6188814. llvm-svn: 55610
-
Nuno Lopes authored
llvm-svn: 55609
-
Nuno Lopes authored
llvm-svn: 55607
-