[PATCH] D58340: [clang][Index] Visit UsingDecls and generate USRs for them

Ilya Biryukov via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Feb 18 05:59:26 PST 2019


ilya-biryukov added inline comments.


================
Comment at: lib/Index/IndexDecl.cpp:586
 
+    IndexCtx.handleDecl(D);
     IndexCtx.indexNestedNameSpecifierLoc(D->getQualifierLoc(), Parent,
----------------
NIT: maybe put it at the very first line of the function, before the `DC` and `Parent` decls?
To keep the variable declarations closer to their usages.


================
Comment at: lib/Index/USRGeneration.cpp:118
+    bool EmittedDeclName = !EmitDeclName(D);
+    assert(EmittedDeclName && "EmitDeclName can not fail for UsingDecls");
   }
----------------
add `(void)EmittedDeclName` to avoid unused warning with assertions disabled.


Repository:
  rC Clang

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D58340/new/

https://reviews.llvm.org/D58340





More information about the cfe-commits mailing list