summaryrefslogtreecommitdiffstats
path: root/clang
Commit message (Collapse)AuthorAgeFilesLines
...
* Oops, tabs --> spaces in test.Jordy Rose2010-07-061-10/+10
| | | | llvm-svn: 107634
* Improve NULL-checking for CFRetain/CFRelease. We now remember that the ↵Jordy Rose2010-07-063-44/+66
| | | | | | argument was non-NULL, and we report where the null assumption came from (like AttrNonNullChecker already did). llvm-svn: 107633
* Stop testing for specific basic block numbers in this test.John McCall2010-07-061-2/+0
| | | | llvm-svn: 107632
* Validated by nightly-test runs on x86 and x86-64 darwin, including afterJohn McCall2010-07-0625-1861/+3314
| | | | | | | | | | | | | | | | | | | | | | | | self-host. Hopefully these results hold up on different platforms. I tried to keep the GNU ObjC runtime happy, but it's hard for me to test. Reimplement how clang generates IR for exceptions. Instead of creating new invoke destinations which sequentially chain to the previous destination, push a more semantic representation of *why* we need the cleanup/catch/filter behavior, then collect that information into a single landing pad upon request. Also reorganizes how normal cleanups (i.e. cleanups triggered by non-exceptional control flow) are generated, since it's actually fairly closely tied in with the former. Remove the need to track which cleanup scope a block is associated with. Document a lot of previously poorly-understood (by me, at least) behavior. The new framework implements the Horrible Hack (tm), which requires every landing pad to have a catch-all so that inlining will work. Clang no longer requires the Horrible Hack just to make exceptions flow correctly within a function, however. The HH is an unfortunate requirement of LLVM's EH IR. llvm-svn: 107631
* Local variables have no linkage, make invalid Entities.Zhongxing Xu2010-07-061-0/+4
| | | | llvm-svn: 107630
* Generate fewer first class aggregate values for otherChris Lattner2010-07-051-35/+13
| | | | | | | coerce cases (e.g. {double,int}) which avoids fastisel bailing out at -O0. llvm-svn: 107628
* in the "coerce" case, the ABI handling code ends up making theChris Lattner2010-07-054-9/+19
| | | | | | | | | alloca for an argument. Make sure the argument gets the proper decl alignment, which may be different than the type alignment. This fixes PR7567 llvm-svn: 107627
* fix a bug I introduced in r107624Chris Lattner2010-07-051-5/+2
| | | | llvm-svn: 107626
* rearrange some logic, no functionality change.Chris Lattner2010-07-051-19/+30
| | | | llvm-svn: 107624
* fix PR7564 a cast where the bitfield struct init codeChris Lattner2010-07-052-4/+39
| | | | | | wasn't handling array padding elements right. llvm-svn: 107621
* AppendBitField really can never fail, so return its return value. Chris Lattner2010-07-051-14/+8
| | | | | | Everyone knows that no bugs are ever possible with bitfields. llvm-svn: 107620
* Read/write the identifier namespace in PCH for decls that may modify it.Argyrios Kyrtzidis2010-07-054-6/+25
| | | | | | We can now use a PCH'ed <map>. llvm-svn: 107617
* Read/write some source location for PCH.Argyrios Kyrtzidis2010-07-054-6/+25
| | | | llvm-svn: 107616
* Support sizeof for VLA expressions (sizeof(someVLA)). sizeof(int[n]) still ↵Jordy Rose2010-07-052-3/+41
| | | | | | unimplemented. A VLA region's sizeof value matches its extent. llvm-svn: 107611
* Refrase comments.Zhongxing Xu2010-07-051-3/+3
| | | | llvm-svn: 107607
* Although in C++ class name has external linkage, usually the definition of the Zhongxing Xu2010-07-051-0/+8
| | | | | | | class is available in the same translation unit when it's needed. So we make all of them invalid Entity. llvm-svn: 107606
* Make FieldDecl an invalid Entity since it has no linkage.Zhongxing Xu2010-07-051-2/+2
| | | | llvm-svn: 107605
* Indexer: make FieldDecl an internal Entity.Zhongxing Xu2010-07-051-0/+6
| | | | llvm-svn: 107604
* Track extents for VLAs.Jordy Rose2010-07-053-7/+46
| | | | llvm-svn: 107603
* Fix a regression of a previous commit of mine (rdar://8158953).Argyrios Kyrtzidis2010-07-046-5/+52
| | | | | | | Some of the invariant checks for creating Record/Enum types don't hold true during PCH reading. Introduce more suitable ASTContext::getRecordType() and getEnumType(). llvm-svn: 107598
* Read/write more information of ASTContext for PCH. Overriden methods and ↵Argyrios Kyrtzidis2010-07-046-0/+45
| | | | | | instantiated-from information. llvm-svn: 107597
* When adding a visible decl, deserialize the visible decls and add it.Argyrios Kyrtzidis2010-07-041-9/+10
| | | | | | | | | | Before this commit, visible decls added before deserialization were ignored. This was not an issue since name lookup (that usually comes before the addition) forces deserialization but it is an issue for lazily declared class implicit members. We can use a PCH'ed <string> now. llvm-svn: 107596
* Don't try to install the __[u]int128_t identifier if it is already installed ↵Argyrios Kyrtzidis2010-07-046-5/+20
| | | | | | | | | | by PCHReader. Currently, adding it to visible decls of a PCH'ed translation unit has no effect because adding visible decls before deserialization has no effect (the decls won't be visible). This will be fixed in a future commit; then it will force deserialization of visible decls, so avoid pointlessly installing it. llvm-svn: 107595
* Write/read ParmVarDecl's UninstantiatedDefaultArg for PCH.Argyrios Kyrtzidis2010-07-042-1/+8
| | | | llvm-svn: 107594
* Read/write specialization info of static data members for PCH.Argyrios Kyrtzidis2010-07-045-5/+28
| | | | llvm-svn: 107593
* Add TypeLoc traversal to the RecursiveASTVisitor! Because the TypeLocs don'tNick Lewycky2010-07-041-13/+292
| | | | | | | | | | contain all the same information that their Types do, we will fall back to traversing the Types instead. The default TypeLoc visitor calls the matching Type visitor so that existing clients should continue to work with no change. Also adds element traversal to the ExtVectorType. llvm-svn: 107592
* Fix ObjCInterfaceTypeLoc to inherit from ObjCObjectTypeLoc so as to match theNick Lewycky2010-07-041-1/+1
| | | | | | | | Type hierarchy. Without this, TypeLocNodes.def will give you wrong type hierarchy information (claiming that ObjCObjectTypeLoc is the base of ObjCInterfaceTypeLoc, which it wasn't). llvm-svn: 107578
* Add a new symbol type, SymbolExtent, to represent the extents of memory ↵Jordy Rose2010-07-0414-147/+219
| | | | | | | | | | regions that may not be known at compile-time (such as those created by malloc). This replaces the old setExtent/getExtent API on Store, which used the GRState's GDM to store SVals. Also adds a getKnownValue() method to SValuator, which gets the integer value of an SVal if it is known to only have one possible value. There are more places in the code that could be using this, but in general we want to be dealing entirely in SVals, so its usefulness is limited. The only visible functionality change is that extents are now honored for any DeclRegion, such as fields and Objective-C ivars, rather than just variables. This shows up in bounds-checking and cast-size-checking. llvm-svn: 107577
* Unbreak test on platforms where size_t != unsigned long.Benjamin Kramer2010-07-031-1/+1
| | | | llvm-svn: 107574
* Mark the operator delete associated with a virtual destructor as referenced.John McCall2010-07-032-0/+19
| | | | llvm-svn: 107573
* Mangle Objective-C pointers and block pointers in the Microsoft C++ Mangler.Charles Davis2010-07-032-16/+29
| | | | | | | | | | ObjC pointers were easy enough (as far as the ABI is concerned, they're just pointers to structs), but I had to invent a new mangling for block pointers. This is particularly worrying with the Microsoft ABI, because it is a vendor-specific ABI; extending it could come back to bite us later when MS extends it on their own (and you know they will). llvm-svn: 107572
* Provide convenience routines to save and restore the current insertionJohn McCall2010-07-031-3/+52
| | | | | | point. llvm-svn: 107570
* Fix mangling of array dimensions in the Microsoft C++ Mangler.Charles Davis2010-07-032-9/+9
| | | | llvm-svn: 107568
* Mangle member pointer types in the Microsoft C++ Mangler.Charles Davis2010-07-032-3/+21
| | | | llvm-svn: 107567
* When setting the anonymous namespace at PCH reading, it may still be ↵Argyrios Kyrtzidis2010-07-034-6/+22
| | | | | | | | initializing so avoid the invariant checks at NamespaceDecl::setAnonymousNamespace(). llvm-svn: 107566
* Fix mangling of function pointers in the Microsoft C++ Mangler.Charles Davis2010-07-032-0/+8
| | | | llvm-svn: 107564
* Forward -fno-builtin to clang, add .cp as a supportedShantonu Sen2010-07-031-0/+2
| | | | | | | | | extension if you otherwise configure scan-build to do c++ static analysis. OKed by Ted llvm-svn: 107562
* Fix mangling of array parameters for functions in the Microsoft C++ Mangler.Charles Davis2010-07-032-11/+22
| | | | | | | | | | | Only actual functions get mangled correctly; I don't know how to fix it for function pointers yet. Thanks to John McCall for the hint. Also, mangle anonymous tag types. I don't have a suitable testcase yet; I have a feeling that that's going to need support for static locals, and I haven't figured out exactly how MSVC's scheme for mangling those works. llvm-svn: 107561
* Lazily declare default constructors. We now delay the construction ofDouglas Gregor2010-07-039-23/+128
| | | | | | | | | | | | | | | | | | declarations for implicit default constructors, copy constructors, copy assignment operators, and destructors. On a "simple" translation unit that includes a bunch of C++ standard library headers, we generate relatively few of these implicit declarations now: 4/159 implicit default constructors created 18/236 implicit copy constructors created 70/241 implicit copy assignment operators created 0/173 implicit destructors created And, on this translation unit, this optimization doesn't really provide any benefit. I'll do some more performance measurements soon, but this completes the implementation work for <rdar://problem/8151045>. llvm-svn: 107551
* Lazily declare implicit copy constructors.Douglas Gregor2010-07-028-19/+88
| | | | llvm-svn: 107543
* Read/write CastExpr's CXXBaseSpecifierArray for PCH.Argyrios Kyrtzidis2010-07-0210-26/+53
| | | | llvm-svn: 107542
* Fix broken PCH support for CXXDefaultArgExpr.Argyrios Kyrtzidis2010-07-023-22/+23
| | | | llvm-svn: 107541
* Introduce a new routine, LookupConstructors(), and use it for allDouglas Gregor2010-07-024-21/+16
| | | | | | constructor-name lookup. llvm-svn: 107536
* Lazily declare copy-assignment operators.Douglas Gregor2010-07-028-85/+181
| | | | llvm-svn: 107521
* Make RecursiveASTVisitor traverse function parameter types in a functionZhanyong Wan2010-07-021-4/+21
| | | | | | prototype declaration. Reviewed by chandlerc and csilvers. llvm-svn: 107511
* Lazily declare the implicitly-declared destructor in a C++ class.Douglas Gregor2010-07-0210-6/+111
| | | | llvm-svn: 107510
* Don't visit implicitly defined functions (default constructors and theCraig Silverstein2010-07-021-3/+6
| | | | | | | | like). Our goal with this visitor is to visit exactly what people type. Reviewed by chandlerc. llvm-svn: 107497
* Move the "current scope" state from the Parser into Action. ThisDouglas Gregor2010-07-0217-291/+319
| | | | | | | | | | | | | | allows Sema some limited access to the current scope, which we only use in one way: when Sema is performing some kind of declaration that is not directly driven by the parser (e.g., due to template instantiatio or lazy declaration of a member), we can find the Scope associated with a DeclContext, if that DeclContext is still in the process of being parsed. Use this to make the implicit declaration of special member functions in a C++ class more "scope-less", rather than using the NULL Scope hack. llvm-svn: 107491
* By default, warn about commas at the end of an enumerator list in C++/C89.Douglas Gregor2010-07-022-2/+2
| | | | llvm-svn: 107485
* Handle CXXConstructorDecl, CXXDestructorDecl, and CXXConversionDecl for PCH.Argyrios Kyrtzidis2010-07-023-17/+135
| | | | | | <vector> header can be used correctly through PCH now. llvm-svn: 107483
OpenPOWER on IntegriCloud