-
- Downloads
Start migration of static analyzer to using the
implicit lvalue-to-rvalue casts that John McCall recently introduced. This causes a whole bunch of logic in the analyzer for handling lvalues to vanish. It does, however, raise a few issues in the analyzer w.r.t to modeling various constructs (e.g., field accesses to compound literals). The .c/.m analysis test cases that fail are due to a missing lvalue-to-rvalue cast that will get introduced into the AST. The .cpp failures were more than I could investigate in one go, and the patch was already getting huge. I have XFAILED some of these tests, and they should obviously be further investigated. Some highlights of this patch include: - CFG no longer requires an lvalue bit for CFGElements - StackFrameContext doesn't need an 'asLValue' flag - The "VisitLValue" path from GRExprEngine has been eliminated. Besides the test case failures (XFAILed), there are surely other bugs that are fallout from this change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121960 91177308-0d34-0410-b5e6-96231b3b80d8
Showing
- include/clang/Analysis/AnalysisContext.h 12 additions, 8 deletionsinclude/clang/Analysis/AnalysisContext.h
- include/clang/Analysis/CFG.h 7 additions, 11 deletionsinclude/clang/Analysis/CFG.h
- include/clang/Checker/PathSensitive/AnalysisManager.h 5 additions, 5 deletionsinclude/clang/Checker/PathSensitive/AnalysisManager.h
- include/clang/Checker/PathSensitive/CheckerVisitor.def 3 additions, 0 deletionsinclude/clang/Checker/PathSensitive/CheckerVisitor.def
- include/clang/Checker/PathSensitive/CheckerVisitor.h 0 additions, 7 deletionsinclude/clang/Checker/PathSensitive/CheckerVisitor.h
- include/clang/Checker/PathSensitive/GRExprEngine.h 18 additions, 33 deletionsinclude/clang/Checker/PathSensitive/GRExprEngine.h
- lib/Analysis/AnalysisContext.cpp 4 additions, 5 deletionslib/Analysis/AnalysisContext.cpp
- lib/Analysis/CFG.cpp 44 additions, 87 deletionslib/Analysis/CFG.cpp
- lib/Analysis/PseudoConstantAnalysis.cpp 5 additions, 2 deletionslib/Analysis/PseudoConstantAnalysis.cpp
- lib/Analysis/ReachableCode.cpp 3 additions, 3 deletionslib/Analysis/ReachableCode.cpp
- lib/Checker/AggExprVisitor.cpp 1 addition, 1 deletionlib/Checker/AggExprVisitor.cpp
- lib/Checker/BugReporterVisitors.cpp 3 additions, 2 deletionslib/Checker/BugReporterVisitors.cpp
- lib/Checker/DereferenceChecker.cpp 5 additions, 0 deletionslib/Checker/DereferenceChecker.cpp
- lib/Checker/Environment.cpp 1 addition, 2 deletionslib/Checker/Environment.cpp
- lib/Checker/GRCXXExprEngine.cpp 7 additions, 13 deletionslib/Checker/GRCXXExprEngine.cpp
- lib/Checker/GRCoreEngine.cpp 1 addition, 1 deletionlib/Checker/GRCoreEngine.cpp
- lib/Checker/GRExprEngine.cpp 132 additions, 439 deletionslib/Checker/GRExprEngine.cpp
- test/Analysis/constant-folding.c 1 addition, 0 deletionstest/Analysis/constant-folding.c
- test/Analysis/idempotent-operations.c 1 addition, 0 deletionstest/Analysis/idempotent-operations.c
- test/Analysis/method-call.cpp 1 addition, 0 deletionstest/Analysis/method-call.cpp
Loading
Please register or sign in to comment