llvm-project/clang/lib
Richard Smith b23c5e8c3d [c++20] Implement P0846R0: allow (ADL-only) calls to template-ids whose
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
2019-05-09 03:31:27 +00:00
..
ARCMigrate Recommit r359859 "[Attribute/Diagnostics] Print macro if definition is an attribute declaration" 2019-05-07 03:20:17 +00:00
AST [c++20] Implement P0846R0: allow (ADL-only) calls to template-ids whose 2019-05-09 03:31:27 +00:00
ASTMatchers Added an AST matcher for declarations that are in the `std` namespace 2019-05-03 12:50:00 +00:00
Analysis [c++20] Implement P1009R2: allow omitting the array bound in an array 2019-05-06 03:47:15 +00:00
Basic [clang] Fix a bug that reports UTF32 (LE) files as UTF16 (LE) ones 2019-05-08 13:49:17 +00:00
CodeGen [COFF] Use COFF stubs for extern_weak functions 2019-05-07 23:06:21 +00:00
CrossTU [analyzer][CrossTU] Extend CTU to VarDecls with initializer 2019-04-23 11:04:41 +00:00
Driver [OpenMP][Clang] Support for target math functions 2019-05-08 15:52:33 +00:00
Edit Range-style std::find{,_if} -> llvm::find{,_if}. NFC 2019-03-31 08:48:19 +00:00
Format [clang-format] Fix bug in block comment reflow that joins * and / 2019-05-03 23:15:40 +00:00
Frontend Revert r359949 "[clang] adding explicit(bool) from c++2a" 2019-05-06 09:51:10 +00:00
FrontendTool [analyzer] Don't display implementation checkers under -analyzer-checker-help, but do under the new flag -analyzer-checker-help-hidden 2019-05-01 19:56:47 +00:00
Headers Revert Include corecrt.h in stddef.h and vcruntime.h in stdarg.h to improve MS compatibility. 2019-05-08 22:01:20 +00:00
Index Use llvm::stable_sort 2019-04-24 14:43:05 +00:00
Lex -frewrite-imports: Add support for wildcard rules in umbrella modules with 2019-05-07 21:38:51 +00:00
Parse [c++20] Implement P0846R0: allow (ADL-only) calls to template-ids whose 2019-05-09 03:31:27 +00:00
Rewrite Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
Sema [c++20] Implement P0846R0: allow (ADL-only) calls to template-ids whose 2019-05-09 03:31:27 +00:00
Serialization [c++20] Implement P0846R0: allow (ADL-only) calls to template-ids whose 2019-05-09 03:31:27 +00:00
StaticAnalyzer [analyzer] Fix a crash when doing RVO from within blocks. 2019-05-07 22:33:13 +00:00
Tooling [Tooling] Add -x flags when inferring compile commands for files with no/invalid extension. 2019-05-07 14:34:06 +00:00
CMakeLists.txt Add Cross Translation Unit support library 2017-09-22 11:11:01 +00:00