aboutsummaryrefslogtreecommitdiff
path: root/lib/Sema/SemaType.cpp
diff options
context:
space:
mode:
authorRichard Smith <richard-llvm@metafoo.co.uk>2011-10-18 20:49:44 +0000
committerRichard Smith <richard-llvm@metafoo.co.uk>2011-10-18 20:49:44 +0000
commitebaf0e6ab743394dda086a01b457838cb6e589a8 (patch)
tree731d496e1c1d0b3247aea91eaf79c4aee5be86fc /lib/Sema/SemaType.cpp
parent024f4be866d13dd2b0ec062e694a62ca84c37191 (diff)
-Wc++98-compat and -Wc++98-compat-pedantic warnings for Sema, part 1.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142419 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaType.cpp')
-rw-r--r--lib/Sema/SemaType.cpp14
1 files changed, 8 insertions, 6 deletions
diff --git a/lib/Sema/SemaType.cpp b/lib/Sema/SemaType.cpp
index fe5b719591..f3a705f93e 100644
--- a/lib/Sema/SemaType.cpp
+++ b/lib/Sema/SemaType.cpp
@@ -689,9 +689,10 @@ static QualType ConvertDeclSpecToType(TypeProcessingState &state) {
Result = Context.LongLongTy;
// long long is a C99 feature.
- if (!S.getLangOptions().C99 &&
- !S.getLangOptions().CPlusPlus0x)
- S.Diag(DS.getTypeSpecWidthLoc(), diag::ext_longlong);
+ if (!S.getLangOptions().C99)
+ S.Diag(DS.getTypeSpecWidthLoc(),
+ S.getLangOptions().CPlusPlus0x ?
+ diag::warn_cxx98_compat_longlong : diag::ext_longlong);
break;
}
} else {
@@ -703,9 +704,10 @@ static QualType ConvertDeclSpecToType(TypeProcessingState &state) {
Result = Context.UnsignedLongLongTy;
// long long is a C99 feature.
- if (!S.getLangOptions().C99 &&
- !S.getLangOptions().CPlusPlus0x)
- S.Diag(DS.getTypeSpecWidthLoc(), diag::ext_longlong);
+ if (!S.getLangOptions().C99)
+ S.Diag(DS.getTypeSpecWidthLoc(),
+ S.getLangOptions().CPlusPlus0x ?
+ diag::warn_cxx98_compat_longlong : diag::ext_longlong);
break;
}
}