Author: Wei Yi Tee Date: 2022-08-29T15:32:49Z New Revision: d346eb7bf08c7780bb80426eabc6b5f81490e9ae
URL: https://github.com/llvm/llvm-project/commit/d346eb7bf08c7780bb80426eabc6b5f81490e9ae DIFF: https://github.com/llvm/llvm-project/commit/d346eb7bf08c7780bb80426eabc6b5f81490e9ae.diff LOG: [clang] Fix ambiguous use of `report_fatal_error`. `report_fatal_error` is overloaded on `StringRef` and `Twine &`, therefore passing a `std::string` argument leads to ambiguity as it is convertible to either type. Reviewed By: gribozavr2, sgatev Differential Revision: https://reviews.llvm.org/D132745 Added: Modified: clang/lib/Basic/SanitizerSpecialCaseList.cpp Removed: ################################################################################ diff --git a/clang/lib/Basic/SanitizerSpecialCaseList.cpp b/clang/lib/Basic/SanitizerSpecialCaseList.cpp index 5bf8d39ffd95b..2dbf04c6ede97 100644 --- a/clang/lib/Basic/SanitizerSpecialCaseList.cpp +++ b/clang/lib/Basic/SanitizerSpecialCaseList.cpp @@ -33,7 +33,7 @@ SanitizerSpecialCaseList::createOrDie(const std::vector<std::string> &Paths, std::string Error; if (auto SSCL = create(Paths, VFS, Error)) return SSCL; - llvm::report_fatal_error(Error); + llvm::report_fatal_error(StringRef(Error)); } void SanitizerSpecialCaseList::createSanitizerSections() { _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits