[all-commits] [llvm/llvm-project] 3116d6: [Lex] Introduce Preprocessor::LexTokensUntilEOF()

Jonas Hahnfeld via All-commits all-commits at lists.llvm.org
Thu Oct 5 02:04:50 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 3116d60494f219bfcb284d05d9ebed5b6c196ca5
      https://github.com/llvm/llvm-project/commit/3116d60494f219bfcb284d05d9ebed5b6c196ca5
  Author: Jonas Hahnfeld <jonas.hahnfeld at cern.ch>
  Date:   2023-10-05 (Thu, 05 Oct 2023)

  Changed paths:
    M clang/include/clang/Lex/Preprocessor.h
    M clang/lib/Lex/Preprocessor.cpp
    M clang/unittests/Analysis/MacroExpansionContextTest.cpp
    M clang/unittests/Basic/SourceManagerTest.cpp
    M clang/unittests/Lex/LexerTest.cpp
    M clang/unittests/Lex/ModuleDeclStateTest.cpp
    M clang/unittests/Lex/PPCallbacksTest.cpp
    M clang/unittests/Lex/PPConditionalDirectiveRecordTest.cpp
    M clang/unittests/Lex/PPDependencyDirectivesTest.cpp
    M clang/unittests/Lex/PPMemoryAllocationsTest.cpp

  Log Message:
  -----------
  [Lex] Introduce Preprocessor::LexTokensUntilEOF()

This new method repeatedly calls Lex() until end of file is reached
and optionally fills a std::vector of Tokens. Use it in Clang's unit
tests to avoid quite some code duplication.

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




More information about the All-commits mailing list