This is an archive of the discontinued LLVM Phabricator instance.

[clang] Fix ambiguous use of `report_fatal_error`.
ClosedPublic

Authored by wyt on Aug 26 2022, 8:58 AM.

Details

Summary

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.

Diff Detail

Event Timeline

wyt created this revision.Aug 26 2022, 8:58 AM
Herald added a project: Restricted Project. · View Herald TranscriptAug 26 2022, 8:58 AM
wyt requested review of this revision.Aug 26 2022, 8:58 AM
Herald added a project: Restricted Project. · View Herald TranscriptAug 26 2022, 8:58 AM
Herald added a subscriber: cfe-commits. · View Herald Transcript
gribozavr2 accepted this revision.Aug 26 2022, 3:23 PM
gribozavr2 added inline comments.
clang/lib/Basic/SanitizerSpecialCaseList.cpp
36

Please omit 'llvm::' on StringRef if it works like that (it should).

This revision is now accepted and ready to land.Aug 26 2022, 3:23 PM
sgatev accepted this revision.Aug 28 2022, 10:49 PM
wyt updated this revision to Diff 456311.Aug 29 2022, 5:04 AM
wyt marked an inline comment as done.

Address comment.

gribozavr2 accepted this revision.Aug 29 2022, 5:19 AM
This revision was automatically updated to reflect the committed changes.