summaryrefslogtreecommitdiffstats
path: root/clang/test
Commit message (Collapse)AuthorAgeFilesLines
* More PushOnScopeChain() FIXME's.Steve Naroff2009-04-232-0/+9
| | | | llvm-svn: 69894
* Sema::ActOnStartClassInterface(): Use PushOnScopeChains().Steve Naroff2009-04-232-6/+9
| | | | | | This enables class recognition to work with PCH. I believe this means we can remove Sema::ObjCInterfaceDecls and it's usage within Sema::LookupName(). Will investigate. llvm-svn: 69891
* Add PCH read/write support for Objective-C Selectors.Steve Naroff2009-04-232-0/+8
| | | | | Note: This support is non-lazy. Once we get "Cocoa.h" humming, we can optimize this. llvm-svn: 69884
* Add implicit definition of objc_msgSend.Daniel Dunbar2009-04-231-0/+7
| | | | | | | | - As with malloc and friends, this is important where the return type on a 64-bit platform would otherwise end up discarding the upper 32-bits. llvm-svn: 69874
* PCH support for Objective-C property declarations (UNTESTED!)Douglas Gregor2009-04-222-0/+23
| | | | llvm-svn: 69843
* Support locally-declared external declarations in PCH filesDouglas Gregor2009-04-222-0/+21
| | | | llvm-svn: 69833
* Clean up and de-XFAIL-ify PCH test for external definitionsDouglas Gregor2009-04-222-8/+0
| | | | llvm-svn: 69831
* remove obsolete tests.Chris Lattner2009-04-222-10/+0
| | | | llvm-svn: 69830
* Support tentative definitions in precompiled headers. This isn't likelyDouglas Gregor2009-04-222-0/+18
| | | | | | to happen (ever), but at least we'll do the right thing when it does. llvm-svn: 69829
* Add handling for complex->int, int->complex float, and float->complex Eli Friedman2009-04-221-0/+2
| | | | | | | int. Note that constant int->complex float and float->complex int casts were being miscompiled. llvm-svn: 69821
* Reapply r69771, with updates & fixes:Daniel Dunbar2009-04-221-0/+56
| | | | | | | | | | | | | | | | | | | | | | Rework the shadow struct that is layed out for Objective-C classes. - Superclasses are now always laid out in their shadow structure at the first field. - Prior to this, the entire class heirarchy was flattened into a single structure which meant that alignment, padding, and bitfields were incorrect (the ASTRecordLayout was correct however, which meant our debug info didn't coincide with ivar offsets, for example). - This is still very suboptimal (for example, ivar are looked up recursively, but I believe the ivar layout itself is now at least close to correct. - <rdar://problem/6773388> error: objc[29823]: layout bitmap sliding backwards llvm-svn: 69811
* Make sure this test runs on all 3 Objective-C implementations.Daniel Dunbar2009-04-221-1/+3
| | | | llvm-svn: 69786
* deserialization support for qualified interfacesChris Lattner2009-04-222-1/+5
| | | | llvm-svn: 69782
* pch support for protocol qualified id's.Chris Lattner2009-04-222-6/+11
| | | | llvm-svn: 69781
* add three new objc expression types. @selector doesn't work because we have no Chris Lattner2009-04-222-3/+20
| | | | | | way to serialize selectors yet. llvm-svn: 69780
* implement serialization support for @encode,Chris Lattner2009-04-222-0/+12
| | | | | | | fix a couple of bugs in reader support for ObjCInterfaceDecl, and add support for reading ObjCInterfaceType. llvm-svn: 69779
* rename methods.* -> objc_methods.*Chris Lattner2009-04-222-2/+2
| | | | llvm-svn: 69778
* change implicit int warnings to point to the identifier, not the Chris Lattner2009-04-222-3/+2
| | | | | | | | | | | | start of the declspec. The fixit still goes there, and we underline the declspec. This helps when the start of the declspec came from a macro that expanded from a system header. For example, we now produce: t.c:2:8: warning: type specifier missing, defaults to 'int' [-Wimplicit-int] static x; ~~~~~~ ^ llvm-svn: 69777
* Revert r69771, I missed some (obvious) details. :/Daniel Dunbar2009-04-221-56/+0
| | | | llvm-svn: 69773
* Rework the shadow struct that is layed out for Objective-C classes.Daniel Dunbar2009-04-221-0/+56
| | | | | | | | | | | | | | | | | | | - Superclasses are now always laid out their shadow structure at the first field. - Prior to this, the entire class heirarchy was flattened into a single structure which meant that alignment, padding, and bitfields weren't packed correctly (the ASTRecordLayout was correct however, which meant our debug info didn't coincide with ivar offsets, for example). - This is still very suboptimal, but I believe the ivar layout itself is now at least close to correct. - <rdar://problem/6773388> error: objc[29823]: layout bitmap sliding backwards llvm-svn: 69771
* Fix rdar://6814950 - stdint.h isn't "-pedantic -std=c89" clean,Chris Lattner2009-04-222-1/+6
| | | | | | | | | | | | | | | | | | | | by marking the predefines buffer as a system header. The problem with stdint is that it was getting problems like this: /Volumes/Projects/cvs/llvm/Debug/lib/clang/1.0/include/stdint.h:43:9: warning: 'long long' is an extension when C99 mode is not enabled typedef __INT64_TYPE__ int64_t; ^ <built-in>:73:29: note: instantiated from: #define __INT64_TYPE__ long long ^ We correctly silence warnings in system headers, but only if the spelling location of the token came from the system header. This is designed so that if you use a system macro in your code that you don't get punished for its definition. This is all cool except that the predefines buffer wasn't considered a system header. llvm-svn: 69770
* rename testChris Lattner2009-04-221-0/+0
| | | | llvm-svn: 69761
* Fix a problem with objc foreach loop. It turns out that objc mode changesChris Lattner2009-04-221-6/+14
| | | | | | | | | | | | for scoping to match C99 even when in C89 mode. This patch fixes this (eliminating a "redefinition of thisKey" error), and also prevents non-sensical diagnostics in -pedantic mode like this: t.m:7:8: warning: variable declaration in for loop is a C99-specific feature for (id thisKey in keys) ; ^ llvm-svn: 69760
* Test PCH support for VLAsDouglas Gregor2009-04-223-2/+5
| | | | llvm-svn: 69758
* Eliminate a FIXME in one of the PCH test casesDouglas Gregor2009-04-221-2/+2
| | | | llvm-svn: 69757
* Fix some mishandling of the attr(gnu_inline) mode when used withChris Lattner2009-04-222-2/+10
| | | | | | | | | | extern. Previously we would warn about it and ignore the attribute. This is incorrect, it should be handled as a c89 "extern inline" function. Many thanks to Matthieu Castet for pointing this out and beating me over the head until I got it. PR3988: extern inline function are not externally visible llvm-svn: 69756
* Fix crash reported in PR 3991. The analyzer doesn't reason about ObjCKVCExpr.Ted Kremenek2009-04-211-0/+67
| | | | llvm-svn: 69754
* apply Eli's patch to fix PR4008, with a testcase. Thanks Eli!Chris Lattner2009-04-211-7/+12
| | | | llvm-svn: 69750
* Resolve merge conflict better.Mike Stump2009-04-211-9/+9
| | | | llvm-svn: 69748
* fix PR4026: Clang can't codegen __func__ without implicit castChris Lattner2009-04-211-0/+5
| | | | llvm-svn: 69747
* Tighten up blocks type checking. This was discussed back in theMike Stump2009-04-214-12/+20
| | | | | | r56595 timeframe, but left undone. Radar 6812711 llvm-svn: 69745
* Lazy deserialization of identifiers in PCH files fixed a problem withDouglas Gregor2009-04-211-9/+1
| | | | | | name lookup of structures declared within other structures. llvm-svn: 69744
* Fix rdar://6814047, a crash on invalid in blocks code I noticed whenChris Lattner2009-04-211-6/+7
| | | | | | working on the previous fix. llvm-svn: 69742
* Fix: <rdar://problem/6777209> false Dereference of null pointer in loop: ↵Ted Kremenek2009-04-211-0/+15
| | | | | | | | | | pointer increment/decrement preserves non-nullness When the StoreManager doesn't reason well about pointer-arithmetic, propagate the non-nullness constraint on a pointer value when performing pointer arithmetic uisng ++/--. llvm-svn: 69741
* fix marking of nested blocks with the "hasBlockDeclRefExprs" toChris Lattner2009-04-211-0/+19
| | | | | | | | mark exactly the blocks which have references that are "live through". This fixes a rejects valid: rdar://6808730 - [sema] [blocks] block rejected at global scope llvm-svn: 69738
* Lazy deserialization of the declaration chains associated withDouglas Gregor2009-04-212-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | identifiers from a precompiled header. This patch changes the primary name lookup method for entities within a precompiled header. Previously, we would load all of the names of declarations at translation unit scope into a large DenseMap (inside the TranslationUnitDecl's DeclContext), and then perform a special "last resort" lookup into this DeclContext when we knew there was a PCH file (see Sema::LookupName). Now, when we see an identifier named for the first time, we load all of the declarations with that name that are visible from the translation unit into the IdentifierInfo's chain of declarations. Thus, the explicit "look into the translation unit's DeclContext" code is gone, and Sema effectively uses the same IdentifierInfo-based name lookup mechanism whether we are using a PCH file or not. This approach should help PCH scale with the size of the input program rather than the size of the PCH file. The "Hello, World!" application with Carbon.h as a PCH file now loads 20% of the identifiers in the PCH file rather than 85% of the identifiers. 90% of the 20% of identifiers loaded are actually loaded when we deserialize the preprocessor state. The next step is to make the preprocessor load macros lazily, which should drastically reduce the number of types, declarations, and identifiers loaded for "Hello, World". llvm-svn: 69737
* force a 32-bit triple.Chris Lattner2009-04-211-1/+1
| | | | llvm-svn: 69729
* Force triple (test case fails for platforms with the non-fragile ABI).Daniel Dunbar2009-04-211-1/+1
| | | | llvm-svn: 69727
* We no longer accept @defs with the non-fragile ABI.Daniel Dunbar2009-04-211-0/+2
| | | | llvm-svn: 69721
* temporarily downgrade to a warning.Chris Lattner2009-04-211-2/+2
| | | | llvm-svn: 69720
* Patch to diagnose use of objc's @defs in nonfragile abi.Fariborz Jahanian2009-04-211-0/+2
| | | | llvm-svn: 69710
* Added over-release test case.Ted Kremenek2009-04-211-1/+8
| | | | llvm-svn: 69703
* reject sizeof(itf) when itf is a forward declared interface, or whenChris Lattner2009-04-211-5/+8
| | | | | | in non-fragile abi mode. rdar://6811884 llvm-svn: 69701
* Explictly track tentative definitions within Sema, then hand thoseDouglas Gregor2009-04-213-4/+8
| | | | | | | | | | | | | | | tentative definitions off to the ASTConsumer at the end of the translation unit. Eliminate CodeGen's internal tracking of tentative definitions, and instead hook into ASTConsumer::CompleteTentativeDefinition. Also, tweak the definition-deferal logic for C++, where there are no tentative definitions. Fixes <rdar://problem/6808352>, and will make it much easier for precompiled headers to cope with tentative definitions in the future. llvm-svn: 69681
* Fix test typo.Daniel Dunbar2009-04-211-1/+1
| | | | llvm-svn: 69676
* Use an ASTRecordLayout to compute the sizeof an interface, notDaniel Dunbar2009-04-211-0/+35
| | | | | | | | | addRecordToClass. - Among other things, this fixes a crash when applying sizeof to an interface with synthesized ivars, although things still aren't "correct" here. llvm-svn: 69675
* implement semantic analysis for @synchronized, fixing a crash on invalidChris Lattner2009-04-213-69/+20
| | | | | | rdar://6810940 - @synchronized has no sema checks llvm-svn: 69670
* add support for goto checking and @synchronized blocks,Chris Lattner2009-04-211-0/+10
| | | | | | rdar://6810106 llvm-svn: 69667
* Fix PR4027 + rdar://6808859, we were rejecting implicit casts ofChris Lattner2009-04-211-0/+6
| | | | | | aggregates even though we already accept explicit ones. Easy fix. llvm-svn: 69661
* use of predefined identifiers like __func__ at global scope warn in sema,Chris Lattner2009-04-211-0/+6
| | | | | | | but crashed codegen. Fix this to report the name of the llvm function. This fixes rdar://6808051 llvm-svn: 69658
OpenPOWER on IntegriCloud