[PATCH] D67748: [clangd] Add a helper for extracting nonlocal decls in a FunctionDecl

Haojian Wu via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Sep 20 01:14:14 PDT 2019


hokein added a comment.

I think the helper is only used by the defineInline tweak? not sure XRef.h is the best place for putting these helpers.
Will we have more helpers in the future? If so, we may put them all in a new file.



================
Comment at: clang-tools-extra/clangd/unittests/XRefsTests.cpp:2258
+        sourceLocationInMainFile(AST.getSourceManager(), File.point());
+    ASSERT_TRUE(bool(SL));
+
----------------
nit: use `SourceLocation SL = cantfail( sourceLocationInMainFile(AST.getSourceManager(), File.point());` .


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D67748





More information about the cfe-commits mailing list