[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)
llvm-svn: 339655

clang/lib/StaticAnalyzer/Checkers/UninitializedObject/UninitializedPointee.cpp

index c855f97..e459d98 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)