Skip to content

Commit 6039d2f

Browse files
committed
disable warning by default
1 parent ea301d7 commit 6039d2f

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

clang/include/clang/Basic/DiagnosticSemaKinds.td

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10233,10 +10233,10 @@ def warn_dangling_pointer_assignment : Warning<
1023310233
InGroup<DanglingAssignment>;
1023410234
def warn_dangling_reference_captured : Warning<
1023510235
"object whose reference is captured by '%0' will be destroyed at the end of "
10236-
"the full-expression">, InGroup<DanglingCapture>;
10236+
"the full-expression">, InGroup<DanglingCapture>, DefaultIgnore;
1023710237
def warn_dangling_reference_captured_by_unknown : Warning<
1023810238
"object whose reference is captured will be destroyed at the end of "
10239-
"the full-expression">, InGroup<DanglingCapture>;
10239+
"the full-expression">, InGroup<DanglingCapture>, DefaultIgnore;
1024010240

1024110241
// For non-floating point, expressions of the form x == x or x != x
1024210242
// should result in a warning, since these always evaluate to a constant.

clang/test/Sema/warn-lifetime-analysis-capture-by.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %clang_cc1 --std=c++20 -fsyntax-only -verify %s
1+
// RUN: %clang_cc1 --std=c++20 -fsyntax-only -verify -Wdangling-capture %s
22

33
#include "Inputs/lifetime-analysis.h"
44

0 commit comments

Comments
 (0)