summaryrefslogtreecommitdiffstats
path: root/clang/test/CXX/temp/temp.spec/temp.explicit/p5.cpp
Commit message (Collapse)AuthorAgeFilesLines
* [c++20] Implement P0846R0: allow (ADL-only) calls to template-ids whoseRichard Smith2019-05-091-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | 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
* Lit C++11 Compatibility Patch #7Charles Li2016-04-131-1/+8
| | | | | | | 13 tests have been updated for C++11 compatibility. Differential Revision: http://reviews.llvm.org/D19068 llvm-svn: 266239
* Make the -Wc++11-compat warnings ignored by default, so we don't breakDouglas Gregor2011-10-251-1/+1
| | | | | | | valid C++98/03 code. However, add these warnings to -Wall, for those who obviously already like clean code. llvm-svn: 142903
* The C++98/03 standard is disturbingly silent about out-of-scopeDouglas Gregor2010-05-111-1/+1
| | | | | | | | | | explicit instantiations of template. C++0x clarifies the intent (they're ill-formed in some cases; see [temp.explicit] for details). However, one could squint at the C++98/03 standard and conclude they are permitted, so reduce the error to a warning (controlled by -Wc++0x-compat) in C++98/03 mode. llvm-svn: 103482
* 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
* Improved fix for PR3844, which recovers better for class templateDouglas Gregor2009-10-301-1/+1
| | | | | | partial specializations and explicit instantiations of non-templates. llvm-svn: 85620
* Improve diagnostics when parsing something likeDouglas Gregor2009-10-301-2/+1
| | | | | | | | template<> struct foo<int> { ... }; where "foo" does not refer to a template. Fixes PR3844. llvm-svn: 85616
* Test various aspects of explicit instantiation that were already implemented.Douglas Gregor2009-10-271-0/+18
llvm-svn: 85243
OpenPOWER on IntegriCloud