diff options
author | Richard Smith <richard-llvm@metafoo.co.uk> | 2013-04-30 22:43:51 +0000 |
---|---|---|
committer | Richard Smith <richard-llvm@metafoo.co.uk> | 2013-04-30 22:43:51 +0000 |
commit | 3b87038631130e391b6e4320acba1f6ffa5e4b85 (patch) | |
tree | 4be56b0be0c548495ffaf691e501c131be780da7 /clang/lib/Parse/ParseDecl.cpp | |
parent | cc6dc78046ad635bd70f59abf95fc71c7f639f99 (diff) | |
download | bcm5719-llvm-3b87038631130e391b6e4320acba1f6ffa5e4b85.tar.gz bcm5719-llvm-3b87038631130e391b6e4320acba1f6ffa5e4b85.zip |
Fix PR15845: apparently MSVC does not support implicit int in C++ mode.
llvm-svn: 180822
Diffstat (limited to 'clang/lib/Parse/ParseDecl.cpp')
-rw-r--r-- | clang/lib/Parse/ParseDecl.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/clang/lib/Parse/ParseDecl.cpp b/clang/lib/Parse/ParseDecl.cpp index d786ce23d00..2f0c1a3b8da 100644 --- a/clang/lib/Parse/ParseDecl.cpp +++ b/clang/lib/Parse/ParseDecl.cpp @@ -2038,10 +2038,9 @@ bool Parser::ParseImplicitInt(DeclSpec &DS, CXXScopeSpec *SS, // error, do lookahead to try to do better recovery. This never applies // within a type specifier. Outside of C++, we allow this even if the // language doesn't "officially" support implicit int -- we support - // implicit int as an extension in C99 and C11. Allegedly, MS also - // supports implicit int in C++ mode. + // implicit int as an extension in C99 and C11. if (DSC != DSC_type_specifier && DSC != DSC_trailing && - (!getLangOpts().CPlusPlus || getLangOpts().MicrosoftExt) && + !getLangOpts().CPlusPlus && isValidAfterIdentifierInDeclarator(NextToken())) { // If this token is valid for implicit int, e.g. "static x = 4", then // we just avoid eating the identifier, so it will be parsed as the |