aboutsummaryrefslogtreecommitdiff
path: root/lib/Lex/Preprocessor.cpp
diff options
context:
space:
mode:
authorEli Friedman <eli.friedman@gmail.com>2009-04-28 03:59:15 +0000
committerEli Friedman <eli.friedman@gmail.com>2009-04-28 03:59:15 +0000
commit2962f4d71d26817780e7441b23e0e91214fceb5e (patch)
treea7cb648ef5d2d845fae7d07d4a566cc53e8cd9da /lib/Lex/Preprocessor.cpp
parentc71133f0cf820f0708b9dd141563b910530498c1 (diff)
Emit keyword extension warning in all modes, not just C99 mode.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70283 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Lex/Preprocessor.cpp')
-rw-r--r--lib/Lex/Preprocessor.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/Lex/Preprocessor.cpp b/lib/Lex/Preprocessor.cpp
index 07fab81137..0a7d92eb83 100644
--- a/lib/Lex/Preprocessor.cpp
+++ b/lib/Lex/Preprocessor.cpp
@@ -471,6 +471,8 @@ void Preprocessor::HandleIdentifier(Token &Identifier) {
// If this is an extension token, diagnose its use.
// We avoid diagnosing tokens that originate from macro definitions.
- if (II.isExtensionToken() && Features.C99 && !DisableMacroExpansion)
+ // FIXME: This warning is disabled in cases where it shouldn't be,
+ // like "#define TY typeof", "TY(1) x".
+ if (II.isExtensionToken() && !DisableMacroExpansion)
Diag(Identifier, diag::ext_token_used);
}