summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema/SemaTemplateInstantiateDecl.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* Added missing IgnoreParens().Abramo Bagnara2010-12-141-4/+4
| | | | llvm-svn: 121795
* Restore r121752 without modification.John McCall2010-12-141-7/+8
| | | | llvm-svn: 121763
* Pull out r121752 in case it's causing the selfhost breakage.John McCall2010-12-141-8/+7
| | | | llvm-svn: 121759
* Factor out most of the extra state in a FunctionProtoType into a separateJohn McCall2010-12-141-7/+8
| | | | | | | class to be passed around. The line between argument and return types and everything else is kindof vague, but I think it's justifiable. llvm-svn: 121752
* Skip ParenType on function instantiations.Abramo Bagnara2010-12-131-3/+3
| | | | llvm-svn: 121720
* Fix PR8760: IndirectFieldDecl Type was not updated during template ↵Francois Pichet2010-12-091-1/+2
| | | | | | instantiation. llvm-svn: 121363
* Rename CXXExprWithTemporaries -> ExprWithCleanups; there's no theoreticalJohn McCall2010-12-061-1/+1
| | | | | | reason this is limited to C++, and it's certainly not limited to temporaries. llvm-svn: 120996
* More anonymous struct/union redesign. This one deals with anonymous field ↵Francois Pichet2010-12-041-10/+15
| | | | | | | | | | | | | | | | used in a constructor initializer list: struct X { X() : au_i1(123) {} union { int au_i1; float au_f1; }; }; clang will now deal with au_i1 explicitly as an IndirectFieldDecl. llvm-svn: 120900
* Added struct/class syntactic info for c++0x scoped enum.Abramo Bagnara2010-12-031-2/+2
| | | | llvm-svn: 120828
* Minor whitespace and comment fixes. No functionality change.Nico Weber2010-11-281-1/+1
| | | | llvm-svn: 120266
* Tie DefineVTablesUsed() in with recursive function instantiation so that we emitNick Lewycky2010-11-251-1/+10
| | | | | | | | | | a useful template instantiation stack. Fixes PR8640. This also causes a slight change to where the "instantianted from" note shows up in truly esoteric cases (see the change to test/SemaCXX/destructor.cpp), but that isn't directly the fault of this patch. llvm-svn: 120135
* Major anonymous union/struct redesign.Francois Pichet2010-11-211-0/+23
| | | | | | | | | | | A new AST node is introduced: def IndirectField : DDecl<Value>; IndirectFields are injected into the anonymous's parent scope and chain back to the original field. Name lookup for anonymous entities now result in an IndirectFieldDecl instead of a FieldDecl. There is no functionality change, the code generated should be the same. llvm-svn: 119919
* A bundle of whitespace changes, separated out from the functional changes.Nick Lewycky2010-11-201-5/+5
| | | | llvm-svn: 119886
* Instantiate class member template partial specialization declarationsDouglas Gregor2010-11-101-96/+26
| | | | | | | | | in the order they occur within the class template, delaying out-of-line member template partial specializations until after the class has been fully instantiated. This fixes a regression introduced by r118454 (itself a fix for PR8001). llvm-svn: 118704
* Don't lose track of previous-declarations when instantiating a class template.Nick Lewycky2010-11-081-1/+11
| | | | | | Fixes PR8001. llvm-svn: 118454
* Remove broken support for variadic templates, along with the variousDouglas Gregor2010-11-071-11/+11
| | | | | | | | | | | | | abstractions (e.g., TemplateArgumentListBuilder) that were designed to support variadic templates. Only a few remnants of variadic templates remain, in the parser (parsing template type parameter packs), AST (template type parameter pack bits and TemplateArgument::Pack), and Sema; these are expected to be used in a future implementation of variadic templates. But don't get too excited about that happening now. llvm-svn: 118385
* When searching for an instantiated declaration requires instantiationDouglas Gregor2010-11-051-0/+2
| | | | | | | | of its parent context, be sure to update the parent-context pointer after instantiation. Fixes two anonymous-union instantiation issues in <rdar://problem/8635664>. llvm-svn: 118313
* Preserve the template type parameter name when instantiating a templace.Nick Lewycky2010-10-301-1/+1
| | | | | | Fixes PR8489. llvm-svn: 117776
* No really, we don't have a retain/release system for statements/expressionsJohn McCall2010-10-261-1/+1
| | | | | | anymore. llvm-svn: 117357
* Parse attributes on enumerators and instantiate attributes on enum decls.John McCall2010-10-221-0/+4
| | | | llvm-svn: 117182
* Pass TInfo to CXXDestructorDecl::Create(), just like we do for otherCraig Silverstein2010-10-211-2/+1
| | | | | | | | function decls. Reviewed by rjmccall and nlewycky. llvm-svn: 116979
* When instantiating a dependently-scoped friend function declaration,John McCall2010-10-191-0/+3
| | | | | | we may need to complete the type before looking into it. llvm-svn: 116795
* Instantiate enclosing template parameter lists when instantiating friends.John McCall2010-10-191-0/+19
| | | | llvm-svn: 116789
* Redirect templated friend class decls to a new Sema callback andJohn McCall2010-10-191-0/+2
| | | | | | | construct an unsupported friend when there's a friend with a templated scope specifier. Fixes a consistency crash, rdar://problem/8540527 llvm-svn: 116786
* Implement C++0x scoped enumerations, from Daniel Wallin! (and tweaked aDouglas Gregor2010-10-081-1/+23
| | | | | | bit by me). llvm-svn: 116122
* Fix handling of dependent nested namespace specifiers in UsingDeclsDouglas Gregor2010-09-291-4/+20
| | | | | | during template instantiation, from Martin Vejnar! llvm-svn: 115051
* Reinstate r114925 and r114929, both steps towardDouglas Gregor2010-09-281-2/+1
| | | | | | <rdar://problem/8459981>. llvm-svn: 114984
* Temporarily revert 114929 114925 114924 114921. It looked like they (or at leastBill Wendling2010-09-281-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | one of them) was causing a series of failures: http://google1.osuosl.org:8011/builders/clang-x86_64-darwin10-selfhost/builds/4518 svn merge -c -114929 https://llvm.org/svn/llvm-project/cfe/trunk --- Reverse-merging r114929 into '.': U include/clang/Sema/Sema.h U include/clang/AST/DeclCXX.h U lib/Sema/SemaDeclCXX.cpp U lib/Sema/SemaTemplateInstantiateDecl.cpp U lib/Sema/SemaDecl.cpp U lib/Sema/SemaTemplateInstantiate.cpp U lib/AST/DeclCXX.cpp svn merge -c -114925 https://llvm.org/svn/llvm-project/cfe/trunk --- Reverse-merging r114925 into '.': G include/clang/AST/DeclCXX.h G lib/Sema/SemaDeclCXX.cpp G lib/AST/DeclCXX.cpp svn merge -c -114924 https://llvm.org/svn/llvm-project/cfe/trunk --- Reverse-merging r114924 into '.': G include/clang/AST/DeclCXX.h G lib/Sema/SemaDeclCXX.cpp G lib/Sema/SemaDecl.cpp G lib/AST/DeclCXX.cpp U lib/AST/ASTContext.cpp svn merge -c -114921 https://llvm.org/svn/llvm-project/cfe/trunk --- Reverse-merging r114921 into '.': G include/clang/AST/DeclCXX.h G lib/Sema/SemaDeclCXX.cpp G lib/Sema/SemaDecl.cpp G lib/AST/DeclCXX.cpp llvm-svn: 114933
* Centralize the management of CXXRecordDecl::DefinitionData'sDouglas Gregor2010-09-281-2/+1
| | | | | | | | | | | HasTrivialConstructor, HasTrivialCopyConstructor, HasTrivialCopyAssignment, and HasTrivialDestructor bits in CXXRecordDecl's methods. This completes all but the Abstract bit and the set of conversion functions, both of which will require a bit of extra work. The majority of <rdar://problem/8459981> is now implemented (but not all of it). llvm-svn: 114929
* When emitting a new-expression inside a conditional expression,John McCall2010-09-171-1/+2
| | | | | | | | | | | | | | | | the cleanup might not be dominated by the allocation code. In this case, we have to store aside all the delete arguments in case we need them later. There's room for optimization here in cases where we end up not actually needing the cleanup in different branches (or being able to pop it after the initialization code). Also make sure we only call this operator delete along the path where we actually allocated something. Fixes rdar://problem/8439196. llvm-svn: 114145
* Diagnose the instantiation of variables (including static dataDouglas Gregor2010-09-121-0/+6
| | | | | | members) with function type. Fixes PR8047. llvm-svn: 113723
* Eliminate the comma locations from all of the Sema routines that dealDouglas Gregor2010-09-091-17/+5
| | | | | | | | with comma-separated lists. We never actually used the comma locations, nor did we store them in the AST, but we did manage to waste time during template instantiation to produce fake locations. llvm-svn: 113495
* Fix PR7402 when it strikes via template instantiation.Chandler Carruth2010-09-031-0/+5
| | | | llvm-svn: 113019
* Rename DeclContext::getLookupContext to getRedeclContext and change its ↵Sebastian Redl2010-08-311-2/+2
| | | | | | semantics slightly. No functionality change in the absence of inline namespaces. Also, change a few places where inline namespaces actually make a difference to be prepared for them. llvm-svn: 112563
* When template substitution into a template parameter reduces the levelDouglas Gregor2010-08-301-6/+8
| | | | | | | | | | | | of that parameter, reduce the level by the number of active template argument lists rather than by 1. The number of active template argument lists is only > 1 when we have a class template partial specialization of a member template of a class template that itself is a member template of another class template. ... and Boost.MSM does this. Fixes PR7669. llvm-svn: 112551
* zap tabsGabor Greif2010-08-301-1/+1
| | | | llvm-svn: 112541
* fix dual aspect of PR8007,Gabor Greif2010-08-301-3/+19
| | | | | | | | | | namely when the friend function prototype is already used at the point of the template definition that is supposed to inject the friend function. Testcase verifies four scenarios. I would like receive some code review for this. llvm-svn: 112524
* simplify by relying on cascading operator->Gabor Greif2010-08-281-3/+3
| | | | llvm-svn: 112373
* simplifyGabor Greif2010-08-281-2/+3
| | | | llvm-svn: 112372
* One who seeks knowledge learns something new every day.John McCall2010-08-261-14/+12
| | | | | | | | | One who seeks the Tao unlearns something new every day. Less and less remains until you arrive at non-action. When you arrive at non-action, nothing will be left undone. llvm-svn: 112244
* Split out a header to hold APIs meant for the Sema implementation from Sema.h.John McCall2010-08-251-1/+1
| | | | | | | Clients of Sema don't need to know (for example) the list of diagnostics we support. llvm-svn: 112093
* Rename *PendingImplicitInstantiations to *PendingInstantiations. NoChandler Carruth2010-08-251-15/+15
| | | | | | functionality changed. llvm-svn: 112040
* Support explicit instantiation of function templates and members of classChandler Carruth2010-08-251-8/+24
| | | | | | | | | | | | | templates when only the declaration is in scope. This requires deferring the instantiation to be lazy, and ensuring the definition is required for that translation unit. We re-use the existing pending instantiation queue, previously only used to track implicit instantiations which were required to be lazy. Fixes PR7979. A subsequent change will rename *PendingImplicitInstantiations to *PendingInstatiations for clarity given its broader role. llvm-svn: 112037
* Move more stuff out of Sema.h.John McCall2010-08-251-6/+6
| | | | llvm-svn: 112026
* Struggle mightily against header inclusion in Sema.h.John McCall2010-08-241-0/+1
| | | | llvm-svn: 111904
* OwningExprResult -> ExprResult. This patch brought to you byJohn McCall2010-08-241-10/+8
| | | | | | | M-x query-replace-regexp \(Sema::\|Action::\|Parser::\|\)Owning\(Expr\|Stmt\)Result -> \2Result llvm-svn: 111903
* Kill off ExprArg (now just Expr*) and StmtArg (now just Stmt*).John McCall2010-08-231-8/+6
| | | | llvm-svn: 111863
* Sundry incremental steps towards killing off Action.John McCall2010-08-231-5/+5
| | | | llvm-svn: 111795
* DeclPtrTy -> Decl *John McCall2010-08-211-18/+15
| | | | llvm-svn: 111733
* Correctly instantiate templates with non-type template arguments thatJohn McCall2010-08-191-1/+1
| | | | | | are local externs. Fixes <rdar://problem/8302138>. llvm-svn: 111570
OpenPOWER on IntegriCloud