[clang] 3b7708e - Assert we've found the size of each (non-overlapping) structure. NFCI.

Simon Pilgrim via cfe-commits cfe-commits at lists.llvm.org
Mon Sep 14 08:11:49 PDT 2020


Author: Simon Pilgrim
Date: 2020-09-14T16:10:52+01:00
New Revision: 3b7708e2deb48befcef764fb69f9217f55ac1155

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

LOG: Assert we've found the size of each (non-overlapping) structure. NFCI.

Fixes clang static analyzer warning.

Added: 
    

Modified: 
    clang/lib/CodeGen/CGOpenMPRuntime.cpp

Removed: 
    


################################################################################
diff  --git a/clang/lib/CodeGen/CGOpenMPRuntime.cpp b/clang/lib/CodeGen/CGOpenMPRuntime.cpp
index c55403920d8f..5384e9196896 100644
--- a/clang/lib/CodeGen/CGOpenMPRuntime.cpp
+++ b/clang/lib/CodeGen/CGOpenMPRuntime.cpp
@@ -7692,6 +7692,7 @@ class MappableExprsHandler {
                 break;
               }
             }
+            assert(Size && "Failed to determine structure size");
             CombinedInfo.BasePointers.push_back(BP.getPointer());
             CombinedInfo.Pointers.push_back(LB.getPointer());
             CombinedInfo.Sizes.push_back(CGF.Builder.CreateIntCast(


        


More information about the cfe-commits mailing list