================
@@ -265,8 +265,16 @@ const ClangTidyOptions &ClangTidyContext::getOptions()
const {
ClangTidyOptions ClangTidyContext::getOptionsForFile(StringRef File) const {
// Merge options on top of getDefaults() as a safeguard against options with
// unset values.
- return ClangTidyOptions::getDefaults().merge(
- OptionsProvider->getOptions(File), 0);
+ ClangTidyOptions defaultOptions = ClangTidyOptions::getDefaults();
+ llvm::ErrorOr<ClangTidyOptions> fileOptions =
+ OptionsProvider->getOptions(File);
+
+ // If there was an error parsing the options, just use the default options.
----------------
carlosgalvezp wrote:
Shouldn't we fail hard/propagate the error further here? Returning the default
options hides the problem for the user.
https://github.com/llvm/llvm-project/pull/136167
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits