[clang] 64d06ed - [clang][parse][NFC] Remove dead ProhibitAttributes() call

Timm Bäder via cfe-commits cfe-commits at lists.llvm.org
Tue Feb 23 04:56:20 PST 2021


Author: Timm Bäder
Date: 2021-02-23T13:54:35+01:00
New Revision: 64d06ed9c9e0389cd27545d2f6e20455a91d89b1

URL: https://github.com/llvm/llvm-project/commit/64d06ed9c9e0389cd27545d2f6e20455a91d89b1
DIFF: https://github.com/llvm/llvm-project/commit/64d06ed9c9e0389cd27545d2f6e20455a91d89b1.diff

LOG: [clang][parse][NFC] Remove dead ProhibitAttributes() call

GNU-style attribute in enum bodies are allowed (and used by several
tests), and this call to ProhibitAttributes() was dead code.

Differential Revision: https://reviews.llvm.org/D97271

Added: 
    

Modified: 
    clang/lib/Parse/ParseDecl.cpp

Removed: 
    


################################################################################
diff  --git a/clang/lib/Parse/ParseDecl.cpp b/clang/lib/Parse/ParseDecl.cpp
index 3d5c984033fa..069f981d1b02 100644
--- a/clang/lib/Parse/ParseDecl.cpp
+++ b/clang/lib/Parse/ParseDecl.cpp
@@ -4771,7 +4771,6 @@ void Parser::ParseEnumBody(SourceLocation StartLoc, Decl *EnumDecl) {
     // If attributes exist after the enumerator, parse them.
     ParsedAttributesWithRange attrs(AttrFactory);
     MaybeParseGNUAttributes(attrs);
-    ProhibitAttributes(attrs); // GNU-style attributes are prohibited.
     if (standardAttributesAllowed() && isCXX11AttributeSpecifier()) {
       if (getLangOpts().CPlusPlus)
         Diag(Tok.getLocation(), getLangOpts().CPlusPlus17


        


More information about the cfe-commits mailing list