llvm-project/clang/lib/StaticAnalyzer/Core
Jordan Rose f9e9a9f41b [analyzer] Base regions may be invalid when layered on symbolic regions.
While RegionStore checks to make sure casts on TypedValueRegions are valid,
it does not do the same for SymbolicRegions, which do not have perfect type
info anyway. Additionally, MemRegion::getAsOffset does not take a
ProgramState, so it can't use dynamic type info to determine a better type
for the regions. (This could also be dangerous if the type of a super-region
changes!)

Account for this by checking that a base object region is valid on top of a
symbolic region, and falling back to "symbolic offset" mode if not.

Fixes PR15345.

llvm-svn: 176034
2013-02-25 18:36:15 +00:00
..
APSIntType.cpp [analyzer] Rework both constraint managers to handle mixed-type comparisons. 2012-05-08 03:27:16 +00:00
AnalysisManager.cpp Have AnalyzerOptions::getBooleanOption() stick the matching config 2012-10-01 18:28:19 +00:00
AnalyzerOptions.cpp Include llvm::Optional in clang/Basic/LLVM.h 2013-02-20 22:23:23 +00:00
BasicValueFactory.cpp [analyzer] Disallow creation of int vals with explicit bit width / signedness. 2012-09-01 17:39:24 +00:00
BlockCounter.cpp Cleanup various declarations of 'Stmt*' to be 'Stmt *', etc. in libAnalyzer and libStaticAnalyzer[*]. It was highly inconsistent, and very ugly to look at. 2011-08-12 23:37:29 +00:00
BugReporter.cpp Remove the CFGElement "Invalid" state. 2013-02-23 00:29:34 +00:00
BugReporterVisitors.cpp [analyzer] Relax assumption in FindLastStoreBRVisitor that the thing we are looking for is always a VarRegion. 2013-02-25 07:37:18 +00:00
CMakeLists.txt Remove ProgramState::getSymVal(). It was being misused by Checkers, 2012-09-07 22:31:01 +00:00
CallEvent.cpp Remove the CFGElement "Invalid" state. 2013-02-23 00:29:34 +00:00
Checker.cpp Reapply r149311 which I reverted by mistake. 2012-01-31 02:23:28 +00:00
CheckerContext.cpp [analyzer] Add some convenience accessors to CallEvent, and use them. 2012-11-02 23:49:29 +00:00
CheckerHelpers.cpp Split 'include/clang/StaticAnalyzer' into 'include/clang/StaticAnalyzer/Core' and 'include/clang/StaticAnalyzer/Checkers'. 2011-02-10 01:03:03 +00:00
CheckerManager.cpp [analyzer] Add pointer escape type param to checkPointerEscape callback 2013-02-07 23:05:43 +00:00
CheckerRegistry.cpp Remove useless 'llvm::' qualifier from names like StringRef and others that are 2013-01-12 19:30:44 +00:00
ConstraintManager.cpp [analyzer] Let ConstraintManager subclasses provide a more efficient checkNull. 2012-10-31 16:44:55 +00:00
CoreEngine.cpp Remove the CFGElement "Invalid" state. 2013-02-23 00:29:34 +00:00
Environment.cpp Include llvm::Optional in clang/Basic/LLVM.h 2013-02-20 22:23:23 +00:00
ExplodedGraph.cpp [analyzer] add the notion of an "interesting" lvalue expression for ExplodedNode pruning. 2013-02-25 07:37:13 +00:00
ExprEngine.cpp Remove the CFGElement "Invalid" state. 2013-02-23 00:29:34 +00:00
ExprEngineC.cpp Remove the CFGElement "Invalid" state. 2013-02-23 00:29:34 +00:00
ExprEngineCXX.cpp Remove the CFGElement "Invalid" state. 2013-02-23 00:29:34 +00:00
ExprEngineCallAndReturn.cpp [analyzer] Place all inlining policy checks into one palce 2013-02-22 02:59:24 +00:00
ExprEngineObjC.cpp Include llvm::Optional in clang/Basic/LLVM.h 2013-02-20 22:23:23 +00:00
FunctionSummary.cpp [analyzer] Record the basic blocks covered by the analyzes run. 2012-04-03 02:05:47 +00:00
HTMLDiagnostics.cpp Pass AnalyzerOptions to PathDiagnosticConsumer to make analyzer options accessible there. 2012-12-19 01:35:35 +00:00
Makefile
MemRegion.cpp [analyzer] Base regions may be invalid when layered on symbolic regions. 2013-02-25 18:36:15 +00:00
PathDiagnostic.cpp Remove the CFGElement "Invalid" state. 2013-02-23 00:29:34 +00:00
PlistDiagnostics.cpp Remove useless 'llvm::' qualifier from names like StringRef and others that are 2013-01-12 19:30:44 +00:00
ProgramState.cpp Include llvm::Optional in clang/Basic/LLVM.h 2013-02-20 22:23:23 +00:00
RangeConstraintManager.cpp Sort all of Clang's files under 'lib', and fix up the broken headers 2012-12-04 09:13:33 +00:00
RegionStore.cpp [analyzer] Tidy up a few uses of Optional in RegionStore. 2013-02-21 03:12:21 +00:00
SValBuilder.cpp Include llvm::Optional in clang/Basic/LLVM.h 2013-02-20 22:23:23 +00:00
SVals.cpp Include llvm::Optional in clang/Basic/LLVM.h 2013-02-20 22:23:23 +00:00
SimpleConstraintManager.cpp Include llvm::Optional in clang/Basic/LLVM.h 2013-02-20 22:23:23 +00:00
SimpleConstraintManager.h [analyzer] Make ProgramStateManager's SubEngine parameter optional. 2012-10-01 16:53:40 +00:00
SimpleSValBuilder.cpp Include llvm::Optional in clang/Basic/LLVM.h 2013-02-20 22:23:23 +00:00
Store.cpp [analyzer] Record whether a base object region represents a virtual base. 2013-02-21 03:12:32 +00:00
SubEngine.cpp Unweaken vtables as per http://llvm.org/docs/CodingStandards.html#ll_virtual_anch 2011-12-20 02:48:34 +00:00
SymbolManager.cpp [analyzer] Run remove dead on end of path. 2012-11-03 02:54:20 +00:00
TextPathDiagnostics.cpp Pass AnalyzerOptions to PathDiagnosticConsumer to make analyzer options accessible there. 2012-12-19 01:35:35 +00:00