llvm-project/clang/lib
Richard Smith 6163aa9679 PR45239: Don't deallocate TemplateIdAnnotations if they might still be
in the token stream.

Previously we deleted all template-id annotations at the end of each
top-level declaration. That doesn't work: we can do some lookahead and
form a template-id annotation, and then roll back that lookahead, parse,
and decide that we're missing a semicolon at the end of a top-level
declaration, before we reach the annotation token. In that situation,
we'd end up parsing the annotation token after deleting its associated
data, leading to various forms of badness.

We now only delete template-id annotations if the preprocessor can
assure us that there are no annotation tokens left in the token stream
(or if we're already at EOF). This lets us delete the annotation tokens
earlier in a lot of cases; we now clean them up at the end of each
statement and class member, not just after each top-level declaration.
This also permitted some simplification of the delay-parsed templates
cleanup code.
2020-04-05 23:23:20 -07:00
..
ARCMigrate Avoid SourceManager.h include in RawCommentList.h, add missing incs 2020-02-27 13:49:40 -08:00
AST [OpenMP][NFCI] Move OpenMP clause information to `lib/Frontend/OpenMP` 2020-04-05 22:30:29 -05:00
ASTMatchers [OpenMP][NFC] Move and simplify directive -> allowed clause mapping 2020-04-06 00:04:08 -05:00
Analysis [OpenMP][NFCI] Move OpenMP clause information to `lib/Frontend/OpenMP` 2020-04-05 22:30:29 -05:00
Basic [OpenMP][NFC] Move and simplify directive -> allowed clause mapping 2020-04-06 00:04:08 -05:00
CodeGen [OpenMP][NFCI] Move OpenMP clause information to `lib/Frontend/OpenMP` 2020-04-05 22:30:29 -05:00
CrossTU [clang] Replace SmallStr.str().str() with std::string conversion operator. 2020-01-29 21:27:46 -08:00
DirectoryWatcher Add missing newlines at EOF; NFC 2020-02-12 15:57:25 +00:00
Driver Revert "[X86] Add a Pass that builds a Condensed CFG for Load Value Injection (LVI) Gadgets" 2020-04-03 16:56:08 -07:00
Edit [C++2a] Add __builtin_bit_cast, used to implement std::bit_cast 2019-07-02 18:28:13 +00:00
Format clang-format: [JS] detect C++ keywords. 2020-04-03 14:23:56 +02:00
Frontend [clang] Move branch-protection from CodeGenOptions to LangOptions 2020-04-02 10:31:52 +02:00
FrontendTool [llvm][clang][IFS] Enhancing the llvm-ifs yaml format for symbol lists. 2020-04-01 10:49:06 -04:00
Headers [X86] Add SERIALIZE instruction. 2020-04-02 16:19:23 +08:00
Index Avoid including FileManager.h from SourceManager.h 2020-03-11 13:53:12 -07:00
Lex [CodeComplete] Don't replace the rest of line in #include completion. 2020-03-26 11:03:04 +01:00
Parse PR45239: Don't deallocate TemplateIdAnnotations if they might still be 2020-04-05 23:23:20 -07:00
Rewrite [Rewrite][NFC] Add FIXMEs and tests for RemoveLineIfEmpty bug 2019-08-15 21:17:48 +00:00
Sema [OpenMP][NFCI] Move OpenMP clause information to `lib/Frontend/OpenMP` 2020-04-05 22:30:29 -05:00
Serialization [OpenMP][NFCI] Move OpenMP clause information to `lib/Frontend/OpenMP` 2020-04-05 22:30:29 -05:00
StaticAnalyzer [OpenMP][NFCI] Move OpenMP clause information to `lib/Frontend/OpenMP` 2020-04-05 22:30:29 -05:00
Tooling [OpenMP][NFC] Move and simplify directive -> allowed clause mapping 2020-04-06 00:04:08 -05:00
CMakeLists.txt Reland [clang] DirectoryWatcher 2019-07-12 20:34:10 +00:00