llvm-project/clang/lib/StaticAnalyzer/Core
Jordan Rose 9503501dae [analyzer] When forced to fake a block type, do it correctly.
BlockDecl has a poor AST representation because it doesn't carry its type
with it. Instead, the containing BlockExpr has the full type. This almost
never matters for the analyzer, but if the block decl contains static
local variables we need to synthesize a region to put them in, and this
region will necessarily not have the right type.

Even /that/ doesn't matter, unless

(1) the block calls the function or method containing the block, and
(2) the value of the block expr is used in some interesting way.

In this case, we actually end up needing the type of the block region,
and it will be set to our synthesized type. It turns out we've been doing
a terrible job faking that type -- it wasn't a block pointer type at all.
This commit fixes that to at least guarantee a block pointer type, using
the signature written by the user if there is one.

This is not really a correct answer because the block region's type will
/still/ be wrong, but further efforts to make this right in the analyzer
would probably be silly. We should just change the AST.

rdar://problem/21698099

llvm-svn: 241944
2015-07-10 21:41:59 +00:00
..
APSIntType.cpp [analyzer] Teach constraint managers about unsigned comparisons. 2013-03-23 01:21:33 +00:00
AnalysisManager.cpp Add support for the static analyzer to synthesize function implementations from external model files. 2014-08-27 15:14:15 +00:00
AnalyzerOptions.cpp [analyzer] Individual configuration options can be specified for checkers. 2015-03-04 17:59:34 +00:00
BasicValueFactory.cpp Fix a crash by division by zero in analyzer 2015-06-25 14:06:02 +00:00
BlockCounter.cpp Revert r240270 ("Fixed/added namespace ending comments using clang-tidy"). 2015-06-22 23:07:51 +00:00
BugReporter.cpp Rewrite users of Stmt::child_begin/end into for-range loops. 2015-07-03 15:12:24 +00:00
BugReporterVisitors.cpp Rewrite users of Stmt::child_begin/end into for-range loops. 2015-07-03 15:12:24 +00:00
CMakeLists.txt Make clang's rewrite engine a core feature 2014-07-16 16:48:33 +00:00
CallEvent.cpp Fix "the the" in comments/documentation/etc. 2015-06-19 01:52:53 +00:00
Checker.cpp Analyzer: Replace a set of particularly ugly faux variadics. 2015-02-15 20:11:07 +00:00
CheckerContext.cpp Cleanup handling of UniqueExternalLinkage. 2013-05-13 00:12:11 +00:00
CheckerHelpers.cpp Rewrite users of Stmt::child_begin/end into for-range loops. 2015-07-03 15:12:24 +00:00
CheckerManager.cpp Revert r240270 ("Fixed/added namespace ending comments using clang-tidy"). 2015-06-22 23:07:51 +00:00
CheckerRegistry.cpp [Static Analyzer] Basic per checker command line option validation. 2015-07-09 21:43:45 +00:00
CommonBugCategories.cpp [analyzer] Replace bug category magic strings with shared constants, take 2. 2013-10-04 00:25:24 +00:00
ConstraintManager.cpp
CoreEngine.cpp Simplify ownership of ExplodedGraph in the CoreEngine by removing unique_ptr indirection. 2014-08-08 23:36:37 +00:00
Environment.cpp Removing an "if (this == nullptr)" check from two print methods. The condition 2014-06-09 22:53:25 +00:00
ExplodedGraph.cpp Reduce double set lookups. NFC. 2014-10-10 15:32:48 +00:00
ExprEngine.cpp [OPENMP 4.0] Initial support for 'omp cancel' construct. 2015-07-02 11:25:17 +00:00
ExprEngineC.cpp Test commit, no changes. 2015-01-20 09:47:57 +00:00
ExprEngineCXX.cpp [C++11] Use 'nullptr'. StaticAnalyzer edition. 2014-05-27 02:45:47 +00:00
ExprEngineCallAndReturn.cpp Do not inline methods of C++ containers (coming from headers). 2014-06-27 01:03:05 +00:00
ExprEngineObjC.cpp [C++11] Use 'nullptr'. StaticAnalyzer edition. 2014-05-27 02:45:47 +00:00
FunctionSummary.cpp [analyzer] Use inline storage in the FunctionSummary DenseMap. 2013-04-02 00:26:26 +00:00
HTMLDiagnostics.cpp Don't use std::errc. 2015-06-13 17:23:13 +00:00
Makefile
MemRegion.cpp [analyzer] When forced to fake a block type, do it correctly. 2015-07-10 21:41:59 +00:00
PathDiagnostic.cpp [Analyzer] Don't inherit from FoldingSet. 2015-03-22 18:16:22 +00:00
PlistDiagnostics.cpp Use 'override/final' instead of 'virtual' for overridden methods 2015-04-11 02:00:23 +00:00
PrettyStackTraceLocationContext.h Revert r240270 ("Fixed/added namespace ending comments using clang-tidy"). 2015-06-22 23:07:51 +00:00
ProgramState.cpp Revert r240270 ("Fixed/added namespace ending comments using clang-tidy"). 2015-06-22 23:07:51 +00:00
RangeConstraintManager.cpp unique_ptrify the result of ConstraintManagerCreator and StoreManagerCreator 2014-09-04 23:54:37 +00:00
RegionStore.cpp Revert r240270 ("Fixed/added namespace ending comments using clang-tidy"). 2015-06-22 23:07:51 +00:00
SValBuilder.cpp [analyzer] Always use 'bool' as the SValBuilder condition type in C++. 2013-12-19 22:32:39 +00:00
SVals.cpp [C++11] Use 'nullptr'. StaticAnalyzer edition. 2014-05-27 02:45:47 +00:00
SimpleConstraintManager.cpp [C++11] Use 'nullptr'. StaticAnalyzer edition. 2014-05-27 02:45:47 +00:00
SimpleConstraintManager.h Revert r240270 ("Fixed/added namespace ending comments using clang-tidy"). 2015-06-22 23:07:51 +00:00
SimpleSValBuilder.cpp Use 'override/final' instead of 'virtual' for overridden methods 2015-04-11 02:00:23 +00:00
Store.cpp [analyzer] Refactor and cleanup IsCompleteType 2014-10-03 21:49:03 +00:00
SubEngine.cpp
SymbolManager.cpp [C++11] Use 'nullptr'. StaticAnalyzer edition. 2014-05-27 02:45:47 +00:00