This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rGb7bdf1996fd1: [-Wunsafe-buffer-usage] Hide
fixits/suggestions behind an extra flag. (authored by Artem Dergachev
).
Herald add
NoQ updated this revision to Diff 523601.
NoQ added a comment.
Rebase *correctly*!
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D146669/new/
https://reviews.llvm.org/D146669
Files:
clang/include/clang/Analysis/Analyses/UnsafeBufferUsage.h
clang/include/clang/Basic/DiagnosticOptions
NoQ updated this revision to Diff 523595.
NoQ added a comment.
Rebase!
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D146669/new/
https://reviews.llvm.org/D146669
Files:
clang/include/clang/Analysis/Analyses/UnsafeBufferUsage.h
clang/include/clang/Basic/DiagnosticOptions.def
clang
NoQ updated this revision to Diff 515110.
NoQ added a comment.
Before I forget: Update tests that didn't fail due to my patch because they
were testing absence of things (warnings or fixits) and my patch only made them
more absent. They need to keep testing absence of these things even when the
NoQ updated this revision to Diff 510933.
NoQ added a comment.
- Rebase! (I'll update related revisions soon but not immediately, need to make
sense out of them first.)
- Eliminate the `EmitFixits` mode as discussed above.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D146669/new/
https
NoQ added a comment.
So in a nutshell, this is the intended behavior:
| code | diagnostic
| EmitFixits && EmitSuggestions | !EmitFixits &&
EmitSuggestions | !EmitFixits && !EmitSuggestions |
| -
NoQ updated this revision to Diff 507912.
NoQ added a comment.
Don't recommend enabling suggestions when suggestions are impossible (eg. due
to lack of C++20).
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D146669/new/
https://reviews.llvm.org/D146669
Files:
clang/include/clang/Analy
NoQ added inline comments.
Comment at: clang/include/clang/Basic/DiagnosticSemaKinds.td:11792
"change type of '%0' to '%select{std::span|std::array|std::span::iterator}1'
to preserve bounds information">;
+def note_safe_buffer_usage_suggestions_disabled : Note<
+ "pass -fsaf
NoQ updated this revision to Diff 507903.
NoQ added a comment.
Explain the weird variable name.
Confirm that even though `warn_unsafe_buffer_operation` and
`note_unsafe_buffer_operation` have a different number of modes, the mismatch
doesn't cause problems yet. Add an assert to catch the proble
t-rasmud added inline comments.
Comment at: clang/lib/Sema/AnalysisBasedWarnings.cpp:2159
Sema &S;
+ bool SuggestSuggestions;
Was there a reason for naming this variable SuggestSuggestions? Can this be
called EmitSuggestions? I think that would make it uni
ziqingluo-90 added inline comments.
Comment at: clang/lib/Sema/AnalysisBasedWarnings.cpp:2203
+if (IsRelatedToDecl) {
+ assert(!SuggestSuggestions &&
+ "Variables blamed for unsafe buffer usage without suggestions!");
nitpick:
I was a bit co
ziqingluo-90 added inline comments.
Comment at: clang/lib/Analysis/UnsafeBufferUsage.cpp:1139
UnsafeBufferUsageHandler &Handler,
+ bool EmitSuggestions,
bool EmitFixits) {
--
jkorous accepted this revision.
jkorous added a comment.
This revision is now accepted and ready to land.
LGTM.
Comment at: clang/include/clang/Basic/DiagnosticSemaKinds.td:11792
"change type of '%0' to '%select{std::span|std::array|std::span::iterator}1'
to preserve bounds
NoQ updated this revision to Diff 507549.
NoQ added a comment.
Add some nice assertions.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D146669/new/
https://reviews.llvm.org/D146669
Files:
clang/include/clang/Analysis/Analyses/UnsafeBufferUsage.h
clang/include/clang/Basic/DiagnosticO
NoQ created this revision.
NoQ added reviewers: jkorous, t-rasmud, ziqingluo-90, malavikasamak,
aaron.ballman, gribozavr, ymandel, sgatev.
Herald added subscribers: steakhal, martong.
Herald added a project: All.
NoQ requested review of this revision.
Herald added a subscriber: MaskRay.
This patc
15 matches
Mail list logo