Skip to content

Commit 89389a5

Browse files
committed
[review-fix] clarify wording
1 parent 17a0e9c commit 89389a5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

clang/docs/analyzer/checkers/storetoimmutable_example.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ void immutable_violation_examples() {
1111
const int local_const = 42;
1212
*(int *)&local_const = 43; // warn: Trying to write to immutable memory
1313

14-
// NOTE: The following works in C++, but not in C, as the analyzer treats
14+
// NOTE: The following is reported in C++, but not in C, as the analyzer treats
1515
// string literals as non-const char arrays in C mode.
1616
char *ptr_to_str_literal = (char *)"hello";
1717
ptr_to_str_literal[0] = 'H'; // warn: Trying to write to immutable memory

0 commit comments

Comments
 (0)