forked from OSchip/llvm-project
Fixed the test to work with -implicit-check-not.
llvm-svn: 212811
This commit is contained in:
parent
56ccdbbd29
commit
b666eee1c8
|
@ -16,12 +16,12 @@ void t(T b) {
|
|||
void foo() {
|
||||
bool *b = SomeFunction();
|
||||
if (b) {
|
||||
// CHECK-MESSAGES: dubious check of 'bool *' against 'nullptr'
|
||||
// CHECK-MESSAGES: :[[@LINE-1]]:7: warning: dubious check of 'bool *' against 'nullptr'
|
||||
// CHECK-FIXES: if (*b) {
|
||||
}
|
||||
|
||||
if (F() && b) {
|
||||
// CHECK-MESSAGES: dubious check of 'bool *' against 'nullptr'
|
||||
// CHECK-MESSAGES: :[[@LINE-1]]:14: warning: dubious check of 'bool *' against 'nullptr'
|
||||
// CHECK-FIXES: if (F() && *b) {
|
||||
}
|
||||
|
||||
|
@ -33,14 +33,12 @@ void foo() {
|
|||
#define TESTMACRO if (b || F())
|
||||
|
||||
TESTMACRO {
|
||||
// CHECK-MESSAGES: dubious check of 'bool *' against 'nullptr'
|
||||
// CHECK-MESSAGES: :[[@LINE-1]]:3: warning: dubious check of 'bool *' against 'nullptr'
|
||||
// Can't fix this.
|
||||
// CHECK-FIXES: #define TESTMACRO if (b || F())
|
||||
// CHECK-FIXES: TESTMACRO {
|
||||
}
|
||||
|
||||
// CHECK-MESSAGES-NOT: warning:
|
||||
|
||||
t(b);
|
||||
|
||||
if (!b) {
|
||||
|
|
Loading…
Reference in New Issue