================ @@ -266,7 +266,7 @@ 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); + *OptionsProvider->getOptions(File), 0); ---------------- galenelias wrote:
Ok, so my current plan is: * Loop through all input files in clangTidyMain to explicitly validate configs for each input file and be able to return an error code there if a failure is found. * In this method (`ClangTidyContext::getOptionsForFile`) just return the default config options if an error is found, which is similar to the behavior before this PR. It seems like trying to make getOptionsForFile return an ErrorOr object and handle that at each call site is very cumbersome and leads to a lot of non-obvious failure modes that need to be resolved. https://github.com/llvm/llvm-project/pull/136167 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits