Skip to content

Commit 622be09

Browse files
committed
Revert "[-Wunsafe-buffer-usage] Generate fix-it for local variable declarations"
This reverts commit a29e676.
1 parent 97fbbd6 commit 622be09

File tree

7 files changed

+30
-539
lines changed

7 files changed

+30
-539
lines changed

clang/include/clang/Analysis/Analyses/UnsafeBufferUsage.h

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -37,15 +37,6 @@ class UnsafeBufferUsageHandler {
3737
/// Invoked when a fix is suggested against a variable.
3838
virtual void handleFixableVariable(const VarDecl *Variable,
3939
FixItList &&List) = 0;
40-
41-
/// Returns the text indicating that the user needs to provide input there:
42-
virtual std::string
43-
getUserFillPlaceHolder(StringRef HintTextToUser = "placeholder") {
44-
std::string s = std::string("<# ");
45-
s += HintTextToUser;
46-
s += " #>";
47-
return s;
48-
}
4940
};
5041

5142
// This function invokes the analysis and allows the caller to react to it

clang/include/clang/Analysis/Analyses/UnsafeBufferUsageGadgets.def

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@ WARNING_GADGET(Decrement)
3030
WARNING_GADGET(ArraySubscript)
3131
WARNING_GADGET(PointerArithmetic)
3232
WARNING_GADGET(UnsafeBufferUsageAttr)
33-
FIXABLE_GADGET(ULCArraySubscript)
3433

3534
#undef FIXABLE_GADGET
3635
#undef WARNING_GADGET

clang/include/clang/Basic/DiagnosticSemaKinds.td

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11790,8 +11790,6 @@ def warn_unsafe_buffer_operation : Warning<
1179011790
InGroup<UnsafeBufferUsage>, DefaultIgnore;
1179111791
def note_unsafe_buffer_operation : Note<
1179211792
"used%select{| in pointer arithmetic| in buffer access}0 here">;
11793-
def note_unsafe_buffer_variable_fixit : Note<
11794-
"change type of '%0' to '%select{std::span|std::array|std::span::iterator}1' to preserve bounds information">;
1179511793
def err_loongarch_builtin_requires_la32 : Error<
1179611794
"this builtin requires target: loongarch32">;
1179711795
} // end of sema component.

0 commit comments

Comments
 (0)