@@ -68,47 +68,47 @@ int main() {
68
68
assert (X == 1 );
69
69
70
70
assert (X = 1 );
71
- // CHECK-MESSAGES: :[[@LINE-1]]:3: warning: found assert() with side effect [bugprone-assert-side-effect]
71
+ // CHECK-MESSAGES: :[[@LINE-1]]:3: warning: side effect in assert() condition discarded in release builds [bugprone-assert-side-effect]
72
72
my_assert (X = 1 );
73
- // CHECK-MESSAGES: :[[@LINE-1]]:3: warning: found my_assert() with side effect
73
+ // CHECK-MESSAGES: :[[@LINE-1]]:3: warning: side effect in my_assert() condition discarded in release builds
74
74
convoluted_assert (X = 1 );
75
- // CHECK-MESSAGES: :[[@LINE-1]]:3: warning: found convoluted_assert() with side effect
75
+ // CHECK-MESSAGES: :[[@LINE-1]]:3: warning: side effect in convoluted_assert() condition discarded in release builds
76
76
not_my_assert (X = 1 );
77
77
78
78
assert (++X);
79
- // CHECK-MESSAGES: :[[@LINE-1]]:3: warning: found assert() with side effect
79
+ // CHECK-MESSAGES: :[[@LINE-1]]:3: warning: side effect in assert() condition discarded in release builds
80
80
assert (!B);
81
81
82
82
assert (B || true );
83
83
84
84
assert (freeFunction ());
85
- // CHECK-MESSAGES: :[[@LINE-1]]:3: warning: found assert() with side effect
85
+ // CHECK-MESSAGES: :[[@LINE-1]]:3: warning: side effect in assert() condition discarded in release builds
86
86
87
87
MyClass mc;
88
88
assert (mc.badFunc (0 , 1 ));
89
- // CHECK-MESSAGES: :[[@LINE-1]]:3: warning: found assert() with side effect
89
+ // CHECK-MESSAGES: :[[@LINE-1]]:3: warning: side effect in assert() condition discarded in release builds
90
90
assert (mc.goodFunc (0 , 1 ));
91
91
92
92
MyClass mc2;
93
93
assert (mc2 = mc);
94
- // CHECK-MESSAGES: :[[@LINE-1]]:3: warning: found assert() with side effect
94
+ // CHECK-MESSAGES: :[[@LINE-1]]:3: warning: side effect in assert() condition discarded in release builds
95
95
96
96
assert (-mc > 0 );
97
97
98
98
MyClass *mcp;
99
99
assert (mcp = new MyClass);
100
- // CHECK-MESSAGES: :[[@LINE-1]]:3: warning: found assert() with side effect
100
+ // CHECK-MESSAGES: :[[@LINE-1]]:3: warning: side effect in assert() condition discarded in release builds
101
101
102
102
assert ((delete mcp, false ));
103
- // CHECK-MESSAGES: :[[@LINE-1]]:3: warning: found assert() with side effect
103
+ // CHECK-MESSAGES: :[[@LINE-1]]:3: warning: side effect in assert() condition discarded in release builds
104
104
105
105
assert ((throw 1 , false ));
106
- // CHECK-MESSAGES: :[[@LINE-1]]:3: warning: found assert() with side effect
106
+ // CHECK-MESSAGES: :[[@LINE-1]]:3: warning: side effect in assert() condition discarded in release builds
107
107
108
108
assert2 (1 == 2 - 1 );
109
109
110
110
msvc_assert (mc2 = mc);
111
- // CHECK-MESSAGES: :[[@LINE-1]]:3: warning: found msvc_assert() with side effect
111
+ // CHECK-MESSAGES: :[[@LINE-1]]:3: warning: side effect in msvc_assert() condition discarded in release builds
112
112
113
113
return 0 ;
114
114
}
0 commit comments