r339655 - [analyzer] Made a buildbot happy.
Kristof Umann via cfe-commits
cfe-commits at lists.llvm.org
Tue Aug 14 01:38:35 PDT 2018
Author: szelethus
Date: Tue Aug 14 01:38:35 2018
New Revision: 339655
URL: http://llvm.org/viewvc/llvm-project?rev=339655&view=rev
Log:
[analyzer] Made a buildbot happy.
Modified:
cfe/trunk/lib/StaticAnalyzer/Checkers/UninitializedObject/UninitializedPointee.cpp
Modified: cfe/trunk/lib/StaticAnalyzer/Checkers/UninitializedObject/UninitializedPointee.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/StaticAnalyzer/Checkers/UninitializedObject/UninitializedPointee.cpp?rev=339655&r1=339654&r2=339655&view=diff
==============================================================================
--- cfe/trunk/lib/StaticAnalyzer/Checkers/UninitializedObject/UninitializedPointee.cpp (original)
+++ cfe/trunk/lib/StaticAnalyzer/Checkers/UninitializedObject/UninitializedPointee.cpp Tue Aug 14 01:38:35 2018
@@ -215,10 +215,12 @@ bool FindUninitializedFields::isPointerO
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)
More information about the cfe-commits
mailing list