]> granicus.if.org Git - clang/commitdiff
[analyzer] Fix unused variable warnings in Release builds
authorBenjamin Kramer <benny.kra@googlemail.com>
Sat, 12 Jan 2019 12:43:53 +0000 (12:43 +0000)
committerBenjamin Kramer <benny.kra@googlemail.com>
Sat, 12 Jan 2019 12:43:53 +0000 (12:43 +0000)
This was just an inlined version of isa<CXXConstructExpr>. NFC.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@351007 91177308-0d34-0410-b5e6-96231b3b80d8

lib/StaticAnalyzer/Core/CallEvent.cpp

index e26e7de10e8c696c2ba9fd6ec8e32be1987a67cd..0e7f31502e81a0277f978d977e310e6f69d85207 100644 (file)
@@ -1372,12 +1372,9 @@ CallEventManager::getCaller(const StackFrameContext *CalleeCtx,
     if (CallEventRef<> Out = getCall(CallSite, State, CallerCtx))
       return Out;
 
-    Stmt::StmtClass SC = CallSite->getStmtClass();
-
     // All other cases are handled by getCall.
-    assert(SC == Stmt::CXXConstructExprClass ||
-           SC == Stmt::CXXTemporaryObjectExprClass &&
-               "This is not an inlineable statement");
+    assert(isa<CXXConstructExpr>(CallSite) &&
+           "This is not an inlineable statement");
 
     SValBuilder &SVB = State->getStateManager().getSValBuilder();
     const auto *Ctor = cast<CXXMethodDecl>(CalleeCtx->getDecl());