[PATCH] D121165: [pseudo] Add crude heuristics to choose taken preprocessor branches.
Haojian Wu via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Apr 1 01:39:04 PDT 2022
hokein accepted this revision.
hokein added a comment.
This revision is now accepted and ready to land.
Thanks, looks good!
================
Comment at: clang-tools-extra/pseudo/include/clang-pseudo/DirectiveMap.h:95
// FIXME: add heuristically selection of conditional branches.
// FIXME: allow deriving a preprocessed stream
----------------
it is done in this patch, can be removed now.
================
Comment at: clang-tools-extra/pseudo/lib/DirectiveMap.cpp:329
+ const auto &Tokens = Code.tokens(Dir.Tokens);
+ if (Tokens.empty() || Tokens.front().Kind != tok::hash)
+ return llvm::None;
----------------
I thought the first token of the `Directive` should always be `tok::hash`, isn't it?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D121165/new/
https://reviews.llvm.org/D121165
More information about the cfe-commits
mailing list