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 | 090da2d1ac2e6f7c6e662888bd64f7a75aa96de5 (patch) | |
tree | 7ca047e5d25b40f774db6f3df8d11928180e0cb6 /clang/lib/Sema/SemaDecl.cpp | |
parent | 0f9768dcefd336508539249d11b2631e6665cbc5 (diff) | |
download | bcm5719-llvm-090da2d1ac2e6f7c6e662888bd64f7a75aa96de5.tar.gz bcm5719-llvm-090da2d1ac2e6f7c6e662888bd64f7a75aa96de5.zip |
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.
llvm-svn: 321628
Diffstat (limited to 'clang/lib/Sema/SemaDecl.cpp')
-rw-r--r-- | clang/lib/Sema/SemaDecl.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/clang/lib/Sema/SemaDecl.cpp b/clang/lib/Sema/SemaDecl.cpp index b5c990939c5..743f4bb5e82 100644 --- a/clang/lib/Sema/SemaDecl.cpp +++ b/clang/lib/Sema/SemaDecl.cpp @@ -12786,11 +12786,11 @@ TypedefDecl *Sema::ParseTypedefDecl(Scope *S, Declarator &D, QualType T, // class type (or enum type) for linkage purposes only. // We need to check whether the type was declared in the declaration. switch (D.getDeclSpec().getTypeSpecType()) { - case TypeSpecifierType::TST_enum: - case TypeSpecifierType::TST_struct: - case TypeSpecifierType::TST_interface: - case TypeSpecifierType::TST_union: - case TypeSpecifierType::TST_class: { + case TST_enum: + case TST_struct: + case TST_interface: + case TST_union: + case TST_class: { TagDecl *tagFromDeclSpec = cast<TagDecl>(D.getDeclSpec().getRepAsDecl()); setTagNameForLinkagePurposes(tagFromDeclSpec, NewTD); break; @@ -13074,7 +13074,7 @@ static bool isAcceptableTagRedeclContext(Sema &S, DeclContext *OldDC, /// /// \param SkipBody If non-null, will be set to indicate if the caller should /// skip the definition of this tag and treat it as if it were a declaration. -Decl *Sema::ActOnTag(Scope *S, TypeSpecifierType TagSpec, TagUseKind TUK, +Decl *Sema::ActOnTag(Scope *S, unsigned TagSpec, TagUseKind TUK, SourceLocation KWLoc, CXXScopeSpec &SS, IdentifierInfo *Name, SourceLocation NameLoc, AttributeList *Attr, AccessSpecifier AS, |