[PATCH] D60815: [clangd] Recognize "don't include me directly" pattern, and suppress include insertion.

Sam McCall via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Apr 17 03:43:09 PDT 2019


sammccall marked an inline comment as done.
sammccall added inline comments.


================
Comment at: clangd/index/SymbolCollector.cpp:602
+/// Returns None if includes should not be inserted for this file.
+llvm::Optional<std::string>
+SymbolCollector::getIncludeHeader(llvm::StringRef QName, FileID FID) {
----------------
this function has been moved to a member so it can call isSelfContainedHeader which is now a member.

Apart from no longer having to change so many params, it is unmodified.


================
Comment at: clangd/index/SymbolCollector.cpp:631
+
+bool SymbolCollector::isSelfContainedHeader(FileID FID) {
+  // The real computation (which will be memoized).
----------------
this has been moved to a member so it can use the cache and the (non-threadsafe) regex, and its logic has obviously been changed.


Repository:
  rCTE Clang Tools Extra

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

https://reviews.llvm.org/D60815





More information about the cfe-commits mailing list