[PATCH] D158413: [Lex] Introduce Preprocessor::LexAll()
Jonas Hahnfeld via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Aug 21 05:08:54 PDT 2023
Hahnfeld created this revision.
Hahnfeld added reviewers: hokein, aaron.ballman.
Herald added subscribers: kbarton, nemanjai.
Herald added a project: All.
Hahnfeld requested review of this revision.
Herald added a project: clang.
Herald added a subscriber: cfe-commits.
This new method repeatedly calls `Lex()` until end of file is reached and returns a `std::vector` of `Token`s. Use it in Clang's unit tests to avoid quite some code duplication.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D158413
Files:
clang/include/clang/Lex/Preprocessor.h
clang/lib/Lex/Preprocessor.cpp
clang/unittests/Analysis/MacroExpansionContextTest.cpp
clang/unittests/Basic/SourceManagerTest.cpp
clang/unittests/Lex/LexerTest.cpp
clang/unittests/Lex/ModuleDeclStateTest.cpp
clang/unittests/Lex/PPCallbacksTest.cpp
clang/unittests/Lex/PPConditionalDirectiveRecordTest.cpp
clang/unittests/Lex/PPDependencyDirectivesTest.cpp
clang/unittests/Lex/PPMemoryAllocationsTest.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D158413.551989.patch
Type: text/x-patch
Size: 8067 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20230821/08c8238b/attachment.bin>
More information about the cfe-commits
mailing list