diff options
author | Faisal Vali <faisalv@yahoo.com> | 2018-01-01 18:23:28 +0000 |
---|---|---|
committer | Faisal Vali <faisalv@yahoo.com> | 2018-01-01 18:23:28 +0000 |
commit | 1ae65827b5b1c280e1db04f7d609a92ddf40e0a9 (patch) | |
tree | 530a1e50551df595ab705b45a0f28fa51bc790c6 /lib/AST/TypeLoc.cpp | |
parent | 5f6d6d73da77174428971d53d68524da45e467c3 (diff) | |
download | clang-1ae65827b5b1c280e1db04f7d609a92ddf40e0a9.tar.gz |
Again reverting an attempt to convert the DeclSpec enums into scoped enums.
- reverts r321622, r321625, and r321626.
- the use of bit-fields is still resulting in warnings - even though we can use static-asserts to harden the code and ensure the bit-fields are wide enough. The bots still complain of warnings being seen.
- to silence the warnings requires specifying the bit-fields with the underlying enum type (as opposed to the enum type itself), which then requires lots of unnecessary static casts of each enumerator within DeclSpec to the underlying-type, which even though could be seen as implementation details, it does hamper readability - and given the additional litterings, makes me question the value of the change.
So in short - I give up (for now at least).
Sorry about the noise.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@321628 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/AST/TypeLoc.cpp')
-rw-r--r-- | lib/AST/TypeLoc.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/lib/AST/TypeLoc.cpp b/lib/AST/TypeLoc.cpp index 84f607b824..0ac50b31ac 100644 --- a/lib/AST/TypeLoc.cpp +++ b/lib/AST/TypeLoc.cpp @@ -311,19 +311,19 @@ TypeSpecifierType BuiltinTypeLoc::getWrittenTypeSpec() const { return static_cast<TypeSpecifierType>(getWrittenBuiltinSpecs().Type); switch (getTypePtr()->getKind()) { case BuiltinType::Void: - return TypeSpecifierType::TST_void; + return TST_void; case BuiltinType::Bool: - return TypeSpecifierType::TST_bool; + return TST_bool; case BuiltinType::Char_U: case BuiltinType::Char_S: - return TypeSpecifierType::TST_char; + return TST_char; case BuiltinType::Char16: - return TypeSpecifierType::TST_char16; + return TST_char16; case BuiltinType::Char32: - return TypeSpecifierType::TST_char32; + return TST_char32; case BuiltinType::WChar_S: case BuiltinType::WChar_U: - return TypeSpecifierType::TST_wchar; + return TST_wchar; case BuiltinType::UChar: case BuiltinType::UShort: case BuiltinType::UInt: @@ -365,7 +365,7 @@ TypeSpecifierType BuiltinTypeLoc::getWrittenTypeSpec() const { case BuiltinType::OCLReserveID: case BuiltinType::BuiltinFn: case BuiltinType::OMPArraySection: - return TypeSpecifierType::TST_unspecified; + return TST_unspecified; } llvm_unreachable("Invalid BuiltinType Kind!"); |