Reviewers: alexfh
Subscribers: cfe-commits
Differential Revision: http://reviews.llvm.org/D17640
llvm-svn: 262024
NullMacros.end();
}
- MacroLoc = SM.getImmediateExpansionRange(ArgLoc).first;
+ MacroLoc = SM.getExpansionRange(ArgLoc).first;
ArgLoc = Expansion.getSpellingLoc().getLocWithOffset(LocInfo.second);
if (ArgLoc.isFileID())
// CHECK-MESSAGES: :[[@LINE-2]]:24: warning: use nullptr
// CHECK-FIXES: a[2] = {ENTRY(nullptr), {nullptr}};
#undef ENTRY
+
+#define assert1(expr) (expr) ? 0 : 1
+#define assert2 assert1
+ int *p;
+ assert2(p == 0);
+ // CHECK-MESSAGES: :[[@LINE-1]]:16: warning: use nullptr
+ // CHECK-FIXES: assert2(p == nullptr);
+ assert2(p == NULL);
+ // CHECK-MESSAGES: :[[@LINE-1]]:16: warning: use nullptr
+ // CHECK-FIXES: assert2(p == nullptr);
+#undef assert2
+#undef assert1
}
// One of the ancestor of the cast is a NestedNameSpecifierLoc.