[PATCH] D25762: [clang-move] Move using-decl in old cc.

Haojian Wu via cfe-commits cfe-commits at lists.llvm.org
Wed Oct 19 06:40:35 PDT 2016


hokein marked an inline comment as done.
hokein added inline comments.


================
Comment at: clang-move/ClangMove.cpp:356
   Finder->addMatcher(
-      namedDecl(anyOf(functionDecl(isDefinition()), varDecl(isDefinition())),
-                inAnonymousNamespace)
-          .bind("decls_in_anonymous_ns"),
+      usingDecl(InOldCC, unless(InAnonymousNamespace)).bind("using_decl"),
       this);
----------------
ioeric wrote:
> Is `UsingDirectiveDecl`, i.e. using namespace decl, included in this case?
Also covered type alias declarations.


================
Comment at: clang-move/ClangMove.cpp:366
       namedDecl(anyOf(functionDecl(isDefinition(), unless(InMovedClass),
+                                   unless(InAnonymousNamespace),
                                    isStaticStorageClass(), InOldCC),
----------------
ioeric wrote:
> Seems that filters for `functionDecl` and `varDecl` are the same? Maybe apply them on `namedDecl`?
I tried it before, but some ast matchers are not available on `nameDecl`.  I simplified the code a little bit by pulling out these filters.


https://reviews.llvm.org/D25762





More information about the cfe-commits mailing list