summaryrefslogtreecommitdiffstats
path: root/clang/test/SemaTemplate/instantiate-function-params.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Use the appropriate SourceLocation for the template backtrace when doingNick Lewycky2014-01-111-3/+3
| | | | | | template argument deduction. llvm-svn: 198995
* Fix declaring class template methods with an attributed typedefReid Kleckner2013-07-311-3/+6
| | | | | | | | | | | | | | This change unifies the logic for template instantiation of methods and functions declared with typedefs. It ensures that SubstFunctionType() always fills the Params out param with non-null ParmVarDecls or returns null. Reviewers: rsmith Differential Revision: http://llvm-reviews.chandlerc.com/D1135 llvm-svn: 187528
* Use an i686 triple for this test now that it uses stdcallReid Kleckner2013-07-191-1/+3
| | | | | | | There seems to be a crash here if we have a calling convention attribute that gets ignored and then we instantiate templates. llvm-svn: 186719
* Create calling convention AttributedType sugar nodesReid Kleckner2013-07-191-0/+6
| | | | | | | | | | | | Canonical types are unchanged. The type printer had to be changed to avoid printing any non-default implicit calling convention as well as the calling convention attribute. Reviewers: rjmccall Differential Revision: http://llvm-reviews.chandlerc.com/D1132 llvm-svn: 186714
* When instantiating a function that was declared via a typedef, e.g.,Douglas Gregor2010-05-041-0/+12
| | | | | | | | | | | | | typedef int functype(int, int); functype func; also instantiate the synthesized function parameters for the resulting function declaration. With this change, Boost.Wave builds and passes all of its regression tests. llvm-svn: 103025
* Clean up our handling of local instantiation scopes, which keep trackDouglas Gregor2010-04-301-0/+23
| | | | | | | | | | | | | | | | | | | | | of the mapping from local declarations to their instantiated counterparts during template instantiation. Previously, we tried to do some unholy merging of local instantiation scopes that involved storing a single hash table along with an "undo" list on the side... which was ugly, and never handled function parameters properly. Now, we just keep separate hash tables for each local instantiation scope, and "combining" two scopes means that we'll look in each of the combined hash tables. The combined scope stack is rarely deep, and this makes it easy to avoid the "undo" issues we were hitting. Also, I've simplified the logic for function parameters: if we're declaring a function and we need the function parameters to live longer, we just push them back into the local instantiation scope where we need them. Fixes PR6990. llvm-svn: 102732
* When the qualifier of a id-expression is non-dependent but notDouglas Gregor2010-04-281-9/+8
| | | | | | | | | complete, return an error rather than falling back to building a dependent declaration reference, since we might not be in a dependent context. Fixes a fiendish crash-on-invalid in Boost.FunctionTypes that I wasn't able to reduce to anything useful. llvm-svn: 102491
* Make CXXScopeSpec invalid when incomplete, and propagate that into anyJeffrey Yasskin2010-04-081-2/+1
| | | | | | | Declarator that depends on it. This fixes several redundant errors and bad recoveries. llvm-svn: 100779
* Improve diagnostics when printing a template instantiation backtraceDouglas Gregor2010-03-301-1/+1
| | | | | | | | | | involving substitution of deduced template arguments into a class template partial specialization or function template, or when substituting explicitly-specific template arguments into a function template. We now print the actual deduced argument bindings so the user can see what got deduced. llvm-svn: 99923
* Add another test for weird substitutions into function types during template ↵Douglas Gregor2010-03-251-0/+13
| | | | | | argument deduction llvm-svn: 99510
* Improve our handling of local instantiation scopes in two related ways:Douglas Gregor2010-03-251-0/+11
| | | | | | | | | | | | | | | - When substituting template arguments as part of template argument deduction, introduce a new local instantiation scope. - When substituting into a function prototype type, introduce a new "temporary" local instantiation scope that merges with its outer scope but also keeps track of any additions it makes, removing them when we exit that scope. Fixes PR6700, where we were getting too much mixing of local instantiation scopes due to template argument deduction that substituted results into function types. llvm-svn: 99509
* Each non-local class instantiation is its own local instantiationDouglas Gregor2010-03-241-0/+33
scope. Fixes PR6619. llvm-svn: 99377
OpenPOWER on IntegriCloud