[PATCH] D85666: [clang-tidy] IncludeInserter: allow <> in header name

Haojian Wu via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Aug 11 00:04:23 PDT 2020


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


================
Comment at: clang-tools-extra/clang-tidy/cppcoreguidelines/InitVariablesCheck.cpp:31
                                                utils::IncludeSorter::IS_LLVM)),
-      MathHeader(Options.get("MathHeader", "math.h")) {}
+      MathHeader(Options.get("MathHeader", "<math.h>")) {}
 
----------------
this looks like a bug fix, I think the check lit test didn't cover it before, maybe add a header verification in `test/clang-tidy/checkers/cppcoreguidelines-init-variables.cpp`.


================
Comment at: clang-tools-extra/clang-tidy/utils/IncludeInserter.h:71
   /// Returns ``llvm::None`` on error or if the inclusion directive already
   /// exists.
   llvm::Optional<FixItHint>
----------------
Add a FIXME saying this would be removed eventually.


================
Comment at: clang-tools-extra/clang-tidy/utils/IncludeInserter.h:85
   /// Returns``llvm::None`` on error or if the inclusion directive already
   /// exists.
   llvm::Optional<FixItHint>
----------------
The same here.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D85666



More information about the cfe-commits mailing list