[PATCH] D85666: [clang-tidy] IncludeInserter: allow <> in header name
Nathan James via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Aug 11 08:40:55 PDT 2020
njames93 added inline comments.
================
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);
----------------
To save duplication could this not just dispatch to `createIncludeInsertion(FileID, StringRef)`
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