summaryrefslogtreecommitdiffstats
path: root/clang/test/SemaTemplate/temp.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Fix implementation of [temp.local]p4.Richard Smith2019-02-151-4/+35
| | | | | | | | | | | | | | | | | | | | | | | | When a template-name is looked up, we need to give injected-class-name declarations of class templates special treatment, as they denote a template rather than a type. Previously we achieved this by applying a filter to the lookup results after completing name lookup, but that is incorrect in various ways, not least of which is that it lost all information about access and how members were named, and the filtering caused us to generally lose all ambiguity errors between templates and non-templates. We now preserve the lookup results exactly, and the few places that need to map from a declaration found by name lookup into a declaration of a template do so explicitly. Deduplication of repeated lookup results of the same injected-class-name declaration is done by name lookup instead of after the fact. This reinstates r354091, which was previously reverted in r354097 because it exposed bugs in lldb and compiler-rt. Those bugs were fixed in r354173 and r354174 respectively. llvm-svn: 354176
* Revert "Fix implementation of [temp.local]p4."Francis Visoiu Mistrih2019-02-151-35/+4
| | | | | | | | | This reverts commit 40bd10b770813bd1471d46f514545437516aa4ba. This seems to now emit an error when building the sanitizer tests: http://green.lab.llvm.org/green/job/clang-stage1-configure-RA/53965/consoleFull. llvm-svn: 354097
* Fix implementation of [temp.local]p4.Richard Smith2019-02-151-4/+35
| | | | | | | | | | | | | | | | | | | | When a template-name is looked up, we need to give injected-class-name declarations of class templates special treatment, as they denote a template rather than a type. Previously we achieved this by applying a filter to the lookup results after completing name lookup, but that is incorrect in various ways, not least of which is that it lost all information about access and how members were named, and the filtering caused us to generally lose all ambiguity errors between templates and non-templates. We now preserve the lookup results exactly, and the few places that need to map from a declaration found by name lookup into a declaration of a template do so explicitly. Deduplication of repeated lookup results of the same injected-class-name declaration is done by name lookup instead of after the fact. llvm-svn: 354091
* If filtering a lookup result leaves it ambiguous, keep the ambiguity John McCall2010-08-281-2/+16
| | | | | | kind. Fixes PR7252. llvm-svn: 112383
* Update tests to use %clang_cc1 instead of 'clang-cc' or 'clang -cc1'.Daniel Dunbar2009-12-151-1/+1
| | | | | | | | | - This is designed to make it obvious that %clang_cc1 is a "test variable" which is substituted. It is '%clang_cc1' instead of '%clang -cc1' because it can be useful to redefine what gets run as 'clang -cc1' (for example, to set a default target). llvm-svn: 91446
* Parser::ParseDeclarationOrFunctionDefinition no longer needs to acceptDouglas Gregor2009-05-121-0/+3
| | | | | | template parameters. llvm-svn: 71598
* Refactor the parsing of declarations so that template declarations canDouglas Gregor2009-05-121-0/+2
parse just a single declaration and provide a reasonable diagnostic when the "only one declarator per template declaration" rule is violated. This eliminates some ugly, ugly hackery where we used to require thatn the layout of a DeclGroup of a single element be the same as the layout of a single declaration. llvm-svn: 71596
OpenPOWER on IntegriCloud