When a preamble ends in a conditional preprocessor block that is being
skipped, the preprocessor needs to continue skipping that block when
the preamble is used.
This fixes PR34570.
Paths
| Differential D38578
[preamble] Also record the "skipping" state of the preprocessor ClosedPublic Authored by erikjv on Oct 5 2017, 3:53 AM.
Details
Summary When a preamble ends in a conditional preprocessor block that is being This fixes PR34570.
Diff Detail Event TimelineComment Actions LGTM. Only a few code style-related comments.
This revision is now accepted and ready to land.Oct 6 2017, 2:58 AM Comment Actions Also, one more important thing. I'll unaccept revision for now, before getting feedback on this one.
This revision now requires changes to proceed.Oct 6 2017, 3:21 AM This revision is now accepted and ready to land.Oct 6 2017, 6:23 AM Comment Actions This fixes the reported bug for me :) There is another related issue that is not addressed by this change. I've reported it as [preamble] Skipped ranges vanish after reparse (#ifdef with #include)
Revision Contents
Diff 117793 include/clang/Lex/Preprocessor.h
lib/Lex/PPDirectives.cpp
lib/Lex/Preprocessor.cpp
lib/Serialization/ASTReader.cpp
lib/Serialization/ASTWriter.cpp
test/Index/preamble-conditionals-inverted.cpp
test/Index/preamble-conditionals-skipping.cpp
|
Maybe rename to HashTokenLoc for consistencty with IfTokenLoc?