aboutsummaryrefslogtreecommitdiff
path: root/lib/Sema
diff options
context:
space:
mode:
authorRichard Smith <richard-llvm@metafoo.co.uk>2013-04-30 22:43:51 +0000
committerRichard Smith <richard-llvm@metafoo.co.uk>2013-04-30 22:43:51 +0000
commit58eb37036b47bbe7433f72d92a2cb60848507707 (patch)
tree5f961418f869f9ae7be8ca023ad49224a337625a /lib/Sema
parent826374a4de73088a8abfaa5f031ba54f1d9fbee0 (diff)
Fix PR15845: apparently MSVC does not support implicit int in C++ mode.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@180822 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema')
-rw-r--r--lib/Sema/DeclSpec.cpp3
-rw-r--r--lib/Sema/SemaType.cpp4
2 files changed, 2 insertions, 5 deletions
diff --git a/lib/Sema/DeclSpec.cpp b/lib/Sema/DeclSpec.cpp
index 124f50cabd..3b3ab2c27b 100644
--- a/lib/Sema/DeclSpec.cpp
+++ b/lib/Sema/DeclSpec.cpp
@@ -1003,8 +1003,7 @@ void DeclSpec::Finish(DiagnosticsEngine &D, Preprocessor &PP) {
// the type specifier is not optional, but we got 'auto' as a storage
// class specifier, then assume this is an attempt to use C++0x's 'auto'
// type specifier.
- // FIXME: Does Microsoft really support implicit int in C++?
- if (PP.getLangOpts().CPlusPlus && !PP.getLangOpts().MicrosoftExt &&
+ if (PP.getLangOpts().CPlusPlus &&
TypeSpecType == TST_unspecified && StorageClassSpec == SCS_auto) {
TypeSpecType = TST_auto;
StorageClassSpec = SCS_unspecified;
diff --git a/lib/Sema/SemaType.cpp b/lib/Sema/SemaType.cpp
index 7ed16878db..2503b49a61 100644
--- a/lib/Sema/SemaType.cpp
+++ b/lib/Sema/SemaType.cpp
@@ -793,9 +793,7 @@ static QualType ConvertDeclSpecToType(TypeProcessingState &state) {
// "At least one type specifier shall be given in the declaration
// specifiers in each declaration, and in the specifier-qualifier list in
// each struct declaration and type name."
- // FIXME: Does Microsoft really have the implicit int extension in C++?
- if (S.getLangOpts().CPlusPlus &&
- !S.getLangOpts().MicrosoftExt) {
+ if (S.getLangOpts().CPlusPlus) {
S.Diag(DeclLoc, diag::err_missing_type_specifier)
<< DS.getSourceRange();