[PATCH] D48933: [clangd] Treat class constructor as in the same scope as the class in ranking.

Sam McCall via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Jul 5 00:49:02 PDT 2018


sammccall accepted this revision.
sammccall added inline comments.
This revision is now accepted and ready to land.


================
Comment at: unittests/clangd/QualityTests.cpp:218
+
+  // `findDecl` would return the implicit injected class for "Foo::Foo"; simply
+  // look for a constructor decl under the class.
----------------
hmm, maybe neater to add an overload of findAnyDecl() that takes a filter function<bool(const NamedDecl&)>? (and implement the findAnyDecl in terms of it)

Call site should be slightly more readable, and you'll also get an assertion that there's exactly one match "for free".


Repository:
  rCTE Clang Tools Extra

https://reviews.llvm.org/D48933





More information about the cfe-commits mailing list