- Sep 30, 2008
-
-
rdar://problem/6191148Steve Naroff authored
Fix <rdar://problem/6191148> [sema] Objective-C method lookup (at global scope) fails to handle overloaded selectors properly. Long standing bug in Sema::ActOnInstanceMessage(). We now warn when messaging an "id" with multiple method signatures in scope. The diags are a little verbose, however they can be streamlined if necessary. llvm-svn: 56843
-
- Sep 28, 2008
-
-
rdar://problem/6252129Steve Naroff authored
Fix <rdar://problem/6252129> implementation of method in category doesn't effectively declare it for methods below. llvm-svn: 56771
-
- Sep 26, 2008
-
-
Daniel Dunbar authored
llvm-svn: 56642
-
- Sep 23, 2008
-
-
Daniel Dunbar authored
- readonly and readwrite are mutually exclusive. - assign, copy, and retain are mutually exclusive. - copy and retain are invalid on non-object types. - Warn about using default 'assign' property on object types (attempting to follow gcc behavior). llvm-svn: 56507
-
- Sep 22, 2008
-
-
Steve Naroff authored
llvm-svn: 56438
-
- Sep 17, 2008
-
-
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 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
-
-
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
CheckMessageArgumentTypes. - No functionality change. llvm-svn: 56079
-
- Sep 10, 2008
-
-
Argyrios Kyrtzidis authored
Implement Sema support for the 'condition' part of C++ selection-statements and iteration-statements (if/switch/while/for). llvm-svn: 56044
-
- Sep 09, 2008
-
-
Argyrios Kyrtzidis authored
No functionality change. llvm-svn: 56014
-
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 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
-
- Sep 04, 2008
-
-
Daniel Dunbar authored
which are inherited from base clases or protocols. llvm-svn: 55790
-
Steve Naroff authored
llvm-svn: 55768
-
Steve Naroff authored
llvm-svn: 55767
-
- Sep 03, 2008
-
-
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
-
- Aug 26, 2008
-
-
Daniel Dunbar authored
- Add ObjCMethodDecl::createImplicitParams. - Remove ObjCMethodDecl::set{Self,Cmd}Decl - Remove Sema::CreateImplicitParameter No (intended) functionality change. llvm-svn: 55356
-
- Aug 24, 2008
-
-
Argyrios Kyrtzidis authored
llvm-svn: 55284
-
- Aug 23, 2008
-
-
Chris Lattner authored
llvm-svn: 55222
-
Chris Lattner authored
llvm-svn: 55216
-
- Aug 22, 2008
-
-
Argyrios Kyrtzidis authored
-The Parser calls a new "ActOnCXXTypeConstructExpr" action. -Sema, depending on the type and expressions number: -If the type is a class, it will treat it as a class constructor. [TODO] -If there's only one expression (i.e. "int(0.5)" ), creates a new "CXXFunctionalCastExpr" Expr node -If there are no expressions (i.e "int()" ), creates a new "CXXZeroInitValueExpr" Expr node. llvm-svn: 55177
-
- Aug 20, 2008
-
-
Daniel Dunbar authored
- UsualUnaryConversions takes an Expr *& and may modify its argument, this broke when it was refactored into Sema::CheckCastTypes. This meant that we were missing implicit casts in some places. - Seems pretty sad that this got through our tests. llvm-svn: 55039
-
- Aug 16, 2008
-
-
Argyrios Kyrtzidis authored
Move the type checking that Sema::ActOnCastExpr does into a new Sema::CheckCastTypes function so that it can be reused. llvm-svn: 54852
-
- Aug 15, 2008
-
-
Daniel Dunbar authored
- Added as private members for each because it is not clear where to put the common definition. Perhaps the IdentifierInfos all of these "pseudo-keywords" should be collected into one place (this would KnownFunctionIDs and Objective-C property IDs, for example). Remove Token::isNamedIdentifier. - There isn't a good reason to use strcmp when we have interned strings, and there isn't a good reason to encourage clients to do so. llvm-svn: 54794
-
- Aug 11, 2008
-
-
Daniel Dunbar authored
- Drop {Decl.h,DeclObjC.h,IdentifierTable.h} from Expr.h - Moved Sema::getCurMethodDecl() out of line (dependent on ObjCMethodDecl via dyn_cast). llvm-svn: 54629
-
Daniel Dunbar authored
- Drop TokenKinds.h from Action.h - Move DeclSpec.h from Sema.h into individual Sema .cpp files llvm-svn: 54625
-
- Aug 10, 2008
-
-
Steve Naroff authored
Cleanup from yesterday...make isTentativeDefinition() a static helper function (no need for it to be part of the Sema API). llvm-svn: 54613
-
Chris Lattner authored
llvm-svn: 54605
-
- Aug 09, 2008
-
-
Argyrios Kyrtzidis authored
Passing right brace location to ActOnFinishCXXClassDef is redundant, since it gets passed to ActOnFinishCXXMemberSpecification too. llvm-svn: 54567
-
- Aug 08, 2008
-
-
Steve Naroff authored
- Move checking from MergeVarDecl->FinializeDeclaratorGroup. Since MergeVarDecl is called before the initializer is attacted, it can't be done there (this removes a long standing FIXME). - Add Sema::isTentativeDefinition() and Sema::CheckForFileScopedRedefinitions(). - Remove FIXME's and touch-up test case. Still some more work to do (forthcoming)... llvm-svn: 54533
-
- Aug 05, 2008
-
-
Daniel Dunbar authored
ActOnDeclarator. llvm-svn: 54353
-
Daniel Dunbar authored
- ActOnDeclarator now takes an additional parameter which is the AsmLabel if used. Its unfortunate that this bubbles up this high, but we cannot just lump it in as an attribute without mistakenly *accepting* it as an attribute. - The actual asm-label itself is, however, encoded as an AsmLabelAttr on the FunctionDecl. - Slightly improved parser error recovery on malformed asm-labels. - CodeGen support still missing... llvm-svn: 54339
-
- Aug 01, 2008
-
-
Argyrios Kyrtzidis authored
No functionality change. llvm-svn: 54265
-
- Jul 26, 2008
-
-
Chris Lattner authored
last client of the old ParseObjCProtocolReferences, so it also removes it. llvm-svn: 54094
-
Chris Lattner authored
llvm-svn: 54093
-
Chris Lattner authored
This temporarily duplicates ParseObjCProtocolReferences, but it will be removed in the future. llvm-svn: 54092
-
Chris Lattner authored
llvm-svn: 54091
-
- Jul 25, 2008
-
-
Chris Lattner authored
llvm-svn: 54066
-