llvm-project/clang/unittests/Lex
Kadir Cetinkaya 411a254af3
[clang] Make sure argument expansion locations are correct in presence of predefined buffer
Summary:
Macro argument expansion logic relies on skipping file IDs that created
as a result of an include. Unfortunately it fails to do that for
predefined buffer since it doesn't have a valid insertion location.

As a result of that any file ID created for an include inside the
predefined buffers breaks the traversal logic in
SourceManager::computeMacroArgsCache.

To fix this issue we first record number of created FIDs for predefined
buffer, and then skip them explicitly in source manager.

Another solution would be to just give predefined buffers a valid source
location, but it is unclear where that should be..

Reviewers: sammccall

Subscribers: cfe-commits

Tags: #clang

Differential Revision: https://reviews.llvm.org/D78649
2020-04-22 21:01:52 +02:00
..
CMakeLists.txt cmake: Add CLANG_LINK_CLANG_DYLIB option 2019-07-03 22:45:55 +00:00
DependencyDirectivesSourceMinimizerTest.cpp [clang-scan-deps] do not skip empty #if/#elif in the minimizer to avoid missing `__has_include` dependencies 2019-12-02 18:47:22 -08:00
HeaderMapTest.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
HeaderSearchTest.cpp Introduce a DirectoryEntryRef that stores both a reference and an 2019-08-31 01:26:04 +00:00
LexerTest.cpp [clang] Make sure argument expansion locations are correct in presence of predefined buffer 2020-04-22 21:01:52 +02:00
PPCallbacksTest.cpp Introduce a DirectoryEntryRef that stores both a reference and an 2019-08-31 01:26:04 +00:00
PPConditionalDirectiveRecordTest.cpp Modules: Rename MemoryBufferCache to InMemoryModuleCache 2019-03-09 17:33:56 +00:00