Skip to content

Commit abc7812

Browse files
committed
rename flag
1 parent 4c634e1 commit abc7812

File tree

5 files changed

+7
-7
lines changed

5 files changed

+7
-7
lines changed

clang/docs/analyzer/checkers.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1785,10 +1785,10 @@ security.insecureAPI.DeprecatedOrUnsafeBufferHandling (C)
17851785
strncpy(buf, "a", 1); // warn
17861786
}
17871787
1788-
The ``AllowWithoutC11`` option allows reporting warnings for these functions even when not compiling with C11 standard. These functions are deprecated in C11, but may still be problematic in earlier C standards.
1788+
The ``ReportInC99AndEarlier`` option allows reporting warnings for these functions even when not compiling with C11 standard. These functions became deprecated in C11, but may still be problematic in earlier C standards.
17891789
17901790
To enable this option, use:
1791-
``-analyzer-config security.insecureAPI.DeprecatedOrUnsafeBufferHandling:AllowWithoutC11=true``.
1791+
``-analyzer-config security.insecureAPI.DeprecatedOrUnsafeBufferHandling:ReportInC99AndEarlier=true``.
17921792
17931793
By default, this option is set to *false*.
17941794

clang/include/clang/StaticAnalyzer/Checkers/Checkers.td

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -908,10 +908,10 @@ def DeprecatedOrUnsafeBufferHandling
908908
Dependencies<[SecuritySyntaxChecker]>,
909909
CheckerOptions<
910910
[CmdLineOption<
911-
Boolean, "AllowWithoutC11",
911+
Boolean, "ReportInC99AndEarlier",
912912
"Allow reporting deprecated or unsafe buffer handling "
913913
"functions even when not compiling with C11 standard. "
914-
"These functions are deprecated in C11, but may still be "
914+
"These functions became deprecated in C11, but may still be "
915915
"problematic in earlier C standards.",
916916
"false", Released>,
917917
]>,

clang/lib/StaticAnalyzer/Checkers/CheckSecuritySyntaxOnly.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1124,7 +1124,7 @@ void ento::registerDeprecatedOrUnsafeBufferHandling(CheckerManager &mgr) {
11241124
mgr.getCurrentCheckerName();
11251125
checker->filter.allowDeprecatedOrUnsafeBufferHandlingWithoutC11 =
11261126
mgr.getAnalyzerOptions().getCheckerBooleanOption(
1127-
mgr.getCurrentCheckerName(), "AllowWithoutC11");
1127+
mgr.getCurrentCheckerName(), "ReportInC99AndEarlier");
11281128
}
11291129

11301130
bool ento::shouldRegisterDeprecatedOrUnsafeBufferHandling(

clang/test/Analysis/analyzer-config.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@
121121
// CHECK-NEXT: region-store-small-struct-limit = 2
122122
// CHECK-NEXT: report-in-main-source-file = false
123123
// CHECK-NEXT: security.cert.env.InvalidPtr:InvalidatingGetEnv = false
124-
// CHECK-NEXT: security.insecureAPI.DeprecatedOrUnsafeBufferHandling:AllowWithoutC11 = false
124+
// CHECK-NEXT: security.insecureAPI.DeprecatedOrUnsafeBufferHandling:ReportInC99AndEarlier = false
125125
// CHECK-NEXT: serialize-stats = false
126126
// CHECK-NEXT: silence-checkers = ""
127127
// CHECK-NEXT: stable-report-filename = false

clang/test/Analysis/security-deprecated-buffer-handling-allow-without-c11.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
// Test 2: Without C11 but with flag enabled - should warn
66
// RUN: %clang_analyze_cc1 %s -verify=c99-withflag -std=gnu99 \
77
// RUN: -analyzer-checker=security.insecureAPI.DeprecatedOrUnsafeBufferHandling \
8-
// RUN: -analyzer-config security.insecureAPI.DeprecatedOrUnsafeBufferHandling:AllowWithoutC11=true
8+
// RUN: -analyzer-config security.insecureAPI.DeprecatedOrUnsafeBufferHandling:ReportInC99AndEarlier=true
99

1010
// Test 3: With C11 - should warn (existing behavior)
1111
// RUN: %clang_analyze_cc1 %s -verify=c11 -std=gnu11 \

0 commit comments

Comments
 (0)