Fixed the test to work with -implicit-check-not.

llvm-svn: 212811
This commit is contained in:
Alexander Kornienko 2014-07-11 12:54:51 +00:00
parent 56ccdbbd29
commit b666eee1c8
1 changed files with 3 additions and 5 deletions

View File

@ -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) {