[PATCH] D43075: [clang-move] Don't dump macro symbols.

Haojian Wu via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Feb 9 08:00:46 PST 2018


hokein added inline comments.


================
Comment at: clang-move/ClangMove.cpp:526
       unless(usingDirectiveDecl()), // using namespace decl.
+      notInMacro(),
       InOldHeader,
----------------
ioeric wrote:
> 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?
This mainly affects the dump behavior. Moving symbols spelled in macro is tricky, and we can't guarantee always doing right thing. Actually, clang-move supports it partially. For the test case of this patch, if you move the `Foo` (names=`Foo`), clang-move will move the expansion macro (`DEFINE_Foo;`), although `Foo` is not dumped.


Repository:
  rCTE Clang Tools Extra

https://reviews.llvm.org/D43075





More information about the cfe-commits mailing list