summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema/SemaDeclCXX.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Fixed typedef inside extern "C".Abramo Bagnara2010-07-301-1/+1
| | | | llvm-svn: 109865
* Add source location information to C++ base specifiers.Nick Lewycky2010-07-261-9/+12
| | | | llvm-svn: 109396
* Remove the vast majority of the Destroy methods from the AST library,Douglas Gregor2010-07-251-5/+1
| | | | | | since we aren't going to be calling them ever. llvm-svn: 109377
* Remove dead code.Eli Friedman2010-07-241-3/+0
| | | | llvm-svn: 109358
* PR7698: Make sure we correctly handle the initialization of an array withEli Friedman2010-07-241-4/+1
| | | | | | dependent size. llvm-svn: 109356
* Support catching Objective C pointers in C++ under the non-fragile NeXT runtime.John McCall2010-07-241-0/+21
| | | | | | Diagnose attempts to do this under the GNU or fragile NeXT runtimes. llvm-svn: 109298
* Update ImplicitCastExpr to be able to represent an XValue.Sebastian Redl2010-07-201-5/+5
| | | | llvm-svn: 108807
* A using declaration can redeclare a typedef to the same type. TheseDouglas Gregor2010-07-071-2/+25
| | | | | | | | typedefs won't have the same canonical declaration (since they are distinct), so we need to check for this case specifically. Fixes <rdar://problem/8018262>. llvm-svn: 107833
* Introduce Decl::hasBody() and FunctionDecl::hasBody() and use them instead ↵Argyrios Kyrtzidis2010-07-071-3/+3
| | | | | | | | of getBody() when we are just checking the existence of a body, to avoid de-serialization of the body from PCH. Makes de-serialization of the function body even more "lazier". llvm-svn: 107768
* Remove my egregious hack that forced deserialization of visibleDouglas Gregor2010-07-061-31/+0
| | | | | | | | declarations when implicitly declaring the default constructor, copy constructor, destructor, and copy-assignment operators of a class. Argiris fixed the underlying problem in r107596. llvm-svn: 107681
* Mark the operator delete associated with a virtual destructor as referenced.John McCall2010-07-031-0/+2
| | | | llvm-svn: 107573
* Lazily declare default constructors. We now delay the construction ofDouglas Gregor2010-07-031-14/+66
| | | | | | | | | | | | | | | | | | 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-021-10/+31
| | | | llvm-svn: 107543
* Lazily declare copy-assignment operators.Douglas Gregor2010-07-021-15/+80
| | | | llvm-svn: 107521
* Lazily declare the implicitly-declared destructor in a C++ class.Douglas Gregor2010-07-021-5/+20
| | | | llvm-svn: 107510
* Move the "current scope" state from the Parser into Action. ThisDouglas Gregor2010-07-021-24/+19
| | | | | | | | | | | | | | 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
* Add a new routine Sema::LookupDestructor and make all destructor-lookup ↵Douglas Gregor2010-07-011-9/+8
| | | | | | calls use that routine llvm-svn: 107444
* Provide exception specifications for implicitly-declared default constructors.Douglas Gregor2010-07-011-5/+46
| | | | llvm-svn: 107437
* Move the implicit declaration of a default constructor into a separateDouglas Gregor2010-07-011-32/+36
| | | | | | routine; no functionality change. llvm-svn: 107434
* Provide exception specifications for implicitly-declared copy constructors.Douglas Gregor2010-07-011-2/+47
| | | | llvm-svn: 107429
* Move the implicit declaration of a constructor out to a separateDouglas Gregor2010-07-011-67/+77
| | | | | | method. No functionality change. llvm-svn: 107415
* Teach DeclareImplicitCopyConstructor how to cope with virtual basesDouglas Gregor2010-07-011-7/+17
| | | | | | | and multi-dimensional array fields. Fixes several bugs found by inspection. llvm-svn: 107411
* Move declaration of a class's implicit copy constructor into aDouglas Gregor2010-07-011-86/+99
| | | | | | | separate function. Aside from making the loops infinitely faster, no functionality change. llvm-svn: 107407
* Provide an exception-specification for an implicitly-declaredDouglas Gregor2010-07-011-2/+31
| | | | | | copy-assignment operator. llvm-svn: 107406
* Move the implicit declaration of a class's copy-assignment operatorDouglas Gregor2010-07-011-98/+101
| | | | | | into a separate routine. No functionality change. llvm-svn: 107402
* Make loops infinitely faster. No functionality change.Douglas Gregor2010-07-011-5/+7
| | | | llvm-svn: 107398
* Remove unnecessary ASTContext parameter fromDouglas Gregor2010-07-011-8/+8
| | | | | | CXXRecordDecl::getDestructor(); no functionality change. llvm-svn: 107394
* Reinstate fix for PR7526, which was failing because, now that weDouglas Gregor2010-07-011-15/+114
| | | | | | | | | | | | | | | aren't dropping all exception specifications on destructors, the exception specifications on implicitly-declared destructors were detected as being wrong (which they were). Introduce logic to provide a proper exception-specification for implicitly-declared destructors. This also fixes PR6972. Note that the other implicitly-declared special member functions also need to get exception-specifications. I'll deal with that in a subsequent commit. llvm-svn: 107385
* Revert r107374, which broke bootstrap.Douglas Gregor2010-07-011-16/+13
| | | | llvm-svn: 107378
* When building the type of a destructor, make sure to keep theDouglas Gregor2010-07-011-13/+16
| | | | | | exception specification. Fixes PR7526. llvm-svn: 107374
* Reapply r107235, this time with both my typo fixed, and a logical bug fixed.Chandler Carruth2010-06-301-28/+50
| | | | | | | | | | Previously we relied on the presence of a member which needs no initialization to prevent us from creating an additional initialization of the outer anonymous union field. We have already correctly marked that field as initialized by the member of the union (repeatedly due to the original bug this patch fixes) so we simply need to bail out. llvm-svn: 107242
* Revert r107235, it had a silly typo in it, and fixing the typo breaks somethingChandler Carruth2010-06-301-47/+28
| | | | | | | else. Get the build bots happy while I debug. Very sorry for the delay fixing this... llvm-svn: 107239
* Fix PR7402: We were creating implicit member initializers for every field in anChandler Carruth2010-06-301-28/+47
| | | | | | | | | | | anonymous union under the presumption that they didn't do anything. While this is true, our checks for redundant initialization of an anonymous union still fire when these overlap with explicit user initialization. A cleaner approach is to avoid initializing multiple members of a union altogether, but this still is in a rather fuzzy are especially when C++0x allows non-POD types into unions. llvm-svn: 107235
* Retain the source location of the constructor when building an implicit memberChandler Carruth2010-06-291-5/+5
| | | | | | | | | initialization. I tried several ideas but couldn't come up with a test case for this that didn't rely on a Clang bug to report a diagnostic after template instantiation of the constructor due to the implicit initializers. Suggestions welcome. This fixes the source location aspect of PR7402. llvm-svn: 107226
* When typo correction produces a result that is not of the kind we'reDouglas Gregor2010-06-291-0/+7
| | | | | | | looking for, reset the name within the LookupResult structure in addition to clearing out the results. Fixes PR7508. llvm-svn: 107197
* Typo correction for namespace alias definitionsDouglas Gregor2010-06-291-2/+24
| | | | llvm-svn: 107191
* Allow a using directive to refer to the implicitly-defined namespaceDouglas Gregor2010-06-291-1/+49
| | | | | | | | "std", with a warning, to improve GCC compatibility. Fixes PR7517. As a drive-by, add typo correction for using directives. llvm-svn: 107172
* Given Decl::isUsed() a flag indicating when to consider the "used"Douglas Gregor2010-06-171-4/+4
| | | | | | | | | attribute as part of the calculation. Sema::MarkDeclReferenced(), and a few other places, want only to consider the "used" bit to determine, e.g, whether to perform template instantiation. Fixes a linkage issue with Boost.Serialization. llvm-svn: 106252
* Fixed conflict between objc_memmove_collectable builtin Fariborz Jahanian2010-06-161-3/+4
| | | | | | decl. and one ddefined in darwin header file. llvm-svn: 106107
* If a non-dependent base class initializer fails to match any direct orDouglas Gregor2010-06-161-27/+42
| | | | | | | | virtual base class, but the class still has dependent base classes, then don't diagnose the failed match as an error: the right base class might magically appear. Fixes PR7259. llvm-svn: 106103
* Fix a point of semantics with using declaration hiding: method templatesJohn McCall2010-06-161-6/+1
| | | | | | | | | | | | | | | | | introduced by using decls are hidden even if their template parameter lists or return types differ from the "overriding" declaration. Propagate using shadow declarations around more effectively when looking up template-ids. Reperform lookup for template-ids in member expressions so that access control is properly set up. Fix some number of latent bugs involving template-ids with totally invalid base types. You can only actually get these with a scope specifier, since otherwise the template-id won't parse as a template-id. Fixes PR7384. llvm-svn: 106093
* Workaround a possible VS C++ bug.Fariborz Jahanian2010-06-161-6/+12
| | | | llvm-svn: 106070
* Patch adds support for copying of thoseFariborz Jahanian2010-06-151-6/+35
| | | | | | | | objective-c++ class objects which have GC'able objc object pointers and need to use ObjC's objc_memmove_collectable API (radar 8070772). llvm-svn: 106061
* When analyzing for member self-assignment, don't attempt to dereference nullNick Lewycky2010-06-151-19/+21
| | | | | | | | Stmt* such as those which occur in ?: . Fixes PR7378. Also, generally whip the code into shape fixing several coding style violations. llvm-svn: 105992
* Added AccessSpecDecl node.Abramo Bagnara2010-06-051-0/+11
| | | | llvm-svn: 105525
* Alter the interface of GetTypeForDeclarator to return a TypeSourceInfo*.John McCall2010-06-041-11/+8
| | | | | | This is never null, but the associated type might be. llvm-svn: 105503
* Delay checking for mutable const fields until we're checking the field.John McCall2010-06-041-30/+10
| | | | | | | Allows this check to work properly for instantiated fields and removes an unnecessary GetTypeForDeclarator call. llvm-svn: 105463
* Add all final overriders to the map.Anders Carlsson2010-06-031-0/+7
| | | | llvm-svn: 105374
* When filtering out previous declarations of friend functions, consider theJohn McCall2010-05-281-5/+10
| | | | | | lookup context, not the direct semantic context. Fixes PR7230. llvm-svn: 104917
* Tweak the fix-it for a copy constructor declared to take its argumentDouglas Gregor2010-05-271-1/+4
| | | | | | by-value. We now only prepend a space if it is needed. llvm-svn: 104889
OpenPOWER on IntegriCloud