summaryrefslogtreecommitdiffstats
path: root/clang/test/SemaTemplate/rdar9173693.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Remove redundant CXXScopeSpec from TemplateIdAnnotation.Richard Smith2020-01-241-5/+4
| | | | | | | | | | | | | | A TemplateIdAnnotation represents only a template-id, not a nested-name-specifier plus a template-id. Don't make a redundant copy of the CXXScopeSpec and store it on the template-id annotation. This slightly improves error recovery by more properly handling the case where we would form an invalid CXXScopeSpec while parsing a typename specifier, instead of accidentally putting the token stream into a broken "annot_template_id with a scope specifier, but with no preceding annot_cxxscope token" state. (cherry picked from commit a42fd84cff265b7e9faa3fe42885ee171393e4db)
* [c++20] Implement P0846R0: allow (ADL-only) calls to template-ids whoseRichard Smith2019-05-091-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | | template name is not visible to unqualified lookup. In order to support this without a severe degradation in our ability to diagnose typos in template names, this change significantly restructures the way we handle template-id-shaped syntax for which lookup of the template name finds nothing. Instead of eagerly diagnosing an undeclared template name, we now form a placeholder template-name representing a name that is known to not find any templates. When the parser sees such a name, it attempts to disambiguate whether we have a less-than comparison or a template-id. Any diagnostics or typo-correction for the name are delayed until its point of use. The upshot should be a small improvement of our diagostic quality overall: we now take more syntactic context into account when trying to resolve an undeclared identifier on the left hand side of a '<'. In fact, this works well enough that the backwards-compatible portion (for an undeclared identifier rather than a lookup that finds functions but no function templates) is enabled in all language modes. llvm-svn: 360308
* Revert "Improve declaration / expression disambiguation around ↵Justin Bogner2015-02-231-2/+2
| | | | | | | | | | | ptr-operators, and use" This seems to break mixing function-style and c-style casts, and is breaking bootstrapping llvm. This reverts r230261. llvm-svn: 230274
* Improve declaration / expression disambiguation around ptr-operators, and useRichard Smith2015-02-231-2/+2
| | | | | | | | the presence of an abstract declarator with a ptr-operator as proof that a construct cannot parse as an expression to improve diagnostics along error recovery paths. llvm-svn: 230261
* Fix a double free when parsing malformed code. Fixes rdar://9173693.Argyrios Kyrtzidis2011-05-031-0/+6
llvm-svn: 130775
OpenPOWER on IntegriCloud