From: Kristof Umann Date: Tue, 14 Aug 2018 08:38:35 +0000 (+0000) Subject: [analyzer] Made a buildbot happy. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=506d271ddd99141639ce472bdc1e44b4a63b2c0f;p=clang [analyzer] Made a buildbot happy. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@339655 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/StaticAnalyzer/Checkers/UninitializedObject/UninitializedPointee.cpp b/lib/StaticAnalyzer/Checkers/UninitializedObject/UninitializedPointee.cpp index c855f97de2..e459d984f7 100644 --- a/lib/StaticAnalyzer/Checkers/UninitializedObject/UninitializedPointee.cpp +++ b/lib/StaticAnalyzer/Checkers/UninitializedObject/UninitializedPointee.cpp @@ -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)