alexfh added inline comments.
================ 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>")) {} ---------------- hokein wrote: > 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`. I've already added this ;) ================ Comment at: clang-tools-extra/clang-tidy/utils/IncludeInserter.cpp:98-103 + assert(SourceMgr && "SourceMgr shouldn't be null; did you remember to call " + "registerPreprocessor()?"); + bool IsAngled = Header.consume_front("<"); + if (IsAngled != Header.consume_back(">")) + return llvm::None; + return createIncludeInsertion(SourceMgr->getMainFileID(), Header, IsAngled); ---------------- njames93 wrote: > To save duplication could this not just dispatch to > `createIncludeInsertion(FileID, StringRef)` Good point! Thanks! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D85666/new/ https://reviews.llvm.org/D85666 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits