This reverts commit r173952
llvm-svn: 173970
if (MacroInfo *NewMI = getMacroInfo(NewII))
if (!NewMI->isEnabled() || NewMI == MI) {
Identifier.setFlag(Token::DisableExpand);
- // Don't warn for "#define X X" like "#define bool bool" from
- // stdbool.h.
- if (NewMI != MI)
- Diag(Identifier, diag::pp_disabled_macro_expansion);
+ Diag(Identifier, diag::pp_disabled_macro_expansion);
}
}
// RUN: %clang_cc1 -E -dM %s | FileCheck --check-prefix=CHECK-GNU-COMPAT %s
// RUN: %clang_cc1 -std=c++98 -E -dM %s | FileCheck --check-prefix=CHECK-CONFORMING %s
-// RUN: %clang_cc1 -fsyntax-only -std=gnu++98 -verify -Weverything %s
#include <stdbool.h>
#define zzz
// CHECK-CONFORMING: #define __CHAR_BIT__
// CHECK-CONFORMING-NOT: #define false false
// CHECK-CONFORMING: #define zzz
-
-zzz
-// expected-no-diagnostics
-extern bool x;
#define z(x) (z)(x)
-p // no warning
+p // expected-warning {{recursive macro}}
a // expected-warning {{recursive macro}}