[PATCH] D89936: clang-tidy: adding "--clang-tidy-config=<file-path>" to specify custom config file
Hiral via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Oct 26 23:42:42 PDT 2020
Hiralo marked an inline comment as done.
Hiralo added inline comments.
================
Comment at: clang-tools-extra/clang-tidy/ClangTidyOptions.cpp:324
+ llvm::sys::fs::is_symlink_file(Twine(AbsoluteFilePath), IsLink);
+ if (!(IsFile || IsLink)) {
+ std::string Msg;
----------------
DmitryPolukhin wrote:
> Is it actually required to check absolute path, link it or not, etc.? Why not just try reading file with provided filename and report error if it fails?
Tried it and seems we don't need this changes since down the line below code emits required error message...
if (std::error_code EC = Text.getError()) {
std::string Msg;
llvm::raw_string_ostream ErrStream(Msg);
ErrStream << " Can't read <" << Path << ">: " << EC.message() << "\n";
llvm::report_fatal_error(ErrStream.str());
}
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D89936/new/
https://reviews.llvm.org/D89936
More information about the cfe-commits
mailing list