summaryrefslogtreecommitdiffstats
path: root/clang
Commit message (Collapse)AuthorAgeFilesLines
* When -fdump-vtable-layouts is specified, construction vtable initializers ↵Anders Carlsson2010-03-252-18/+145
| | | | | | will be generated using the new vtable layout code. (The code is still not completely in place but this is a huge step forward). llvm-svn: 99508
* add dump() method to CanQual for debugging purposesNuno Lopes2010-03-251-0/+2
| | | | llvm-svn: 99505
* Properly instantiate friend class template declarations and link them intoJohn McCall2010-03-254-28/+130
| | | | | | | the redeclaration chain. Recommitted from r99477 with a fix: we need to merge in default template arguments from previous declarations. llvm-svn: 99496
* Add a utility method.Zhongxing Xu2010-03-251-0/+1
| | | | llvm-svn: 99495
* Revert 99477 since it appears to be breaking the clang-x86_64-darwin10-fntBob Wilson2010-03-254-111/+28
| | | | | | | | | | | buildbot. The tramp3d test fails. --- Reverse-merging r99477 into '.': U test/SemaTemplate/friend-template.cpp U test/CXX/temp/temp.decls/temp.friend/p1.cpp U lib/Sema/SemaTemplateInstantiateDecl.cpp U lib/Sema/SemaAccess.cpp llvm-svn: 99481
* Fix two bugs in format-string checking:Ted Kremenek2010-03-253-19/+33
| | | | | | | | | (1) Do not assume the data arguments start after the format string (2) Do not use the fact that a function is variadic to treat it like a va_list printf function Fixes PR 6697. llvm-svn: 99480
* Fix '+=' accumulation error when parsing numeric amounts in a format string.Ted Kremenek2010-03-251-1/+1
| | | | llvm-svn: 99479
* Properly instantiate and link in friend-class-template declarations.John McCall2010-03-254-28/+111
| | | | llvm-svn: 99477
* Add c-index-test support for printing USRs.Ted Kremenek2010-03-252-4/+204
| | | | llvm-svn: 99476
* Require that all Clang-based USRs start with the prefix 'c:' for the "USR ↵Ted Kremenek2010-03-251-6/+15
| | | | | | space". llvm-svn: 99475
* Add methods to remove a GDM entry.Zhongxing Xu2010-03-253-1/+25
| | | | | | Instead of setting the ReturnExpr GDM to NULL, remove it. llvm-svn: 99470
* More address point map shuffling.Anders Carlsson2010-03-253-10/+36
| | | | llvm-svn: 99462
* Shuffle some code around; this will make it easier to use the new layout ↵Anders Carlsson2010-03-253-57/+57
| | | | | | code for address points. llvm-svn: 99461
* Kill off two more uses of Sema::CheckReferenceInit in favor of the newDouglas Gregor2010-03-253-24/+23
| | | | | | | | initialization code. Exposed a bug where we were not marking an implicit conversion as an lvalue when we were forming a call to a conversion function whose return type is a reference. llvm-svn: 99459
* Switch static_cast from the old reference-initialization code (viaDouglas Gregor2010-03-242-22/+19
| | | | | | | | CheckReferenceInit) over to the new initialization code (InitializationSequence), which is better-tested and doesn't require us to compute the entire conversion sequence twice. llvm-svn: 99452
* Check for ret, so that we know we hit the end of the functionDouglas Gregor2010-03-241-0/+1
| | | | llvm-svn: 99448
* When returning from a function that has a reference return type, useDouglas Gregor2010-03-242-1/+9
| | | | | | | | EmitReferenceBindingToExpr() rather than assuming we have an lvalue. This is just the lowest hanging fruit for PR6024, which still requires a bit of work. llvm-svn: 99447
* Discussing with dgregor we decided that we should not force the emission ofRafael Espindola2010-03-241-0/+29
| | | | | | | | | | implicit methods on explicit template instantiation definitions. As a consequence, we should emit them at every use, even if we see a explicit template instantiation declaration. This is already the current behaviour, but it is good to test for that :-) llvm-svn: 99443
* Use llvm::SmallString instead of std::string.Ted Kremenek2010-03-241-20/+15
| | | | llvm-svn: 99442
* Improve static analyzer diagnostic concerning the use of 'mktemp'Ted Kremenek2010-03-241-3/+2
| | | | llvm-svn: 99441
* make the vtable tester a little friendlier, with a clean target and without ↵Douglas Gregor2010-03-241-3/+6
| | | | | | requiring . to be in your path llvm-svn: 99433
* When pulling apart an initializer that involves a CXXConstructExpr, doDouglas Gregor2010-03-242-11/+31
| | | | | | | not pick apart a CXXTemporaryObjectExpr because such an object construction was explicitly written in the source code. Fixes PR6657. llvm-svn: 99427
* Make sure that we have File IDs for all of the unsaved files before weDouglas Gregor2010-03-243-3/+12
| | | | | | deserialize diagnostics. llvm-svn: 99426
* Allow conversion of qualified Class type to unqualifiedFariborz Jahanian2010-03-242-2/+9
| | | | | | Class type to match gcc's. Fixes radar 7789113. llvm-svn: 99425
* XFAIL the -nostdinc++ test on Windows; it doesn't look like we even have the ↵Douglas Gregor2010-03-241-1/+1
| | | | | | notion of separate C and C++ paths there llvm-svn: 99422
* Control warnings about GNU extensions with -Wgnu, which has a subgroupDouglas Gregor2010-03-244-14/+25
| | | | | | for GNU designated-initializer syntax (-Wgnu-designator). llvm-svn: 99421
* Implement support for -nostdc++. Fixes PR6446.Douglas Gregor2010-03-247-5/+24
| | | | llvm-svn: 99417
* Improve diagnostics when ivar added to classFariborz Jahanian2010-03-243-2/+18
| | | | | | extension (radar 6812436). llvm-svn: 99408
* Silently drop dependent friend function template specializations,Douglas Gregor2010-03-242-5/+22
| | | | | | | | since we have absolutely no way to match them when they are declared nor do we have a way to represent these parsed-but-not-checked friend declarations. llvm-svn: 99407
* Change two class forward declarations to struct forward declarations, ↵Douglas Gregor2010-03-241-2/+2
| | | | | | silencing a Clang warning llvm-svn: 99405
* Code gen for multi-dimensional dynamic allocations.Fariborz Jahanian2010-03-242-6/+81
| | | | | | Fixes PR6641. llvm-svn: 99404
* More vtable improvements. We now compute and keep track of all vtable ↵Anders Carlsson2010-03-244-33/+102
| | | | | | related information which avoids computing the same vtable layout over and over. llvm-svn: 99403
* Walk out of enums when determining effective context.John McCall2010-03-242-1/+32
| | | | llvm-svn: 99391
* Correct that last fixit: if the user wroteJohn McCall2010-03-241-2/+17
| | | | | | | | | template <> friend void foo(int); we need to change it to friend void foo<>(int); or else the user won't get the template specialization they obviously want. llvm-svn: 99390
* Support friend function specializations.John McCall2010-03-246-16/+37
| | | | llvm-svn: 99389
* When a declaration of a function is missing an exception specificationDouglas Gregor2010-03-248-21/+144
| | | | | | | | | | | | | | | | | | | | | that was present in a prior declaration, emit a warning rather than a hard error (which we did before, and still do with mismatched exception specifications). Moreover, provide a fix-it hint with the throw() clause that should be added, e.g., t.C:10:7: warning: 'operator new' is missing exception specification 'throw(std::bad_alloc)' void *operator new(unsigned long sz) ^ throw(std::bad_alloc) As part of this, disable the warning when we're missing an exception specification on operator new, operator new[], operator delete, or operator delete[] when exceptions are turned off (-fno-exceptions). Fixes PR5957. llvm-svn: 99388
* Use getNamedGlobal instead of getGlobalVariable. (Fixes self-host).Anders Carlsson2010-03-244-6/+6
| | | | llvm-svn: 99385
* Make the license header in smmintrin.h match the other SSE headers.Anders Carlsson2010-03-241-22/+22
| | | | llvm-svn: 99384
* Implement a framework for the delay of arbitrary diagnostics withinJohn McCall2010-03-2410-89/+648
| | | | | | | | | templates. So delay access-control diagnostics when (for example) the target of a friend declaration is a specific specialization of a template. I was surprised to find that this was required for an access-controlled selfhost. llvm-svn: 99383
* When performing name lookup for the allocation or deallocationDouglas Gregor2010-03-242-0/+30
| | | | | | | operators, make sure that the implicitly-declared global new and delete operators are always available. Fixes PR5904. llvm-svn: 99382
* More vtable work; preparations for moving over to the new vtable layout code ↵Anders Carlsson2010-03-247-25/+53
| | | | | | (finally). llvm-svn: 99381
* Each non-local class instantiation is its own local instantiationDouglas Gregor2010-03-242-0/+39
| | | | | | scope. Fixes PR6619. llvm-svn: 99377
* Remove old thunks code.Anders Carlsson2010-03-245-339/+0
| | | | llvm-svn: 99374
* Make sure to properly track the anonymous namespace that lives insideDouglas Gregor2010-03-243-16/+58
| | | | | | | | | | each namespace, even when the outer namespace has multiple definitions. As part of this, collapsed two pointers worth of storage (original namespace and inner anonymous namespace) into a single pointer with a distinguishing bit, since the two are mutually exclusive, saving a pointer per NamespaceDecl. Fixes PR6620. llvm-svn: 99368
* Flip the switch and use the new vtable layout code for thunks by default. ↵Anders Carlsson2010-03-242-7/+116
| | | | | | Add a thunks.cpp test. llvm-svn: 99367
* Add CodeGenFunction::GenerateThunk and implement it.Anders Carlsson2010-03-242-1/+179
| | | | llvm-svn: 99365
* Minor cleanup.Anders Carlsson2010-03-241-10/+8
| | | | llvm-svn: 99364
* Remove parts of virt.cppAnders Carlsson2010-03-241-52/+0
| | | | llvm-svn: 99363
* Implement computation of the final overriders for each virtualDouglas Gregor2010-03-238-96/+608
| | | | | | | | | | | | | | | | | | | | function within a class hierarchy (C++ [class.virtual]p2). We use the final-overrider computation to determine when a particular class is ill-formed because it has multiple final overriders for a given virtual function (e.g., because two virtual functions override the same virtual function in the same virtual base class). Fixes PR5973. We also use the final-overrider computation to determine which virtual member functions are pure when determining whether a class is abstract or diagnosing the improper use of an abstract class. The prior approach to determining whether there were any pure virtual functions in a class didn't cope with virtual base class subobjects properly, and could not easily be fixed to deal with the oddities of subobject hiding. Fixes PR6631. llvm-svn: 99351
* Add some missing files to xcode projectFariborz Jahanian2010-03-231-0/+28
| | | | llvm-svn: 99318
OpenPOWER on IntegriCloud