summaryrefslogtreecommitdiffstats
path: root/clang/lib
Commit message (Collapse)AuthorAgeFilesLines
* Parse deleted member functions. Parsing member declarations goes through a ↵Sebastian Redl2009-04-126-47/+140
| | | | | | | | | different code path that I forgot previously. Implement the rvalue reference overload dance for returning local objects. Returning a local object first tries to find a move constructor now. The error message when no move constructor is defined (or is not applicable) and the copy constructor is deleted is quite ugly, though. llvm-svn: 68902
* Fix rdar://6770142 - Class and qualified id's are compatible, just likeChris Lattner2009-04-122-4/+7
| | | | | | Class and unqualified id's are. llvm-svn: 68899
* Fix rdar://6771034: don't warn on use of forward declared protocol in protocolChris Lattner2009-04-122-2/+2
| | | | | | | list of another protocol definition. This warning is very noisy and GCC doesn't produce it so existing code doesn't expect it. llvm-svn: 68894
* implement rdar://6780761, making sema reject some code that otherwiseChris Lattner2009-04-124-19/+30
| | | | | | crashes codegen. llvm-svn: 68891
* Implement support for GCC's -dD mode, which dumps -E output *and*Chris Lattner2009-04-121-0/+1
| | | | | | macro definitions. llvm-svn: 68884
* add a ppcallback hook for macro definitions.Chris Lattner2009-04-121-0/+4
| | | | llvm-svn: 68883
* now that we have an identifier table in the PCH file, finish hooking upChris Lattner2009-04-112-49/+43
| | | | | | | macro deserialization. We now correctly install II's in tokens, handle function-like macros, etc. llvm-svn: 68882
* improve location info for property stuff. In a property like this:Chris Lattner2009-04-111-11/+10
| | | | | | | | | | | @property int x; associate the location of X with the property decl, not the location of the @. Also, pass this info along to the synthesized ParmVarDecls so that redefinition and other diagnostics can use it. This eliminates a fixme. llvm-svn: 68880
* improve the 'conflicting types' diagnostics to include correct location ↵Chris Lattner2009-04-111-16/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | info, now that it is plumbed through Sema. On a file from growl, we used to emit: t.mi:107059:1: warning: conflicting types for 'removePluginHandler:forPluginTypes:' - (void) removePluginHandler:(id <GrowlPluginHandler>)handler forPluginTypes:(NSSet *)extensions { ^ t.mi:105280:1: note: previous definition is here - (void) removePluginHandler:(id <NSObject>)handler forPluginTypes:(NSSet *)types; ^ now we produce: t.mi:107059:55: warning: conflicting parameter types in implementation of 'removePluginHandler:forPluginTypes:': 'id<NSObject>' vs 'id<GrowlPluginHandler>' - (void) removePluginHandler:(id <GrowlPluginHandler>)handler forPluginTypes:(NSSet *)extensions { ^ t.mi:105280:45: note: previous definition is here - (void) removePluginHandler:(id <NSObject>)handler forPluginTypes:(NSSet *)types; ^ We still don't have proper loc info for properties, hence the FIXME. rdar://6782494 llvm-svn: 68879
* Set proper location info on objc method arguments.Chris Lattner2009-04-111-5/+3
| | | | llvm-svn: 68877
* simplify code to use adjustParameterType, apply objc arg attributesChris Lattner2009-04-112-19/+19
| | | | | | to their arguments. llvm-svn: 68876
* fix blocks to reject objc interfaces returned by value. Also,Chris Lattner2009-04-111-11/+22
| | | | | | | a block without a prototype should still coerce a return in it to use the declared return type. llvm-svn: 68875
* diagnose attempts to return objc interfaces by-value from C functions.Chris Lattner2009-04-111-1/+9
| | | | llvm-svn: 68873
* Improve the 'cannot pass objc interface by value' diagnostic:Chris Lattner2009-04-112-20/+19
| | | | | | | | | | | | | | | | | | 1) improve localizability by not passing english strings in. 2) improve location for arguments. 3) print the objc type being passed. Before: method-bad-param.m:15:1: error: Objective-C type cannot be passed by value -(void) my_method:(foo) my_param ^ after: method-bad-param.m:15:25: error: Objective-C interface type 'foo' cannot be passed by value -(void) my_method:(foo) my_param ^ llvm-svn: 68872
* change the interface to ActOnMethodDeclaration to pass down argumentChris Lattner2009-04-113-29/+32
| | | | | | | information in a little struct instead of individually. While we're at it, add per-argument loc info and attribute info. llvm-svn: 68871
* Minor refactoring of my last patch.Fariborz Jahanian2009-04-111-2/+2
| | | | llvm-svn: 68870
* sink abstract typedefs like Action::ExprTy from the Action classChris Lattner2009-04-111-3/+4
| | | | | | | | | | | down to the ActionBase class. This eliminates dependencies of (e.g.) DeclSpec.h on Action.h, meaning that action.h can now include these headers and use their types directly in the actions interfaces. This is a refactoring to support a future change, no functionality change. llvm-svn: 68869
* add some #includes for better compatibility with gcc 4.4,Chris Lattner2009-04-111-1/+1
| | | | | | thanks to Tobias Stadler for pointing this out. llvm-svn: 68868
* rename Parser::ParseObjCSelector -> Parser::ParseObjCSelectorPiece,Chris Lattner2009-04-111-7/+7
| | | | | | | since it only parses one identifier out of the selector, not the whole thing. llvm-svn: 68867
* simplify this code to not bother stripping to canonical types, andChris Lattner2009-04-111-15/+12
| | | | | | indent code properly llvm-svn: 68866
* Fixes a ir-gen crash for K&R style blocks.Fariborz Jahanian2009-04-111-5/+16
| | | | llvm-svn: 68865
* Don't mangle variables that are at translation unit scope.Anders Carlsson2009-04-111-1/+2
| | | | llvm-svn: 68853
* Add support for generating reference initialization code.Anders Carlsson2009-04-111-2/+21
| | | | llvm-svn: 68852
* Add analyzer support for objc_atomicCompareAndSwap()Ted Kremenek2009-04-111-2/+3
| | | | llvm-svn: 68849
* Store unique IDs for identifiers in the PCH file. Use some bitmanglingDouglas Gregor2009-04-112-13/+98
| | | | | | | so that we only need to perform the lookup and identifier resolution once per identifier in the PCH file. llvm-svn: 68846
* Implement analyzer support for OSCompareAndSwap. This required pushing "tagged"Ted Kremenek2009-04-115-24/+237
| | | | | | | | | ProgramPoints all the way through to GRCoreEngine. NSString.m now fails with RegionStoreManager because of the void** cast. Disabling use of region store for that test for now. llvm-svn: 68845
* Non-pointer objects are none gc'able regardles ofFariborz Jahanian2009-04-111-0/+4
| | | | | | the attribute set on them. llvm-svn: 68844
* Compare the predefines buffer in the PCH file with the predefinesDouglas Gregor2009-04-104-54/+137
| | | | | | | | | | | | | | | buffer generated for the current translation unit. If they are different, complain and then ignore the PCH file. This effectively checks for all compilation options that somehow would affect preprocessor state (-D, -U, -include, the dreaded -imacros, etc.). When we do accept the PCH file, throw away the contents of the predefines buffer rather than parsing them, since all of the results of that parsing are already stored in the PCH file. This eliminates the ugliness with the redefinition of __builtin_va_list, among other things. llvm-svn: 68838
* Fixup copy/dispose helpers for Objective-C. Radar 6756504Mike Stump2009-04-101-0/+2
| | | | llvm-svn: 68837
* Remove asserts that weren't really useful, and that would fire in case the ↵Anders Carlsson2009-04-101-5/+0
| | | | | | CleanupEntries vector needed to be reallocated. llvm-svn: 68835
* Fix another fallout from defining __weak unconditionally.Fariborz Jahanian2009-04-101-1/+2
| | | | llvm-svn: 68834
* Don't set both readnone and readonly.Daniel Dunbar2009-04-101-2/+2
| | | | llvm-svn: 68833
* do a dance with predefines, and finally enable reading of macros fromChris Lattner2009-04-102-5/+7
| | | | | | | PCH. This works now, except for limitations not being able to do things with identifiers. The basic example in the testcase works though. llvm-svn: 68832
* move a bunch of code for initializing the predefines buffer out of ↵Chris Lattner2009-04-101-335/+1
| | | | | | | | | | Preprocessor.cpp into clang-cc.cpp. This makes it so clang-cc constructs the *entire* predefines buffer, not just half of it. A bonus of this is that we get to kill a copy of DefineBuiltinMacro. llvm-svn: 68830
* add support for reading macros. This does all the reading (with a bunch ofChris Lattner2009-04-102-0/+119
| | | | | | | fixme's, e.g. for tokens with identifiers) but does not actually install them. Some details with the predefines buffer needs to be sorted out first. llvm-svn: 68828
* simplify code.Chris Lattner2009-04-101-6/+4
| | | | llvm-svn: 68825
* Encode the target triple in the PCH file, and check that target triple when ↵Douglas Gregor2009-04-102-6/+36
| | | | | | using the PCH file llvm-svn: 68824
* Honor MACOSX_DEPLOYMENT_TARGET environment variable.Daniel Dunbar2009-04-101-1/+9
| | | | llvm-svn: 68822
* Implement serialization/deserialization of LangOptions in the PCHDouglas Gregor2009-04-102-23/+209
| | | | | | | | | file. When de-serializing LangOptions, we check that the currently-provided language options are consistent with the options used to compile the PCH file. If they are not, we emit a diagnostic and ignore the PCH file. llvm-svn: 68820
* Internal variables could mistakenly have "hidden" visibility whenDaniel Dunbar2009-04-101-9/+13
| | | | | | | | their emission was deferred. - <rdar://problem/6775234> variables with internal linkage should not be exposed with -fvisibility=hidden. llvm-svn: 68818
* Driver: Forward -miphoneos-version-min to clang.Daniel Dunbar2009-04-102-1/+13
| | | | llvm-svn: 68816
* Support -miphoneos-version-min in clang-cc.Daniel Dunbar2009-04-101-25/+79
| | | | | | | | | | - Patch by Shantonu Sen (with a minor tweak to split out getDarwin{OSX,IPhoneOS}Defines)! - <rdar://problem/6776277> Need clang-cc/ccc-analyzer support for -miphoneos-version-min llvm-svn: 68815
* Fixup codegen for nested blocks that use copy/dispose in the innerMike Stump2009-04-102-56/+64
| | | | | | blocks, so that the outer blocks use it as well. Radar 6762279 llvm-svn: 68811
* Patch to generate meta-data for prtocol usedFariborz Jahanian2009-04-101-1/+4
| | | | | | in @protocol expression. llvm-svn: 68806
* Driver: CCC_ADD_ARGS could end up using dangling pointers.Daniel Dunbar2009-04-101-2/+0
| | | | llvm-svn: 68805
* Use getDeclName() instead of getIdentifier() (safe against null pointers)Ted Kremenek2009-04-101-1/+1
| | | | llvm-svn: 68804
* add a new PP_MACRO_NAME hack so that I can test object-like macros.Chris Lattner2009-04-101-0/+7
| | | | llvm-svn: 68803
* Move a few more NonLoc static functions to ValueManager.Ted Kremenek2009-04-102-13/+13
| | | | llvm-svn: 68800
* emit tokens, constify the Preprocessor passed down into PCH writer.Chris Lattner2009-04-101-3/+25
| | | | llvm-svn: 68798
* emit function-like and object-like macros to the PCH file.Chris Lattner2009-04-101-0/+50
| | | | | | | Note that we don't do anything useful with identifier infos yet and don't emit the tokens that the macros are defined to. llvm-svn: 68797
OpenPOWER on IntegriCloud