[PATCH] D25326: [StaticAnalyser] Don't merge different returns in ExplodedGraph

Bill Seurer via cfe-commits cfe-commits at lists.llvm.org
Fri Oct 7 10:34:55 PDT 2016


On 10/07/16 08:39, Daniel Marjamäki via cfe-commits wrote:
> danielmarjamaki removed rL LLVM as the repository for this revision.
> danielmarjamaki updated this revision to Diff 73926.
> danielmarjamaki added a comment.
>
> Refactoring.
>
>
> https://reviews.llvm.org/D25326
>
> Files:
>   include/clang/Analysis/ProgramPoint.h
>   include/clang/StaticAnalyzer/Core/PathSensitive/CoreEngine.h
>   include/clang/StaticAnalyzer/Core/PathSensitive/ExprEngine.h
>   include/clang/StaticAnalyzer/Core/PathSensitive/SubEngine.h
>   lib/StaticAnalyzer/Core/CoreEngine.cpp
>   lib/StaticAnalyzer/Core/ExprEngine.cpp
>   test/Analysis/inlining/InlineObjCClassMethod.m
>   test/Analysis/unreachable-code-path.c
>
>
>
> _______________________________________________
> cfe-commits mailing list
> cfe-commits at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
>

The changes in CoreEngine.cpp cause issues with the sanitizer buildbots 
which compile with -Werror

[ 80%] Building CXX object 
tools/clang/lib/StaticAnalyzer/Core/CMakeFiles/clangStaticAnalyzerCore.dir/CoreEngine.cpp.o
cd /home/seurer/llvm/build/llvm-test/tools/clang/lib/StaticAnalyzer/Core 
&& /home/seurer/llvm/build/llvm-test2/bin/clang++   -DCLANG_ENABLE_ARCMT 
-DCLANG_ENABLE_OBJC_REWRITER -DCLANG_ENABLE_STATIC_ANALYZER 
-DGTEST_HAS_RTTI=0 -D_DEBUG -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS 
-D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS 
-I/home/seurer/llvm/build/llvm-test/tools/clang/lib/StaticAnalyzer/Core 
-I/home/seurer/llvm/llvm-test/tools/clang/lib/StaticAnalyzer/Core 
-I/home/seurer/llvm/llvm-test/tools/clang/include 
-I/home/seurer/llvm/build/llvm-test/tools/clang/include 
-I/home/seurer/llvm/build/llvm-test/include 
-I/home/seurer/llvm/llvm-test/include  -gmlt -fPIC 
-fvisibility-inlines-hidden -Wall -W -Wno-unused-parameter 
-Wwrite-strings -Wcast-qual -Wmissing-field-initializers -pedantic 
-Wno-long-long -Wcovered-switch-default -Wnon-virtual-dtor 
-Wdelete-non-virtual-dtor -Werror -Werror=date-time -std=c++11 
-ffunction-sections -fdata-sections -fno-common -Woverloaded-virtual 
-Wno-nested-anon-types -O3    -UNDEBUG  -fno-exceptions -fno-rtti -o 
CMakeFiles/clangStaticAnalyzerCore.dir/CoreEngine.cpp.o -c 
/home/seurer/llvm/llvm-test/tools/clang/lib/StaticAnalyzer/Core/CoreEngine.cpp
/home/seurer/llvm/llvm-test/tools/clang/lib/StaticAnalyzer/Core/CoreEngine.cpp:316:16: 
error: using the result of an assignment as a condition without parentheses
       [-Werror,-Wparentheses]
         if (RS = dyn_cast<ReturnStmt>(LastStmt->getStmt())) {
             ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/seurer/llvm/llvm-test/tools/clang/lib/StaticAnalyzer/Core/CoreEngine.cpp:316:16: 
note: place parentheses around the assignment to silence this warning
         if (RS = dyn_cast<ReturnStmt>(LastStmt->getStmt())) {
                ^
             (                                             )
/home/seurer/llvm/llvm-test/tools/clang/lib/StaticAnalyzer/Core/CoreEngine.cpp:316:16: 
note: use '==' to turn this assignment into an equality comparison
         if (RS = dyn_cast<ReturnStmt>(LastStmt->getStmt())) {
                ^
                ==
1 error generated.

-- 

-Bill Seurer

-- 

-Bill Seurer



More information about the cfe-commits mailing list