[flang-commits] [flang] 9052512 - [Flang] Remove unnecessary static_assert

David Green via flang-commits flang-commits at lists.llvm.org
Tue Jan 9 09:45:17 PST 2024


Author: David Green
Date: 2024-01-09T17:45:13Z
New Revision: 90525125421300d9d1b6bf55288bd1871855d35d

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

LOG: [Flang] Remove unnecessary static_assert

Certain compilers do not seem to like the static assert with a string, causing
a implicit conversion. It can be removed as it should not be reachable and the
mlir::failure should handle it correctly in case it is.

Added: 
    

Modified: 
    flang/lib/Optimizer/HLFIR/Transforms/OptimizedBufferization.cpp

Removed: 
    


################################################################################
diff  --git a/flang/lib/Optimizer/HLFIR/Transforms/OptimizedBufferization.cpp b/flang/lib/Optimizer/HLFIR/Transforms/OptimizedBufferization.cpp
index afdcda29e2fe19..72aa86a934271e 100644
--- a/flang/lib/Optimizer/HLFIR/Transforms/OptimizedBufferization.cpp
+++ b/flang/lib/Optimizer/HLFIR/Transforms/OptimizedBufferization.cpp
@@ -750,7 +750,6 @@ class ReductionElementalConversion : public mlir::OpRewritePattern<Op> {
                                                      reduction);
       };
     } else {
-      static_assert("Expected Op to be handled");
       return mlir::failure();
     }
 


        


More information about the flang-commits mailing list