llvm-project/clang/lib/Lex
Amy Huang 6bdfe3aeba Fix for expanding __pragmas in macro arguments
Summary:
Avoid parsing __pragma into an annotation token when macro arguments are pre-expanded.
This is what clang currently does when parsing _Pragmas.

Fixes https://bugs.llvm.org/show_bug.cgi?id=41128, where clang crashed
when trying to get the length of an annotation token.

Subscribers: cfe-commits

Tags: #clang

Differential Revision: https://reviews.llvm.org/D68114

llvm-svn: 373950
2019-10-07 19:41:53 +00:00
..
CMakeLists.txt Add clang source minimizer that reduces source to directives 2019-06-03 22:59:17 +00:00
DependencyDirectivesSourceMinimizer.cpp [clang-scan-deps] Allow continuation line backslashes followed by whitespace 2019-09-26 19:28:51 +00:00
HeaderMap.cpp FileManager: Use llvm::Expected in new getFileRef API 2019-08-26 18:29:51 +00:00
HeaderSearch.cpp Fix -Wnonportable-include-path suppression for header maps with absolute paths. 2019-09-11 20:39:04 +00:00
Lexer.cpp [clang-scan-deps] add skip excluded conditional preprocessor block preprocessing optimization 2019-09-11 20:40:31 +00:00
LiteralSupport.cpp [CUDA][HIP] Do not diagnose use of _Float16 2019-01-29 13:20:23 +00:00
MacroArgs.cpp Remove cache for macro arg stringization 2019-07-30 17:58:22 +00:00
MacroInfo.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
ModuleMap.cpp [clang] Adopt new FileManager error-returning APIs 2019-08-01 21:31:56 +00:00
PPCaching.cpp [Lex] Allow to consume tokens while preprocessing 2019-05-17 09:32:05 +00:00
PPCallbacks.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
PPConditionalDirectiveRecord.cpp Change std::{lower,upper}_bound to llvm::{lower,upper}_bound or llvm::partition_point. NFC 2019-07-03 08:13:17 +00:00
PPDirectives.cpp Move normalization of `\` in #includes from -fms-compatibility to -fms-extensions 2019-09-26 17:19:22 +00:00
PPExpressions.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
PPLexerChange.cpp [NFCI]Create CommonAttributeInfo Type as base type of *Attr and ParsedAttr. 2019-09-13 17:39:31 +00:00
PPMacroExpansion.cpp Use FileEntryRef for PPCallbacks::HasInclude 2019-08-27 17:32:42 +00:00
Pragma.cpp Fix for expanding __pragmas in macro arguments 2019-10-07 19:41:53 +00:00
PreprocessingRecord.cpp Change std::{lower,upper}_bound to llvm::{lower,upper}_bound or llvm::partition_point. NFC 2019-07-03 08:13:17 +00:00
Preprocessor.cpp [clang-scan-deps] add skip excluded conditional preprocessor block preprocessing optimization 2019-09-11 20:40:31 +00:00
PreprocessorLexer.cpp Factor out repeated code parsing and concatenating header-names from 2019-03-19 01:51:19 +00:00
ScratchBuffer.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
TokenConcatenation.cpp [C++20] Implement context-sensitive header-name lexing and pp-import parsing in the preprocessor. 2019-04-11 21:18:23 +00:00
TokenLexer.cpp Remove cache for macro arg stringization 2019-07-30 17:58:22 +00:00
UnicodeCharSets.h clang: Fix typo in comment 2019-08-21 15:41:29 +00:00