Revert "Revert "Revert "[clang][pp] adds '#pragma include_instead'"""
authorChristopher Di Bella <cjdb@google.com>
Sat, 16 Apr 2022 00:22:43 +0000 (00:22 +0000)
committerChristopher Di Bella <cjdb@google.com>
Fri, 22 Apr 2022 16:37:20 +0000 (16:37 +0000)
commite9a902c7f755a378e197c4b246a32859c0ee162d
tree4b199331885dcdfc1d575b342623d1ae40688e39
parent98db7ea262879bcb2a6430e1d5290c8e18890ec1
Revert "Revert "Revert "[clang][pp] adds '#pragma include_instead'"""

> Includes regression test for problem noted by @hans.
> is reverts commit 973de71.
>
> Differential Revision: https://reviews.llvm.org/D106898

Feature implemented as-is is fairly expensive and hasn't been used by
libc++. A potential reimplementation is possible if libc++ become
interested in this feature again.

Differential Revision: https://reviews.llvm.org/D123885
26 files changed:
clang-tools-extra/clangd/Selection.cpp
clang-tools-extra/pseudo/lib/Lex.cpp
clang/include/clang/Basic/DiagnosticLexKinds.td
clang/include/clang/Basic/SourceManager.h
clang/include/clang/Lex/HeaderSearch.h
clang/include/clang/Lex/Lexer.h
clang/include/clang/Lex/Preprocessor.h
clang/include/clang/Lex/PreprocessorLexer.h
clang/lib/Frontend/Rewrite/RewriteModernObjC.cpp
clang/lib/Lex/Lexer.cpp
clang/lib/Lex/PPDirectives.cpp
clang/lib/Lex/PPLexerChange.cpp
clang/lib/Lex/Pragma.cpp
clang/test/PCH/ms-pch-macro-include_instead-regression.c [deleted file]
clang/test/Preprocessor/Inputs/include_instead/bad-syntax.h [deleted file]
clang/test/Preprocessor/Inputs/include_instead/file-not-found.h [deleted file]
clang/test/Preprocessor/Inputs/include_instead/non-system-header.h [deleted file]
clang/test/Preprocessor/Inputs/include_instead/private-x.h [deleted file]
clang/test/Preprocessor/Inputs/include_instead/private1.h [deleted file]
clang/test/Preprocessor/Inputs/include_instead/private2.h [deleted file]
clang/test/Preprocessor/Inputs/include_instead/private3.h [deleted file]
clang/test/Preprocessor/Inputs/include_instead/public-after.h [deleted file]
clang/test/Preprocessor/Inputs/include_instead/public-before.h [deleted file]
clang/test/Preprocessor/Inputs/include_instead/public-empty.h [deleted file]
clang/test/Preprocessor/include_instead.cpp [deleted file]
clang/test/Preprocessor/include_instead_file_not_found.cpp [deleted file]