Skip to content

Commit 481eb4f

Browse files
authored
[clang] Enable the -Wdangling-assignment-gsl diagnostic by default. (#100708)
1 parent d683d37 commit 481eb4f

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

clang/docs/ReleaseNotes.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,8 @@ Improvements to Clang's diagnostics
133133

134134
- Clang now diagnoses undefined behavior in constant expressions more consistently. This includes invalid shifts, and signed overflow in arithmetic.
135135

136+
- -Wdangling-assignment-gsl is enabled by default.
137+
136138
Improvements to Clang's time-trace
137139
----------------------------------
138140

clang/include/clang/Basic/DiagnosticSemaKinds.td

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10131,7 +10131,7 @@ def warn_dangling_lifetime_pointer : Warning<
1013110131
InGroup<DanglingGsl>;
1013210132
def warn_dangling_lifetime_pointer_assignment : Warning<"object backing the "
1013310133
"pointer %0 will be destroyed at the end of the full-expression">,
10134-
InGroup<DanglingAssignmentGsl>, DefaultIgnore;
10134+
InGroup<DanglingAssignmentGsl>;
1013510135
def warn_new_dangling_initializer_list : Warning<
1013610136
"array backing "
1013710137
"%select{initializer list subobject of the allocated object|"

0 commit comments

Comments
 (0)