[PATCH] D84812: [clang-tidy][NFC] Added convienence methods for getting optional options
Dmitri Gribenko via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Jul 28 21:57:45 PDT 2020
gribozavr2 added inline comments.
================
Comment at: clang-tools-extra/clang-tidy/ClangTidyCheck.cpp:224
+ else
+ consumeError(ValueOr.takeError());
+ return llvm::None;
----------------
Is this specialization defined only because parsing a string option can never fail? I'd let this special case behavior fall out of the primary template if possible.
================
Comment at: clang-tools-extra/clang-tidy/ClangTidyCheck.h:485
+ /// Logs an Error to stderr if a \p Err is not a MissingOptionError.
+ static void logOptionParsingError(llvm::Error &&Err);
----------------
"logIfOptionParsingError" to express the conditionality of behavior?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D84812/new/
https://reviews.llvm.org/D84812
More information about the cfe-commits
mailing list