[C++20] [Modules] [NFC] Add Preprocessor methods for named modules - for ClangScanDep...
authorChuanqi Xu <yedeng.yd@linux.alibaba.com>
Fri, 10 Feb 2023 02:11:33 +0000 (10:11 +0800)
committerChuanqi Xu <yedeng.yd@linux.alibaba.com>
Fri, 10 Feb 2023 02:11:36 +0000 (10:11 +0800)
commit6470706bc0ed2425704bc8c9e121a72e2d272616
treee59b12342212760e8ef17bf001aaf0dd8d8571c3
parentad81d019a62d33e5d1f232844b83d3e164e4b160
[C++20] [Modules] [NFC] Add Preprocessor methods for named modules - for ClangScanDeps (1/4)

This patch prepares the necessary interfaces in the preprocessor part
for D137527 since we need to recognize if we're in a module unit, the
module kinds and the module declaration and the module we're importing
in the preprocessor.

Differential Revision: https://reviews.llvm.org/D137526
clang/include/clang/Lex/Preprocessor.h
clang/lib/Lex/Preprocessor.cpp
clang/unittests/Lex/CMakeLists.txt
clang/unittests/Lex/ModuleDeclStateTest.cpp [new file with mode: 0644]