[PATCH] D72395: [clangd] Publish xref for macros from Index and AST.

Kadir Cetinkaya via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Jan 8 06:44:15 PST 2020


kadircet added inline comments.


================
Comment at: clang-tools-extra/clangd/unittests/XRefsTests.cpp:1021
 
 TEST(FindReferences, NeedsIndex) {
+  const char *Header = (R"cpp(
----------------
nit: i don't think there's much benefit in combining refs for macros and symbols in a single test. their handling in the code is disjoint, whereas this test is not. so it makes the test a little bit harder to read and also failures would be harder to reason about. but the test is currently small, so up to you whether you want to separate it or not.


================
Comment at: clang-tools-extra/clangd/unittests/XRefsTests.cpp:1022
 TEST(FindReferences, NeedsIndex) {
-  const char *Header = "int foo();";
-  Annotations Main("int main() { [[f^oo]](); }");
+  const char *Header = (R"cpp(
+    int foo();
----------------
nit: redundant parentheses around `R"cpp`


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D72395





More information about the cfe-commits mailing list