Author: labath
Date: Wed Mar 14 03:16:40 2018
New Revision: 327491

URL: http://llvm.org/viewvc/llvm-project?rev=327491&view=rev
Log:
StaticAnalyzer: fix compiler warning. NFC

My compiler (clang-3.8) complains that the RCC variable is unused.
That's not really true, as it's checked by the if-declaration, but it's
also kinda true, because we don't need to declaration if we only check
it in the if statement.

In reality, all this means that the dyn_cast<> can be replaced by isa<>,
so that's what I do here.

Modified:
    cfe/trunk/lib/StaticAnalyzer/Core/ExprEngine.cpp

Modified: cfe/trunk/lib/StaticAnalyzer/Core/ExprEngine.cpp
URL: 
http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/StaticAnalyzer/Core/ExprEngine.cpp?rev=327491&r1=327490&r2=327491&view=diff
==============================================================================
--- cfe/trunk/lib/StaticAnalyzer/Core/ExprEngine.cpp (original)
+++ cfe/trunk/lib/StaticAnalyzer/Core/ExprEngine.cpp Wed Mar 14 03:16:40 2018
@@ -464,7 +464,7 @@ ProgramStateRef ExprEngine::addAllNecess
 
     // If the temporary is being returned from the function, it will be
     // destroyed or lifetime-extended in the caller stack frame.
-    if (const auto *RCC = dyn_cast<ReturnedValueConstructionContext>(CC)) {
+    if (isa<ReturnedValueConstructionContext>(CC)) {
       const StackFrameContext *SFC = LC->getCurrentStackFrame();
       assert(SFC);
       if (SFC->getParent()) {


_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to