summaryrefslogtreecommitdiff
path: root/lib/Sema/DeclSpec.cpp
diff options
context:
space:
mode:
authorLeonard Chan <leonardchan@google.com>2018-06-02 03:27:13 +0000
committerLeonard Chan <leonardchan@google.com>2018-06-02 03:27:13 +0000
commita07c88c0e8122047e77954a885af7dfc8bcdd87f (patch)
treefe1a59748ccd21c133c66c67c42c69a4b0b7e506 /lib/Sema/DeclSpec.cpp
parentd10551520b50a0c7c847b35ae27066fee5a6617e (diff)
downloadclang-a07c88c0e8122047e77954a885af7dfc8bcdd87f.tar.gz
Revert "This diff includes changes for supporting the following types."
This reverts commit r333814, which fails for a test checking the bit width on ubuntu. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@333815 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/DeclSpec.cpp')
-rw-r--r--lib/Sema/DeclSpec.cpp15
1 files changed, 5 insertions, 10 deletions
diff --git a/lib/Sema/DeclSpec.cpp b/lib/Sema/DeclSpec.cpp
index aa5f197b54..dd2476ec37 100644
--- a/lib/Sema/DeclSpec.cpp
+++ b/lib/Sema/DeclSpec.cpp
@@ -339,7 +339,6 @@ bool Declarator::isDeclarationOfFunction() const {
case TST_decimal32:
case TST_decimal64:
case TST_double:
- case TST_Accum:
case TST_Float16:
case TST_float128:
case TST_enum:
@@ -511,7 +510,6 @@ const char *DeclSpec::getSpecifierName(DeclSpec::TST T,
case DeclSpec::TST_half: return "half";
case DeclSpec::TST_float: return "float";
case DeclSpec::TST_double: return "double";
- case DeclSpec::TST_accum: return "_Accum";
case DeclSpec::TST_float16: return "_Float16";
case DeclSpec::TST_float128: return "__float128";
case DeclSpec::TST_bool: return Policy.Bool ? "bool" : "_Bool";
@@ -1102,13 +1100,12 @@ void DeclSpec::Finish(Sema &S, const PrintingPolicy &Policy) {
}
}
- // signed/unsigned are only valid with int/char/wchar_t/_Accum.
+ // signed/unsigned are only valid with int/char/wchar_t.
if (TypeSpecSign != TSS_unspecified) {
if (TypeSpecType == TST_unspecified)
TypeSpecType = TST_int; // unsigned -> unsigned int, signed -> signed int.
- else if (TypeSpecType != TST_int && TypeSpecType != TST_int128 &&
- TypeSpecType != TST_char && TypeSpecType != TST_wchar &&
- TypeSpecType != TST_accum) {
+ else if (TypeSpecType != TST_int && TypeSpecType != TST_int128 &&
+ TypeSpecType != TST_char && TypeSpecType != TST_wchar) {
S.Diag(TSSLoc, diag::err_invalid_sign_spec)
<< getSpecifierName((TST)TypeSpecType, Policy);
// signed double -> double.
@@ -1123,8 +1120,7 @@ void DeclSpec::Finish(Sema &S, const PrintingPolicy &Policy) {
case TSW_longlong: // long long int
if (TypeSpecType == TST_unspecified)
TypeSpecType = TST_int; // short -> short int, long long -> long long int.
- else if (!(TypeSpecType == TST_int ||
- (TypeSpecType == TST_accum && TypeSpecWidth != TSW_longlong))) {
+ else if (TypeSpecType != TST_int) {
S.Diag(TSWRange.getBegin(), diag::err_invalid_width_spec)
<< (int)TypeSpecWidth << getSpecifierName((TST)TypeSpecType, Policy);
TypeSpecType = TST_int;
@@ -1134,8 +1130,7 @@ void DeclSpec::Finish(Sema &S, const PrintingPolicy &Policy) {
case TSW_long: // long double, long int
if (TypeSpecType == TST_unspecified)
TypeSpecType = TST_int; // long -> long int.
- else if (TypeSpecType != TST_int && TypeSpecType != TST_double &&
- TypeSpecType != TST_accum) {
+ else if (TypeSpecType != TST_int && TypeSpecType != TST_double) {
S.Diag(TSWRange.getBegin(), diag::err_invalid_width_spec)
<< (int)TypeSpecWidth << getSpecifierName((TST)TypeSpecType, Policy);
TypeSpecType = TST_int;