llvm-project/clang/lib/Parse
Sam McCall 05ed3efc2a Handle delayed-template-parsing functions imported into a non-dtp TU
Summary:
DelayedTemplateParsing is marked as BENIGN_LANGOPT, so we are allowed to
use a delayed template in a non-delayed TU.
(This is clangd's default configuration on windows: delayed-template-parsing
is on for the preamble and forced off for the current file)

However today clang fails to parse implicit instantiations in a non-dtp
TU of templates defined in a dtp PCH file (and presumably module?).
In this case the delayed parser is not registered, so the function is
simply marked "delayed" again. We then hit an assert:
end of TU template instantiation should not create more late-parsed templates

Reviewers: rsmith

Subscribers: ilya-biryukov, usaxena95, cfe-commits, kadircet

Tags: #clang

Differential Revision: https://reviews.llvm.org/D81474
2020-06-12 16:09:38 +02:00
..
CMakeLists.txt [OpenMP][NFCI] Introduce llvm/IR/OpenMPConstants.h 2019-12-10 00:10:09 -06:00
ParseAST.cpp [Support] Add TimeTraceScope constructor without detail arg 2019-12-11 14:32:21 +00:00
ParseCXXInlineMethods.cpp Improve recovery from invalid template-ids. 2020-03-27 17:11:04 -07:00
ParseDecl.cpp PR46255: Fix field diagnostics for C records with anonymous members. 2020-06-09 12:27:44 -07:00
ParseDeclCXX.cpp PR46255: Fix field diagnostics for C records with anonymous members. 2020-06-09 12:27:44 -07:00
ParseExpr.cpp [ARM] Add __bf16 as new Bfloat16 C Type 2020-06-05 10:32:43 +01:00
ParseExprCXX.cpp [clang][NFC] Remove two hard-coded lists of ArrayTypeTrait and ExpressionTrait 2020-06-11 20:27:40 +01:00
ParseInit.cpp [clang][CodeComplete] Support for designated initializers 2020-01-28 16:34:15 +01:00
ParseObjc.cpp [NFC] Refactoring PropertyAttributeKind for ObjCPropertyDecl and ObjCDeclSpec. 2020-04-23 17:21:25 -04:00
ParseOpenMP.cpp [OPENMP50]Initial support for use_device_addr clause. 2020-05-27 11:35:31 -04:00
ParsePragma.cpp Add begin source location for the attributed statement created from PragmaLoopHint decorated loop 2020-06-09 10:08:40 -07:00
ParseStmt.cpp Add begin source location for the attributed statement created from PragmaLoopHint decorated loop 2020-06-09 10:08:40 -07:00
ParseStmtAsm.cpp [clang][asm goto][slh] Warn if asm goto + SLH 2020-05-20 09:46:18 -07:00
ParseTemplate.cpp C++2a -> C++20 in some identifiers; NFC. 2020-04-21 15:37:19 -04:00
ParseTentative.cpp [ARM] Add __bf16 as new Bfloat16 C Type 2020-06-05 10:32:43 +01:00
Parser.cpp Handle delayed-template-parsing functions imported into a non-dtp TU 2020-06-12 16:09:38 +02:00