summaryrefslogtreecommitdiffstats
path: root/clang
Commit message (Collapse)AuthorAgeFilesLines
* Make sure we look through categories when searching for a classes property.Steve Naroff2008-06-042-0/+81
| | | | | | Fixes <rdar://problem/5984338> clang on xcode: property implementation must have its declaration in interface 'PBXOpenQuicklyModule' llvm-svn: 51925
* Give the "isa" slot a name!Steve Naroff2008-06-041-1/+2
| | | | llvm-svn: 51924
* Add a few more built-in functions.Steve Naroff2008-06-031-1/+4
| | | | llvm-svn: 51921
* Put back my temporary hack until Eli addresses this in a more complete fashion.Steve Naroff2008-06-032-0/+28
| | | | llvm-svn: 51920
* Implement another property related FIXME:Steve Naroff2008-06-031-1/+3
| | | | | | Fix <rdar://problem/5967199> clang on xcode: error: member reference is not to a structure or union llvm-svn: 51919
* Re-fix r51907 in a way which doesn't affect valid code. This essentially Eli Friedman2008-06-034-8/+62
| | | | | | | | | | | | | moves the check for the invalid construct to a point where it doesn't affect other uses of isIntegerConstantExpr, and we can warn properly when the extension is used. This makes it a bit more complicated, but it's a lot cleaner. Steve, please tell me if this check is sufficient to handle the relevant system header. I know it's enough to handle the testcase, but I don't know what exactly the original looks like. llvm-svn: 51918
* Fixup recent "super" regression.Steve Naroff2008-06-031-1/+1
| | | | llvm-svn: 51913
* Add a builtin. Fixes <rdar://problem/5982037> clang on xcode: error: ↵Steve Naroff2008-06-031-0/+1
| | | | | | incompatible operand types ('int' and 'char *'). llvm-svn: 51908
* Change Expr::isIntegerConstantExpr() to allow for pointer types (for GCC ↵Steve Naroff2008-06-032-0/+11
| | | | | | | | compatibility). Note FIXME. Fix <rdar://problem/5977870> clang on xcode: error: arrays with static storage duration must have constant integer length llvm-svn: 51907
* Allow implicit pointer/int conversions on ObjCQualifiedIdTypes in ↵Steve Naroff2008-06-032-10/+18
| | | | | | | | Sema::CheckCompareOperands() and Sema::CheckAssignmentConstraints(). Fixes <rdar://problem/5980804> clang on xcode: error: incompatible type sending 'id<XDUMLType>', expected 'NSCellType'. llvm-svn: 51902
* Finish up r51900.Steve Naroff2008-06-032-4/+23
| | | | llvm-svn: 51901
* Allow for a GCC cast extension.Steve Naroff2008-06-032-3/+12
| | | | | | Fixes part of <rdar://problem/5980829> clang on xcode: used type 'NSRange' where arithmetic or pointer type is required. llvm-svn: 51900
* make rewrite macros insert a space when commenting out macros where the ↵Chris Lattner2008-06-031-2/+3
| | | | | | | | token didn't lead with a space. llvm-svn: 51896
* Fix parser bug/FIXME with @catch.Steve Naroff2008-06-032-7/+48
| | | | | | <rdar://problem/5980846> clang on xcode: error: declarator requires an identifier (for @catch) llvm-svn: 51895
* Fix <rdar://problem/5979875> clang on xcode: error: use of undeclared ↵Steve Naroff2008-06-027-4/+85
| | | | | | identifier 'super' llvm-svn: 51888
* Use the correct 'ccc-analyzer' when the build command is a direct invocation ↵Ted Kremenek2008-06-021-2/+3
| | | | | | of gcc. llvm-svn: 51883
* handle the full assignment-expression grammar when using an Chris Lattner2008-06-024-5/+34
| | | | | | objc message send in an initializer expression. llvm-svn: 51882
* Fix <rdar://problem/5976164> clang ObjC rewriter: for ... in enumeration ↵Steve Naroff2008-06-021-0/+1
| | | | | | inserts undeclared function (objc_enumerationMutation should be in preamble) llvm-svn: 51880
* Teach the CF retain checker about "_init" methods. Fixes: ↵Ted Kremenek2008-06-022-10/+21
| | | | | | <rdar://problem/5956379> llvm-svn: 51872
* Use "file_language" for per-language -x options.Ted Kremenek2008-06-021-2/+2
| | | | llvm-svn: 51871
* fix decl attributes cleaningNuno Lopes2008-06-014-9/+32
| | | | | | this plugs the leak of attributes and also fixes a crash in the test llvm-svn: 51862
* Include <string> header to allow compiling for MSVC.Argyrios Kyrtzidis2008-06-011-0/+1
| | | | llvm-svn: 51847
* fix PR2357 (#ifs didnt invalidate the multiple-inclusion optimization state)Nuno Lopes2008-06-012-9/+37
| | | | llvm-svn: 51843
* Don't name the ObjC types if there aren't any ObjC objects in the file. Eli Friedman2008-06-011-4/+6
| | | | | | Patch by David Chisnall. llvm-svn: 51840
* First cut at setting attributes for functions and calls; this puts us Eli Friedman2008-06-014-34/+90
| | | | | | | | | | | | | | | much closer to passing the gcc struct layout tests. It might be possible to refactor this a bit, but I'm not sure there's actually enough common code for that to be useful. To get the calling convention completely correct, a bit of platform-specific code is necessary even for x86-Linux. On x86-Linux, the alignment of function parameters is extremely strange; as far as I can tell, it's always 4 except for SSE vectors or structs containing SSE vectors. I'm continuing to investigate this. llvm-svn: 51839
* Make sure _Bool globals have the correct type.Eli Friedman2008-06-012-3/+12
| | | | llvm-svn: 51838
* Minor cleanup to use the ConvertTypeForMem helper.Eli Friedman2008-06-011-5/+3
| | | | llvm-svn: 51837
* Remove spurious == 0Anton Korobeynikov2008-06-011-1/+1
| | | | llvm-svn: 51836
* Support for code generation of Objective-C top-level language constructs.Anton Korobeynikov2008-06-018-44/+1027
| | | | | | Implemented by David Chisnall! llvm-svn: 51835
* Tweak Sema::ObjCQualifiedIdTypesAreCompatible() to handle qualified ↵Steve Naroff2008-06-012-5/+64
| | | | | | | | | | interface types on the RHS. This eliminates a bogus warning identified in the test below. This fixes <rdar://problem/5968256> clang on xcode: error: incompatible type initializing 'NSObject<XCSelectionSource> *', expected 'id<NSObject,XCSelectionSource>' llvm-svn: 51832
* Add some more test cases that demonstrate clang is a bit stricter than GCC. ↵Steve Naroff2008-05-311-0/+23
| | | | | | These can be fixed lazily if they become a problem. llvm-svn: 51830
* Teach Sema::CheckConditionalOperands() to check for ObjCQualifiedIdType's. ↵Steve Naroff2008-05-312-1/+28
| | | | | | | | This fixes a bogus error. <rdar://problem/5967036> clang on xcode: error: incompatible operand types ('id<DTOutputStreams>' and 'DTFilterOutputStream *') llvm-svn: 51828
* Two identifiers are not the same unless they have the same identifier info.Chris Lattner2008-05-311-1/+7
| | | | llvm-svn: 51827
* Calculate alignment for local variables.Eli Friedman2008-05-312-2/+14
| | | | llvm-svn: 51826
* Added "InitializeTU" to ASTConsumer. This is used by Sema::ParseAST to pass aTed Kremenek2008-05-315-5/+19
| | | | | | | | | | | TranslationUnit object instead of an ASTContext. By default it calls Initialize(ASTConstext& Context) (to match with the current interface used by most ASTConsumers). Modified the ObjC-Rewriter to use InitializeTU, and to tell the TranslationUnit to not free its Decls. This is a workaround for: <rdar://problem/5966749> llvm-svn: 51825
* Fix <rdar://problem/5917992> clang ObjC rewriter: #end from #if statement ↵Steve Naroff2008-05-311-3/+60
| | | | | | | | lost in translation. Some fancy footwork to accommodate embedded preprocessor directives within an interface. llvm-svn: 51815
* Fix <rdar://problem/5969777> clang ObjC rewriter: #imported file name ↵Steve Naroff2008-05-311-4/+1
| | | | | | | | | mysteriously commented out This fix involved tightening up needToScanForQualifiers(), which predated ObjCQualifiedIdType. It also includes a minor tweak to the code that searches for the beginning of the qualified type. If the AST contained the correct beginning of the declaration (i.e. the beginning of the declaration specifiers), this code would be more robust. Since it doesn't, we apply an adhoc heuristic. Note that DeclSpec contains this info...we just don't propagate it to the AST (at present). llvm-svn: 51812
* Hack RewriteObjC::RewriteObjCStringLiteral() to include the filename in the ↵Steve Naroff2008-05-311-0/+11
| | | | | | generated code (replacing any non-alphanumeric characters with "_"). This allows header files to contain ObjCStringLiterals. llvm-svn: 51811
* Fix <rdar://problem/5965704> clang: bad receiver type 'id const'Steve Naroff2008-05-312-2/+11
| | | | llvm-svn: 51809
* Correctly preserve the order between -F and -I options.Ted Kremenek2008-05-311-6/+16
| | | | llvm-svn: 51803
* Teach Expr::isLvalue() about ObjC properties. For now, all properties are ↵Steve Naroff2008-05-302-0/+71
| | | | | | writable. Added a FIXME for another day. llvm-svn: 51800
* PR1893: Fix up the type of tentative definitions of incomplete array Eli Friedman2008-05-302-2/+26
| | | | | | types so that they end up the correct size. llvm-svn: 51787
* Fix and enable generating general union initializers. Essentially, what Eli Friedman2008-05-302-9/+57
| | | | | | | | | | | | this does is reconstruct the type for structs and arrays if the type wouldn't be compatible otherwise. The assertion about packing in the struct type reconstruction code sucks, but I don't see any obvious way to fix it. Maybe we need a general utility method to take a list of types and alignments and try to construct an unpacked type if possible? llvm-svn: 51785
* Allow the type of a global to be different from the type of its Eli Friedman2008-05-301-69/+62
| | | | | | | | | | | | | | | | | associated declaration. This is a prerequisite to handling general union initializations; for example, an array of unions involving pointers has to be turned into a struct because the elements can have incompatible types. I refactored the code a bit to make it more readable; now, the logic for definitions is all in EmitGlobalVarInit. The second parameter for GetAddrOfGlobalVar is now dead; I'll remove it separately. By itself, this patch should not cause any visible changes. llvm-svn: 51783
* Allow a pointer implicitly cast to a bool as a constant expression, as Eli Friedman2008-05-302-17/+38
| | | | | | | | | | required by the standard (the standard doesn't know anything about implicit casts). Disallow pointers cast to non-integral arithmetic types as constant expressions. This was previously allowed by accident. llvm-svn: 51779
* Make sure to allow assigning a pointer to a bool.Eli Friedman2008-05-302-11/+22
| | | | llvm-svn: 51778
* Use llvm::cl::desc for description of the -Wimplicit-function-declaration ↵Ted Kremenek2008-05-301-2/+2
| | | | | | | | option. Patch by Holger Schurig! llvm-svn: 51774
* Fix some strict-aliasing warnings by using Stmt* instead of Expr* in ↵Ted Kremenek2008-05-303-16/+20
| | | | | | VariableArrayType, EnumConstantDecl, and VarDecl. llvm-svn: 51772
* Fix constant vector init for initializer lists with an incomplete list Eli Friedman2008-05-302-6/+13
| | | | | | of elements. llvm-svn: 51769
* Fix crash with -serialize (reported to cfe-dev). The issue was Eli Friedman2008-05-301-0/+1
| | | | | | | | | essentially that we were destroying the declarations twice. (Note that we don't use -serialize directly in the testsuite, only SerializeTest.) llvm-svn: 51768
OpenPOWER on IntegriCloud