njames93 added inline comments.
================ Comment at: clang-tools-extra/clang-tidy/ClangTidyDiagnosticConsumer.cpp:249-251 + if (!HeaderFilter) + HeaderFilter = + std::make_unique<llvm::Regex>(*getOptions().HeaderFilterRegex); ---------------- This should also check if the Optional has a value ================ Comment at: clang-tools-extra/clang-tidy/ClangTidyDiagnosticConsumer.cpp:349-351 + // Skip macro from system headers. + if (!*Context.getOptions().SystemHeaders && SM.isInSystemHeader(SpellingLoc)) + return true; ---------------- This looks suspicious, in clang-tidy land `SystemHeaders` is always set, however outside clang-tidy it may not be. Perhaps `getValueOr(false)` should be used to prevent any asserts. Also can a test be added to show this respecting the SystemHeaders setting. ================ Comment at: clang-tools-extra/clang-tidy/ClangTidyDiagnosticConsumer.cpp:358-360 + if (!File) { + return false; + } ---------------- Elide braces Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D90835/new/ https://reviews.llvm.org/D90835 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits