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 <j...@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);


        
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to