summaryrefslogtreecommitdiffstats
path: root/clang/lib/AST
Commit message (Collapse)AuthorAgeFilesLines
...
* 1) don't do overload resolution in selecting conversionFariborz Jahanian2009-09-151-2/+3
| | | | | | | | to pointer function for delete expression. 2) Treat type conversion function and its 'const' version as identical in building the visible conversion list. llvm-svn: 81930
* Make sure we're comparing the canonical types when we determineDouglas Gregor2009-09-151-2/+3
| | | | | | | | | whether a constructor is a copy constructor. Sadly, I wasn't able to get down to a test case smaller than libstdc++'s <string>. llvm-svn: 81913
* Implement partial ordering of class template partial specializations Douglas Gregor2009-09-151-3/+4
| | | | | | (C++ [temp.class.order]). llvm-svn: 81866
* Handle reinterpret_cast between integral types and pointer types.Anders Carlsson2009-09-151-0/+4
| | | | llvm-svn: 81837
* Codegen support for nullptr from C++0x.Anders Carlsson2009-09-151-1/+2
| | | | llvm-svn: 81835
* Using the property dot-syntax to invoke a non-eixstingFariborz Jahanian2009-09-141-10/+9
| | | | | | | structure-valued setter should cause a user error instead of crash. llvm-svn: 81769
* Add utility to evaluate lvalues which are an offset relative to a stack Eli Friedman2009-09-131-6/+16
| | | | | | location. Patch by Enea Zaffanella. llvm-svn: 81672
* Rework the way we determine whether an externally visible symbol isDouglas Gregor2009-09-131-18/+57
| | | | | | | | generated for an inline function definition, taking into account C99 and GNU inline/extern inline semantics. This solution is simpler, cleaner, and fixes PR4536. llvm-svn: 81670
* More improvement in building list of visible conversionFariborz Jahanian2009-09-121-34/+36
| | | | | | functions for a class when needed. llvm-svn: 81624
* Removed Context argument from couple of methods which don'tFariborz Jahanian2009-09-121-4/+2
| | | | | | need them. llvm-svn: 81621
* More work toward having an access method for visibleFariborz Jahanian2009-09-121-35/+52
| | | | | | conversion functions. llvm-svn: 81618
* Remove unnecessary ASTContext parameter from FunctionDecl::isBuiltinIDDouglas Gregor2009-09-122-2/+3
| | | | llvm-svn: 81590
* Remove unnecessary ASTContext parameters from isMain and isExternCDouglas Gregor2009-09-121-3/+6
| | | | llvm-svn: 81589
* Eliminate FunctionDecl::getBodyIfAvailableDouglas Gregor2009-09-121-10/+0
| | | | llvm-svn: 81588
* No need to build the visible conversionfunction list for root class.Fariborz Jahanian2009-09-111-5/+10
| | | | llvm-svn: 81583
* Patch to build visible conversion function list lazily and make its Fariborz Jahanian2009-09-111-0/+84
| | | | | | first use in calling the conversion function on delete statements. llvm-svn: 81576
* Tweak the semantics of FunctionDecl::isOutOfLine to consider anDouglas Gregor2009-09-112-1/+24
| | | | | | | | | | instantiation of a member function template or member function of a class template to be out-of-line if the definition of that function template or member function was defined out-of-line. This ensures that we get the correct linkage for explicit instantiations of out-of-line definitions. llvm-svn: 81562
* Cleanup and test C++ default arguments. Improvements include:Douglas Gregor2009-09-111-6/+16
| | | | | | | | | | | - Diagnose attempts to add default arguments to templates (or member functions of templates) after the initial declaration (DR217). - Improve diagnostics when a default argument is redefined. Now, the note will always point at the place where the default argument was previously defined, rather than pointing to the most recent declaration of the function. llvm-svn: 81548
* When stringizing a NamedDecl for a diagnostic, treat the templateJohn McCall2009-09-112-0/+25
| | | | | | specialization types differently. llvm-svn: 81512
* Diagnose VLAs as an error in C++.Douglas Gregor2009-09-111-1/+4
| | | | | | | Also, treat the GNU __null as an integral constant expression to match GCC's behavior. llvm-svn: 81490
* Fix a regression where write-barrier was not being generated Fariborz Jahanian2009-09-101-1/+1
| | | | | | for block pointer. llvm-svn: 81479
* Eliminate some "default"s in CheckICE.Douglas Gregor2009-09-101-3/+82
| | | | llvm-svn: 81477
* static_cast, reinterpret_cast, and const_cast can all be used in C++Douglas Gregor2009-09-101-1/+4
| | | | | | | | | | integral constant expressions (for conversions to integer types, naturally). I don't *think* that const_casts will ever get to this point, but I also can't convince myself that they won't... so I've taken the safe route and allowed the ICE checking code to look at const_cast. llvm-svn: 81453
* When performing unqualified name lookup into a DeclContext, also look intoDouglas Gregor2009-09-101-0/+16
| | | | | | | | all of the parent DeclContexts that aren't represented within the Scope chain. This fixes some name-lookup problems in out-of-line definitions of members of nested classes. llvm-svn: 81451
* Improve handling of initialization by constructor, by ensuring thatDouglas Gregor2009-09-091-15/+13
| | | | | | | | such initializations properly convert constructor arguments and fill in default arguments where necessary. This also makes the ownership model more clear. llvm-svn: 81394
* Remove tabs, and whitespace cleanups.Mike Stump2009-09-0926-1399/+1381
| | | | llvm-svn: 81346
* Initial stab at implement dependent member references to memberDouglas Gregor2009-09-095-5/+86
| | | | | | | | | | | | | templates, e.g., x.template get<T> We can now parse these, represent them within an UnresolvedMemberExpr expression, then instantiate that expression node in simple cases. This allows us to stumble through parsing LLVM's Casting.h. llvm-svn: 81300
* More objc GC's API work for array of pointers declaredFariborz Jahanian2009-09-081-6/+3
| | | | | | as __strong. llvm-svn: 81283
* Make sure to access APValue's data via a char array (rather thanDouglas Gregor2009-09-081-7/+7
| | | | | | | | through an array of void*), so that we don't run afoul of the strict-aliasing rules in C++ 3.10p15. Unfortunately, GCC 4.4 still complains about this code. llvm-svn: 81251
* Vastly improve PredefinedExpr output, both in Sema and CodeGen. Patch by Sam ↵Anders Carlsson2009-09-083-20/+82
| | | | | | Weinig! llvm-svn: 81237
* Clean up the CXXConstructExpr constructor, add Arg getters.Anders Carlsson2009-09-081-7/+14
| | | | llvm-svn: 81178
* More <sstream> removal.Benjamin Kramer2009-09-071-1/+0
| | | | llvm-svn: 81150
* Reapply 81096, now with a fix. Spot the bug:Anders Carlsson2009-09-061-0/+2
| | | | | | | | | for (unsigned i = numargs; i < NumArgs; ++i) Args[0] = 0; ;) llvm-svn: 81123
* Revert "Initialize default CXXConstructExpr arguments to 0. Fixes a crash whenDaniel Dunbar2009-09-061-2/+0
| | | | | | | destroying the CXXConstructExpr.", this is causing test failures across the board. llvm-svn: 81100
* Initialize default CXXConstructExpr arguments to 0. Fixes a crash when ↵Anders Carlsson2009-09-051-0/+2
| | | | | | destroying the CXXConstructExpr. llvm-svn: 81096
* Start emitting ElaboratedTypes in C++ mode. Support the effort in variousJohn McCall2009-09-052-2/+9
| | | | | | | | ways: remove elab types during desugaring, enhance pretty-printing to allow tags to be suppressed without suppressing scopes, look through elab types when associating a typedef name with an anonymous record type. llvm-svn: 81065
* Basic support for representing elaborated type specifiersJohn McCall2009-09-052-0/+33
| | | | | | | | | | | | | | | directly in the AST. The current thinking is to create these only in C++ mode for efficiency. But for now, they're not being created at all; patch to follow. This will let us do things like verify that tags match during template instantation, as well as signal that an elaborated type specifier was used for clients that actually care. Optimally, the TypeLoc hierarchy should be adjusted to carry tag location information as well. llvm-svn: 81057
* Improve the AST representation and semantic analysis for externDouglas Gregor2009-09-041-12/+23
| | | | | | | | | | | templates. We now distinguish between an explicit instantiation declaration and an explicit instantiation definition, and know not to instantiate explicit instantiation declarations. Unfortunately, there is some remaining confusion w.r.t. instantiation of out-of-line member function definitions that causes trouble here. llvm-svn: 81053
* Implement AST, semantics, and CodeGen for C++ pseudo-destructorDouglas Gregor2009-09-043-0/+27
| | | | | | | | | | | | | expressions, e.g., p->~T() when p is a pointer to a scalar type. We don't currently diagnose errors when pseudo-destructor expressions are used in any way other than by forming a call. llvm-svn: 81009
* When searching for a default constructor or copy constructor, skip ↵Douglas Gregor2009-09-041-0/+9
| | | | | | constructor templates llvm-svn: 81002
* Correctly handle elaborated template ids. Still not handled properly for ↵John McCall2009-09-041-0/+12
| | | | | | friends. llvm-svn: 80977
* Patch to instantiate destructors used to destructFariborz Jahanian2009-09-031-61/+0
| | | | | | base and data members when they are needed. llvm-svn: 80967
* Issue diagnostics in variety of situations involvingFariborz Jahanian2009-09-031-153/+0
| | | | | | | | reference/const data members when user has declared the constructor. This necessitated some non-minor refactoring. llvm-svn: 80934
* Improved handling for dependent, qualified member access expressions, e.g.,Douglas Gregor2009-09-032-0/+3
| | | | | | | | | | | | | | | t->Base::f where t has a dependent type. We save the nested-name-specifier in the CXXUnresolvedMemberExpr then, during instantiation, substitute into the nested-name-specifier with the (transformed) object type of t, so that we get name lookup into the type of the object expression. Note that we do not yet retain information about name lookup into the lexical scope of the member access expression, so several regression tests are still disabled. llvm-svn: 80925
* Add CastExpr::getCastKindName and use it in the StmtDumper.Anders Carlsson2009-09-032-41/+36
| | | | llvm-svn: 80862
* Add a wicked little test-case that illustrates what we have to dealDouglas Gregor2009-09-021-1/+11
| | | | | | | | with to properly support member access expressions in templates. This test is XFAIL'd, because we get it completely wrong, but I've made the minimal changes to the representation to at least avoid a crash. llvm-svn: 80856
* When parsing typename specifiers (with either the identifier orDouglas Gregor2009-09-021-1/+1
| | | | | | | | | | | | simple-template-id form), check whether the scope specifier is computable as a declaration context rather than checking whether it is dependent, so that we properly cope with members of the current instantiation. Improve testing for typename specifiers that terminate in a simpe-template-id. llvm-svn: 80783
* Ensure that the tag decls of friend decls aren't added to the friending class'sJohn McCall2009-09-022-8/+1
| | | | | | | decl list, and remove some workarounds that were due to this. Thanks to Eli for pointing this out and providing the test case. llvm-svn: 80745
* After a conversation with Doug. I added a fix me toFariborz Jahanian2009-09-011-0/+13
| | | | | | where we build the constructor's initializer list. llvm-svn: 80735
* In CXXBaseOrMemberInitializer, don't confuse CtorTocall withDouglas Gregor2009-09-011-4/+4
| | | | | | AnonUnionMember. Fixes PR4826. llvm-svn: 80721
OpenPOWER on IntegriCloud