[PATCH] D43075: [clang-move] Don't dump macro symbols.
Eric Liu via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Feb 8 08:04:09 PST 2018
ioeric added a comment.
Lg. Thanks for the change!
================
Comment at: clang-move/ClangMove.cpp:526
unless(usingDirectiveDecl()), // using namespace decl.
+ notInMacro(),
InOldHeader,
----------------
I'd probably relax the condition a bit; theoretically tools would be able to handle entire identifiers that are either spelled in macro or passed in by users. But it's probably rare. Might worth a `FIXME` though?
================
Comment at: unittests/clang-move/ClangMoveTests.cpp:397
+ const char TestHeader[] =
+ "#define DEFINE_Foo int Foo = 1;\nDEFINE_Foo;\nclass Bar {};\n";
+ move::MoveDefinitionSpec Spec;
----------------
Could you add a test case where the identifier is composed of macro and user parameter? Something like `#define Foo(x) void func_##x()`?
Repository:
rCTE Clang Tools Extra
https://reviews.llvm.org/D43075
More information about the cfe-commits
mailing list