[PATCH] D54303: [clangd] Don't treat top-level decls as "local" if they are from the preamble.

Ilya Biryukov via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Nov 9 05:42:12 PST 2018


ilya-biryukov accepted this revision.
ilya-biryukov added a comment.
This revision is now accepted and ready to land.

LGTM!



================
Comment at: unittests/clangd/ClangdUnitTests.cpp:268
+  auto AST = TU.build();
+  ASSERT_EQ(AST.getLocalTopLevelDecls().size(), 1u);
+  NamedDecl *ND = dyn_cast<NamedDecl>(AST.getLocalTopLevelDecls().front());
----------------
NIT: maybe use `ASSEET_THAT(AST.getLocalTopLevelDecls(), ElementsAre(...))`

Unless that's too hard for some reason.


Repository:
  rCTE Clang Tools Extra

https://reviews.llvm.org/D54303





More information about the cfe-commits mailing list