[clang] 77472a6 - [clang] NFC: Dead code removal in SemaDecl.cpp, CheckMultiVersionFunction().

Tom Honermann via cfe-commits cfe-commits at lists.llvm.org
Mon Mar 21 10:39:59 PDT 2022


Author: Tom Honermann
Date: 2022-03-21T13:39:42-04:00
New Revision: 77472a659e2535607e8150f122ae2448aec67e62

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

LOG: [clang] NFC: Dead code removal in SemaDecl.cpp, CheckMultiVersionFunction().

This change removes dead code in the definition of CheckMultiVersionFunction()
in clang/lib/Sema/SemaDecl.cpp. The removed code was made dead by commit
fc53eb69c26cdd7efa6b629c187d04326f0448ca: "Reapply 'Implement target_clones multiversioning'".
See the added code just above the code being deleted; it contains the same
return statement with the previous condition now distributed across an if
statement and a switch statement.

Reviewed By: erichkeane, aaron.ballman

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

Added: 
    

Modified: 
    clang/lib/Sema/SemaDecl.cpp

Removed: 
    


################################################################################
diff  --git a/clang/lib/Sema/SemaDecl.cpp b/clang/lib/Sema/SemaDecl.cpp
index 1c4cd616c46d8..852bf64a0a586 100644
--- a/clang/lib/Sema/SemaDecl.cpp
+++ b/clang/lib/Sema/SemaDecl.cpp
@@ -10931,11 +10931,6 @@ static bool CheckMultiVersionFunction(Sema &S, FunctionDecl *NewFD,
       break;
     }
   }
-  // Handle the target potentially causes multiversioning case.
-  if (!OldFD->isMultiVersion() && MVType == MultiVersionKind::Target)
-    return CheckTargetCausesMultiVersioning(S, OldFD, NewFD, NewTA,
-                                            Redeclaration, OldDecl,
-                                            MergeTypeWithPrevious, Previous);
 
   // At this point, we have a multiversion function decl (in OldFD) AND an
   // appropriate attribute in the current function decl.  Resolve that these are


        


More information about the cfe-commits mailing list