[clang] efc75a2 - Remove redundant condition check, NFC

Jun Zhang via cfe-commits cfe-commits at lists.llvm.org
Thu Aug 11 06:47:36 PDT 2022


Author: Jun Zhang
Date: 2022-08-11T21:47:19+08:00
New Revision: efc75a2baedc7405193e3e0f5ea9aaa881783cec

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

LOG: Remove redundant condition check, NFC

Signed-off-by: Jun Zhang <jun at junz.org>

Added: 
    

Modified: 
    clang/lib/Parse/ParseDecl.cpp

Removed: 
    


################################################################################
diff  --git a/clang/lib/Parse/ParseDecl.cpp b/clang/lib/Parse/ParseDecl.cpp
index 72d4804a1758e..39ba93ee33859 100644
--- a/clang/lib/Parse/ParseDecl.cpp
+++ b/clang/lib/Parse/ParseDecl.cpp
@@ -2078,10 +2078,8 @@ Parser::DeclGroupPtrTy Parser::ParseDeclGroup(ParsingDeclSpec &DS,
           << (Fixit ? FixItHint::CreateInsertion(D.getBeginLoc(), "_Noreturn ")
                     : FixItHint());
     }
-  }
 
-  // Check to see if we have a function *definition* which must have a body.
-  if (D.isFunctionDeclarator()) {
+    // Check to see if we have a function *definition* which must have a body.
     if (Tok.is(tok::equal) && NextToken().is(tok::code_completion)) {
       cutOffParsing();
       Actions.CodeCompleteAfterFunctionEquals(D);


        


More information about the cfe-commits mailing list