[PATCH] D43510: [clangd] don't insert new includes if either original header or canonical header is already included.

Sam McCall via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Feb 20 06:43:58 PST 2018


sammccall added inline comments.


================
Comment at: clangd/ClangdServer.h:239
+  /// Inserts a new #include into \p File, if it's not present in \p Code.
+  /// \p OriginalHeader The original header corresponding to this insertion.
+  /// This may be different from preferredHeader as a header file can have a
----------------
I really do want to know what this parameter does, but I don't understand it from this comment.


================
Comment at: clangd/ClangdServer.h:243
+  /// string quoted with <> or "" that can be #included directly.
+  /// \p PreferredHeader The preferred header to be inserted. The has the same
+  /// semantic as \p OriginalHeader. If empty, \p OriginalHeader is used to
----------------
"this has the same semantic as OriginalHeader" contradicts "[OriginalHeader] may be different from preferredHeader" :-)


Repository:
  rCTE Clang Tools Extra

https://reviews.llvm.org/D43510





More information about the cfe-commits mailing list