llvm-project/clang/lib/Analysis
Jordan Rose cf10ea8cb2 [analyzer; new edges] Simplify edges in a C++11 for-range loop.
Previously our edges were completely broken here; now, the final result
is a very simple set of edges in most cases: one up to the "for" keyword
for context, and one into the body of the loop. This matches the behavior
for ObjC for-in loops.

In the AST, however, CXXForRangeStmts are handled very differently from
ObjCForCollectionStmts. Since they are specified in terms of equivalent
statements in the C++ standard, we actually have implicit AST nodes for
all of the semantic statements. This makes evaluation very easy, but
diagnostic locations a bit trickier. Fortunately, the problem can be
generally defined away by marking all of the implicit statements as
part of the top-level for-range statement.

One of the implicit statements in a for-range statement is the declaration
of implicit iterators __begin and __end. The CFG synthesizes two
separate DeclStmts to match each of these decls, but until now these
synthetic DeclStmts weren't in the function's ParentMap. Now, the CFG
keeps track of its synthetic statements, and the AnalysisDeclContext will
make sure to add them to the ParentMap.

<rdar://problem/14038483>

llvm-svn: 183449
2013-06-06 21:53:45 +00:00
..
AnalysisDeclContext.cpp [analyzer; new edges] Simplify edges in a C++11 for-range loop. 2013-06-06 21:53:45 +00:00
BodyFarm.cpp Replace ArrayRef<T>() with None, now that we have an implicit ArrayRef constructor from None 2013-05-05 00:41:58 +00:00
BodyFarm.h Include llvm::Optional in clang/Basic/LLVM.h 2013-02-20 22:23:23 +00:00
CFG.cpp [analyzer; new edges] Simplify edges in a C++11 for-range loop. 2013-06-06 21:53:45 +00:00
CFGReachabilityAnalysis.cpp remove unneeded llvm:: namespace qualifiers on some core types now that LLVM.h imports 2011-07-23 10:55:15 +00:00
CFGStmtMap.cpp Remove the CFGElement "Invalid" state. 2013-02-23 00:29:34 +00:00
CMakeLists.txt Implement faux-body-synthesis of well-known functions in the static analyzer when 2012-09-21 00:09:11 +00:00
CallGraph.cpp [analyzer] Fix typos. 2012-12-21 17:27:04 +00:00
CocoaConventions.cpp Excise <cctype> from Clang (except clang-tblgen) in favor of CharInfo.h. 2013-02-08 22:30:41 +00:00
Dominators.cpp Unweaken vtables as per http://llvm.org/docs/CodingStandards.html#ll_virtual_anch 2011-12-20 02:48:34 +00:00
FormatString.cpp Add support for __wchar_t in -fms-extensions mode. 2013-05-10 10:08:40 +00:00
FormatStringParsing.h Sort all of Clang's files under 'lib', and fix up the broken headers 2012-12-04 09:13:33 +00:00
LiveVariables.cpp Remove the CFGElement "Invalid" state. 2013-02-23 00:29:34 +00:00
Makefile BUILD_ARCHIVE is the default for libraries, no need to set it. 2010-07-18 00:14:47 +00:00
ObjCNoReturn.cpp clang/lib/Analysis/ObjCNoReturn.cpp: Fix [-Wnewline-eof] 2012-09-13 05:53:17 +00:00
PostOrderCFGView.cpp Unweaken vtables as per http://llvm.org/docs/CodingStandards.html#ll_virtual_anch 2011-12-20 02:48:34 +00:00
PrintfFormatString.cpp Add support for __wchar_t in -fms-extensions mode. 2013-05-10 10:08:40 +00:00
ProgramPoint.cpp [analyzer] Run remove dead bindings right before leaving a function. 2012-04-20 21:59:08 +00:00
PseudoConstantAnalysis.cpp Drop the ASTContext.h include from Stmt.h and fix up transitive users. 2012-07-04 17:04:04 +00:00
ReachableCode.cpp Remove the CFGElement "Invalid" state. 2013-02-23 00:29:34 +00:00
ScanfFormatString.cpp Add support for __wchar_t in -fms-extensions mode. 2013-05-10 10:08:40 +00:00
ThreadSafety.cpp Thread safety analysis: fix use after free bug reported by Evgeniy Stepanov. 2013-05-20 17:57:55 +00:00
UninitializedValues.cpp Remove unused, awkward CFGStmtVisitor and subclasses. 2013-05-15 23:22:55 +00:00