summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema/SemaTemplateInstantiateDecl.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* Include the unexpanded packs in the initializer expression when checking aNick Lewycky2013-06-131-1/+2
| | | | | | pack expanded constructor initializer list. Fixes PR16303! llvm-svn: 183878
* Use FPT::getArgTypes() instead of manually building ArrayRefsReid Kleckner2013-06-101-13/+5
| | | | | | | | Made significantly easier with git-clang-format. Differential Revision: http://llvm-reviews.chandlerc.com/D947 llvm-svn: 183694
* reverted testLarisse Voufo2013-06-101-1/+0
| | | | llvm-svn: 183637
* testLarisse Voufo2013-06-101-0/+1
| | | | llvm-svn: 183636
* PR16243: Use CXXThisOverride during template instantiation, and fix up theRichard Smith2013-06-071-3/+9
| | | | | | | | places which weren't setting it up properly. This allows us to get the right cv-qualifiers for 'this' when it appears outside a method body in a class template. llvm-svn: 183483
* PR15757: When we instantiate an inheriting constructor template, alsoRichard Smith2013-05-171-1/+27
| | | | | | | | | instantiate the inherited constructor template and mark that as the constructor which the instantiated specialization is inheriting. This fixes a crash-on-valid when trying to compute the exception specification of a specialization of the inheriting constructor. llvm-svn: 182072
* OpenMP threadprivate with qualified names.Alexey Bataev2013-05-131-4/+4
| | | | llvm-svn: 181683
* In VarDecl nodes, store the thread storage class specifier as written.Enea Zaffanella2013-05-041-1/+1
| | | | llvm-svn: 181113
* Implement most of N3638 (return type deduction for normal functions).Richard Smith2013-05-041-5/+7
| | | | | | | Missing (somewhat ironically) is support for the new deduction rules in lambda functions, plus PCH support for return type patching. llvm-svn: 181108
* ArrayRef'ize MultiLevelTemplateArgumentList::ArgList. Patch by Faisal Vali!Richard Smith2013-05-031-14/+11
| | | | llvm-svn: 181077
* ArrayRef'ize Sema::ActOnEnumBody. No functionality change.Dmitri Gribenko2013-04-271-1/+1
| | | | | | Patch by Robert Wilhelm. llvm-svn: 180682
* Basic support for Microsoft property declarations andJohn McCall2013-04-161-0/+47
| | | | | | | | references thereto. Patch by Tong Shen! llvm-svn: 179585
* Correctly propagate the storage class to function template instantiations.Rafael Espindola2013-04-161-1/+1
| | | | | | | This fixes pr15753. This is another case of the fuzzy definition of the "as written" storage class of an instantiation. llvm-svn: 179581
* Fix the storage class of method instantiations.Rafael Espindola2013-04-151-2/+2
| | | | | | | | | We keep the "as written" storage class, but that is a fuzzy concept for instantiations. With this patch instantiations of methods of class templates now get a storage class that is based on the semantics of isStatic(). With this can simplify isStatic() itself. llvm-svn: 179521
* Annotate flavor of TLS variable (statically or dynamically initialized) onto ↵Richard Smith2013-04-131-1/+1
| | | | | | the AST. llvm-svn: 179447
* C++11 inheriting constructors: support for inheriting constructor templates.Richard Smith2013-04-101-4/+8
| | | | llvm-svn: 179151
* Add 178663 back.Rafael Espindola2013-04-031-5/+3
| | | | | | | | | | | http://lab.llvm.org:8011/builders/clang-x86_64-darwin10-gdb went back green before it processed the reverted 178663, so it could not have been the culprit. Revert "Revert 178663." This reverts commit 4f8a3eb2ce5d4ba422483439e20c8cbb4d953a41. llvm-svn: 178682
* Revert 178663.Rafael Espindola2013-04-031-3/+5
| | | | | | | | | | Looks like it broke http://lab.llvm.org:8011/builders/clang-x86_64-darwin10-gdb Revert "Don't compute a patched/semantic storage class." This reverts commit 8f187f62cb0487d31bc4afdfcd47e11fe9a51d05. llvm-svn: 178681
* Don't compute a patched/semantic storage class.Rafael Espindola2013-04-031-5/+3
| | | | | | | | | | | For variables and functions clang used to store two storage classes. The one "as written" in the code and a patched one, which, for example, propagates static to the following decls. This apparently is from the days clang lacked linkage computation. It is now redundant and this patch removes it. llvm-svn: 178663
* OpenMP threadprivate directive parsing and semantic analysisAlexey Bataev2013-03-221-0/+17
| | | | llvm-svn: 177705
* Add TagDecl::hasNameForLinkage(), which is true if the tagJohn McCall2013-03-091-1/+1
| | | | | | is non-anonymous or is defined in a typedef of itself. llvm-svn: 176742
* <rdar://problem/13094134> Don't try to wire up typedef names for invalid ↵Douglas Gregor2013-03-081-1/+1
| | | | | | anonymous tag declarations encountered during template instantiation. llvm-svn: 176727
* ArrayRef-ize ASTContext::getFunctionType and Sema::BuildFunctionType.Jordan Rose2013-03-081-8/+8
| | | | | | No (intended) functionality change. llvm-svn: 176726
* In Sema::InstantiateStaticDataMemberDefinition, pass the var decl to the ↵Argyrios Kyrtzidis2013-02-241-3/+13
| | | | | | | | | | | | consumer just using ASTConsumer::HandleCXXStaticMemberVarInstantiation(), don't pass it with ASTConsumer::HandleTopLevelDecl. ASTConsumer::HandleTopLevelDecl is intended for user-written top-level decls; a consumer can treat an instantiated static data member however it wants of course. llvm-svn: 175976
* Handle alignas(foo...) pack expansions.Richard Smith2013-02-221-23/+63
| | | | llvm-svn: 175875
* Implement C++11 [dcl.align]p6-p8, and C11 6.7.5/7. This had to be split out ofRichard Smith2013-02-221-4/+5
| | | | | | | | the normal attribute-merging path, because we can't merge alignment attributes without knowing the complete set of alignment attributes which apply to a particular declaration. llvm-svn: 175861
* Use None rather than Optional<T>() where possible.David Blaikie2013-02-211-3/+2
| | | | llvm-svn: 175705
* Include llvm::Optional in clang/Basic/LLVM.hDavid Blaikie2013-02-201-8/+8
| | | | | | Post-commit CR feedback from Jordan Rose regarding r175594. llvm-svn: 175679
* Replace TypeLoc llvm::cast support to be well-defined.David Blaikie2013-02-181-13/+12
| | | | | | | | | | | | | | The TypeLoc hierarchy used the llvm::cast machinery to perform undefined behavior by casting pointers/references to TypeLoc objects to derived types and then using the derived copy constructors (or even returning pointers to derived types that actually point to the original TypeLoc object). Some context is in this thread: http://lists.cs.uiuc.edu/pipermail/llvmdev/2012-December/056804.html Though it's spread over a few months which can be hard to read in the mail archive. llvm-svn: 175462
* Implement [dcl.align]p5 and C11 6.7.5/4: alignas cannot underalign.Richard Smith2013-02-011-0/+6
| | | | | | Also support alignas(0), which C++11 and C11 require us to ignore. llvm-svn: 174157
* [Sema][Attr]Fix alignment attribute printing.Michael Han2013-02-011-3/+1
| | | | | | | | | Remove "IsMSDeclspec" argument from Align attribute since the arguments in Attr.td should only model those appear in source code. Introduce attribute Accessor, and teach TableGen to generate syntax kind accessors for Align attribute, and use those accessors to decide if an alignment attribute is a declspec attribute. llvm-svn: 174133
* Propagate the spelling list index for an attribute across template ↵Richard Smith2013-01-291-3/+5
| | | | | | instantiation. llvm-svn: 173768
* Clean up: since we have FunctionDecl::IsInline, make it store the right valueRichard Smith2013-01-251-0/+9
| | | | | | | | | | | | for template instantiations, and use it to simplify the implementation of FunctionDecl::isInlined(). This incidentally changes the result of isInlined on a declared-but-not-defined non-inline member function from true to false. This is sort of a bug fix, but currently isInlined is only called on function definitions, so it has no visible effects. llvm-svn: 173397
* ArrayRef-ize some ctor initializer related APIsDavid Blaikie2013-01-171-1/+1
| | | | llvm-svn: 172701
* s/CPlusPlus0x/CPlusPlus11/gRichard Smith2013-01-021-8/+8
| | | | llvm-svn: 171367
* PR13470: Ensure that copy-list-initialization isntantiates asRichard Smith2012-12-191-39/+0
| | | | | | | | | | | | copy-list-initialization (and doesn't add an additional copy step): Fill in the ListInitialization bit when creating a CXXConstructExpr. Use it when instantiating initializers in order to correctly handle instantiation of copy-list-initialization. Teach TreeTransform that function arguments are initializations, and so need this special treatment too. Finally, remove some hacks which were working around SubstInitializer's shortcomings. llvm-svn: 170489
* Change DeclContextLookup(Const)Result to (Mutable)ArrayRef<NamedDecl*>, as ↵David Blaikie2012-12-191-7/+7
| | | | | | | | | | | | | | | per review discussion in r170365 This does limit these typedefs to being sequences, but no current usage requires them to be contiguous (we could expand this to a more general iterator pair range concept at some point). Also, it'd be nice if SmallVector were constructible directly from an ArrayRef but this is a bit tricky since ArrayRef depends on SmallVectorBaseImpl for the inverse conversion. (& generalizing over all range-like things, while nice, would require some nontrivial SFINAE I haven't thought about yet) llvm-svn: 170482
* PR14558: Compute triviality of special members (etc) at the end of the classRichard Smith2012-12-111-15/+14
| | | | | | | | | definition, rather than at the end of the definition of the set of nested classes. We still defer checking of the user-specified exception specification to the end of the nesting -- we can't check that until we've parsed the in-class initializers for non-static data members. llvm-svn: 169805
* Properly compute triviality for explicitly-defaulted or deleted special members.Richard Smith2012-12-081-10/+3
| | | | | | | | | | | | | | Remove pre-standard restriction on explicitly-defaulted copy constructors with 'incorrect' parameter types, and instead just make those special members non-trivial as the standard requires. This required making CXXRecordDecl correctly handle classes which have both a trivial and a non-trivial special member of the same kind. This also fixes PR13217 by reimplementing DiagnoseNontrivial in terms of the new triviality computation technology. llvm-svn: 169667
* Sort all of Clang's files under 'lib', and fix up the broken headersChandler Carruth2012-12-041-3/+3
| | | | | | | | | | | | | uncovered. This required manually correcting all of the incorrect main-module headers I could find, and running the new llvm/utils/sort_includes.py script over the files. I also manually added quite a few missing headers that were uncovered by shuffling the order or moving headers up to be main-module-headers. llvm-svn: 169237
* Store this Decl* as a Decl* instead of a uintptr_t. No functionality change.Nick Lewycky2012-11-161-2/+2
| | | | llvm-svn: 168145
* s/tranform/transform/Benjamin Kramer2012-11-141-1/+1
| | | | llvm-svn: 167929
* Ugly ugly hack for libstdc++-4.6 and libstdc++-4.7 compatibility. TheseRichard Smith2012-10-231-0/+16
| | | | | | | | | | | | | | | | | libraries have an incorrect definition of std::common_type (inherited from a bug in the standard -- see LWG issue 2141), whereby they produce reference types when they should not. If we instantiate a typedef named std::common_type<...>::type, which is defined in a system header as decltype(... ? ... : ...), and the decltype produces a reference type, convert it to the non-reference type. (This doesn't affect any LWG2141-conforming implementation of common_type, such as libc++'s, because the default implementation of common_type<...>::type isn't supposed to produce a reference type.) This is horrible. I'm really sorry. :( Better ideas appreciated! llvm-svn: 166455
* Fixed instantiated operators source range.Abramo Bagnara2012-10-041-1/+1
| | | | llvm-svn: 165258
* Don't produce diagnostics for missing ctor-initializers during templateRichard Smith2012-09-251-1/+1
| | | | | | instantiations if we encountered errors parsing some of the initializers. llvm-svn: 164578
* Per C++11 [class.friend]p3, the 'friend' keyword must appear first in aRichard Smith2012-09-201-1/+1
| | | | | | non-function friend declaration. Patch by Josh Magee! llvm-svn: 164273
* Actually rebuild function types properly when adjusting the functionDouglas Gregor2012-09-131-4/+13
| | | | | | type of an instantiation. llvm-svn: 163848
* When we substitute into the type of a function based on theDouglas Gregor2012-09-131-2/+17
| | | | | | | | TypeSourceInfo, we may have lost some adjustments made to the type of that function due to declaration merging. Adjust the resulting type correspondingly. Fixes PR12948 / <rdar://problem/11552434>. llvm-svn: 163845
* PR13811: Add a FunctionParmPackExpr node to handle references to functionRichard Smith2012-09-121-1/+2
| | | | | | | parameter packs where the reference is not being expanded but the pack has been. Previously, Clang would segfault in such cases. llvm-svn: 163672
* PR9023: A template template parameter whose template parameter list contains anRichard Smith2012-09-071-7/+101
| | | | | | | | | | | | | unexpanded parameter pack is a pack expansion. Thus, as with a non-type template parameter which is a pack expansion, it needs to be expanded early into a fixed list of template parameters. Since the expanded list of template parameters is not itself a parameter pack, it is permitted to appear before the end of the template parameter list, so also remove that restriction (for both template template parameter pack expansions and non-type template parameter pack expansions). llvm-svn: 163369
OpenPOWER on IntegriCloud