This is an archive of the discontinued LLVM Phabricator instance.

[-Wunsafe-buffer-usage] Emit Fix-Its only for C++20 and later standards
ClosedPublic

Authored by jkorous on Feb 6 2023, 6:42 PM.

Details

Summary

The transformation strategy we are bringing up relies heavily on std::span which was introduced as part of C++20.

Diff Detail

Event Timeline

jkorous created this revision.Feb 6 2023, 6:42 PM
Herald added a project: Restricted Project. · View Herald TranscriptFeb 6 2023, 6:42 PM
Herald added a subscriber: rnkovacs. · View Herald Transcript
jkorous requested review of this revision.Feb 6 2023, 6:42 PM
NoQ accepted this revision.Feb 7 2023, 7:03 PM

Yeah that's important! Do we need to cherry-pick this to llvm-16 release candidate?

clang/lib/Sema/AnalysisBasedWarnings.cpp
2521–2522

Also what does this monstrous invocation do that isn't accomplished by S.getLangOpts().CPlusPlus20?

This revision is now accepted and ready to land.Feb 7 2023, 7:03 PM
jkorous added inline comments.Feb 9 2023, 4:26 PM
clang/lib/Sema/AnalysisBasedWarnings.cpp
2521–2522
This revision was landed with ongoing or failed builds.Feb 9 2023, 5:28 PM
This revision was automatically updated to reflect the committed changes.
Herald added a project: Restricted Project. · View Herald TranscriptFeb 9 2023, 5:28 PM
Herald added a subscriber: cfe-commits. · View Herald Transcript

We actually have only commits with warnings in release/16.x - no Fix-Its. So no need to cherry-pick.