]> granicus.if.org Git - clang/commitdiff
[analyzer] Made a buildbot happy.
authorKristof Umann <dkszelethus@gmail.com>
Tue, 14 Aug 2018 08:38:35 +0000 (08:38 +0000)
committerKristof Umann <dkszelethus@gmail.com>
Tue, 14 Aug 2018 08:38:35 +0000 (08:38 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@339655 91177308-0d34-0410-b5e6-96231b3b80d8

lib/StaticAnalyzer/Checkers/UninitializedObject/UninitializedPointee.cpp

index c855f97de2c29bed1b5fbb2e7d384a6049901ca9..e459d984f728e20ffc3623bb43041a442ee76495 100644 (file)
@@ -215,10 +215,12 @@ bool FindUninitializedFields::isPointerOrReferenceUninit(
     llvm_unreachable("All cases are handled!");
   }
 
-  assert((isPrimitiveType(DynT->getPointeeType()) || DynT->isPointerType() ||
-          DynT->isReferenceType()) &&
+  // Temporary variable to avoid warning from -Wunused-function.
+  bool IsPrimitive = isPrimitiveType(DynT->getPointeeType());
+  assert((IsPrimitive || DynT->isAnyPointerType() || DynT->isReferenceType()) &&
          "At this point FR must either have a primitive dynamic type, or it "
          "must be a null, undefined, unknown or concrete pointer!");
+  (void)IsPrimitive;
 
   if (isPrimitiveUninit(DerefdV)) {
     if (NeedsCastBack)