History log of /external/clang/include/clang/Analysis/ProgramPoint.h
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
6bcf27bb9a4b5c3f79cb44c0e4654a6d7619ad89 29-May-2014 Stephen Hines <srhines@google.com> Update Clang for 3.5 rebase (r209713).

Change-Id: I8c9133b0f8f776dc915f270b60f94962e771bc83
/external/clang/include/clang/Analysis/ProgramPoint.h
651f13cea278ec967336033dd032faef0e9fc2ec 24-Apr-2014 Stephen Hines <srhines@google.com> Updated to Clang 3.5a.

Change-Id: I8127eb568f674c2e72635b639a3295381fe8af82
/external/clang/include/clang/Analysis/ProgramPoint.h
610f79cbab4d752349b5c81a94682a6a82b102e7 05-Apr-2013 Anna Zaks <ganna@apple.com> [analyzer] Show path diagnostic for C++ initializers

Also had to modify the PostInitializer ProgramLocation to contain the field region.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@178826 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Analysis/ProgramPoint.h
1aa4f5019164592643bf46b7d61f15b6ef509c8e 22-Mar-2013 Jordan Rose <jordan_rose@apple.com> [analyzer] Fix ExprEngine::ViewGraph to handle C++ initializers.

Debugging aid only, no functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@177762 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Analysis/ProgramPoint.h
b07805485c603be3d8011f72611465324c9e664b 23-Feb-2013 David Blaikie <dblaikie@gmail.com> Remove the CFGElement "Invalid" state.

Use Optional<CFG*> where invalid states were needed previously. In the one case
where that's not possible (beginAutomaticObjDtorsInsert) just use a dummy
CFGAutomaticObjDtor.

Thanks for the help from Jordan Rose & discussion/feedback from Ted Kremenek
and Doug Gregor.

Post commit code review feedback on r175796 by Ted Kremenek.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@175938 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Analysis/ProgramPoint.h
3c16431cb973079d178338833dafd6b483bf8c8d 22-Feb-2013 David Blaikie <dblaikie@gmail.com> Fix copy/paste to refer to the relevant type (ProgramPoint instead of TypeLoc).

Post commit review feedback on r175812 from Jordan Rose.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@175825 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Analysis/ProgramPoint.h
7a95de68c093991047ed8d339479ccad51b88663 21-Feb-2013 David Blaikie <dblaikie@gmail.com> Replace ProgramPoint llvm::cast support to be well-defined.

See r175462 for another example/more details.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@175812 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Analysis/ProgramPoint.h
cfa88f893915ceb8ae4ce2f17c46c24a4d67502f 12-Jan-2013 Dmitri Gribenko <gribozavr@gmail.com> Remove useless 'llvm::' qualifier from names like StringRef and others that are
brought into 'clang' namespace by clang/Basic/LLVM.h


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@172323 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Analysis/ProgramPoint.h
30a2e16f6c27f888dd11eba6bbbae1e980078fcb 04-Dec-2012 Chandler Carruth <chandlerc@gmail.com> Sort #include lines for all files under include/...

This is a simpler sort, entirely automatic with the help of
llvm/utils/sort_includes.py -- no manual edits here.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169238 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Analysis/ProgramPoint.h
b43d87b0646aa04951056c7e0d1ab9a58eb09f66 12-Oct-2012 Sean Silva <silvas@purdue.edu> Remove pointless classof()'s.

Updates to llvm/Support/Casting.h have rendered these classof()'s
irrelevant.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165770 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Analysis/ProgramPoint.h
1edeed3b0fe01fb07a769bd1acc2ce2dc9ec431d 07-Sep-2012 Anna Zaks <ganna@apple.com> [analyzer] Assert that StmtPoint should be created with a non-null Stmt.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163358 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Analysis/ProgramPoint.h
80de487e03dd0f44e4572e2122ebc1aa6a3961f5 29-Aug-2012 Anna Zaks <ganna@apple.com> [analyzer] Improved diagnostic pruning for calls initializing values.

This heuristic addresses the case when a pointer (or ref) is passed
to a function, which initializes the variable (or sets it to something
other than '0'). On the branch where the inlined function does not
set the value, we report use of undefined value (or NULL pointer
dereference). The access happens in the caller and the path
through the callee would get pruned away with regular path pruning. To
solve this issue, we previously disabled diagnostic pruning completely
on undefined and null pointer dereference checks, which entailed very
verbose diagnostics in most cases. Furthermore, not all of the
undef value checks had the diagnostic pruning disabled.

This patch implements the following heuristic: if we pass a pointer (or
ref) to the region (on which the error is reported) into a function and
it's value is either undef or 'NULL' (and is a pointer), do not prune
the function.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162863 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Analysis/ProgramPoint.h
852aa0d2c5d2d1faf2d77b5aa3c0848068a342c5 11-Jul-2012 Jordan Rose <jordan_rose@apple.com> [analyzer] Make CallEnter, CallExitBegin, and CallExitEnd not be StmtPoints

These ProgramPoints are used in inlining calls,
and not all calls have associated statements anymore.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160021 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Analysis/ProgramPoint.h
28038f33aa2db4833881fea757a1f0daf85ac02b 11-Jul-2012 Jordan Rose <jordan_rose@apple.com> [analyzer] Add new PreImplicitCall and PostImplicitCall ProgramPoints.

These are currently unused, but are intended to be used in lieu of PreStmt
and PostStmt when the call is implicit (e.g. an automatic object destructor).

This also modifies the Data1 field of ProgramPoints to allow storing any
pointer-sized value, as opposed to only aligned pointers. This is necessary
to store SourceLocations.

There is currently no BugReporter support for these; they should be skipped
over in any diagnostic output.

This commit also tags checkers that currently rely on function calls only
occurring at StmtPoints.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160019 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Analysis/ProgramPoint.h
41c2bcff88a23a046ee8d71451bc03717a4248f6 07-Jun-2012 Chandler Carruth <chandlerc@gmail.com> Fix many doxygen formatting errors.

This patch affects docs only, and includes formatting changes only
(though those include some fixes for broken Doxygen markup that caused
some content to be missing from generated pages). It avoids generating
many spurious pages such as
http://clang.llvm.org/doxygen/classRepresents.html, but likely not all
yet.

Patch by James Dennett.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158155 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Analysis/ProgramPoint.h
51a31ca9a9903ecba1b25bc0989f62e1e2bebb4c 07-May-2012 Anna Zaks <ganna@apple.com> [analyzer] Fixup for r155244: PurgeDeadSymbols should subclass StmtPoint

To solve the inconsistency pointed out in Erik's review, refactor class
hierarchy of ProgramPoints so that PreStmtPurgeDeadSymbols and
PostStmtPurgeDeadSymbols both subclass from StmtPoint instead of
PostStmt.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156315 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Analysis/ProgramPoint.h
0b3ade86a1c60cf0c7b56aa238aff458eb7f5974 20-Apr-2012 Anna Zaks <ganna@apple.com> [analyzer] Run remove dead bindings right before leaving a function.

This is needed to ensure that we always report issues in the correct
function. For example, leaks are identified when we call remove dead
bindings. In order to make sure we report a callee's leak in the callee,
we have to run the operation in the callee's context.

This change required quite a bit of infrastructure work since:
- We used to only run remove dead bindings before a given statement;
here we need to run it after the last statement in the function. For
this, we added additional Program Point and special mode in the
SymbolReaper to remove all symbols in context lower than the current
one.
- The call exit operation turned into a sequence of nodes, which are
now guarded by CallExitBegin and CallExitEnd nodes for clarity and
convenience.

(Sorry for the long diff.)

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155244 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Analysis/ProgramPoint.h
6403683411dac55afbe3435ceb19033e27cd9f96 18-Apr-2012 Ted Kremenek <kremenek@apple.com> Fix bad typo reported by I-Jui Sung.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154986 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Analysis/ProgramPoint.h
c8443e592dbab65cd06ddea9fad6c6f049a08942 03-Apr-2012 Ted Kremenek <kremenek@apple.com> Rework ProgramPoint to bit-mangle the 'Kind' into both Data pointers and the LocationContext. After switching to PointerIntPair, it didn't look like a safe assumption to use the lower 3 bits of the LocationContext* field. Thanks to Jordy Rose and Benjamin Kramer for their feedback.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@153933 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Analysis/ProgramPoint.h
f30c0a97d9addc72a4928b8bb2039b2b464e1f94 02-Apr-2012 Ted Kremenek <kremenek@apple.com> Reduce static analyzer memory usage by about 4% by packing the ProgramPoing 'Kind' field into the spare bits of other fields.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@153898 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Analysis/ProgramPoint.h
5903a373db3d27794c90b25687e0dd6adb0e497d 27-Mar-2012 Anna Zaks <ganna@apple.com> [analyzer] Add an option to re-analyze a dead-end path without inlining.

The analyzer gives up path exploration under certain conditions. For
example, when the same basic block has been visited more than 4 times.
With inlining turned on, this could lead to decrease in code coverage.
Specifically, if we give up inside the inlined function, the rest of
parent's basic blocks will not get analyzed.

This commit introduces an option to enable re-run along the failed path,
in which we do not inline the last inlined call site. This is done by
enqueueing the node before the processing of the inlined call site
with a special policy encoded in the state. The policy tells us not to
inline the call site along the path.

This lead to ~10% increase in the number of paths analyzed. Even though
we expected a much greater coverage improvement.

The option is turned off by default for now.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@153534 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Analysis/ProgramPoint.h
3d7c44e01d568e5d5c0fac9c6ccb3f080157ba19 21-Mar-2012 Anna Zaks <ganna@apple.com> [analyzer] Malloc: Utter the name of the leaked variable.
Specifically, we use the last store of the leaked symbol in the leak diagnostic.
(No support for struct fields since the malloc checker doesn't track those
yet.)

+ Infrastructure to track the regions used in store evaluations.
This approach is more precise than iterating the store to
obtain the region bound to the symbol, which is used in RetainCount
checker. The region corresponds to what is uttered in the code in the
last store and we do not rely on the store implementation to support
this functionality.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@153212 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Analysis/ProgramPoint.h
1d26f48dc2eea1c07431ca1519d7034a21b9bcff 24-Oct-2011 Ted Kremenek <kremenek@apple.com> Rename AnalysisContext to AnalysisDeclContext. Not only is this name more accurate, but it frees up the name AnalysisContext for other uses.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142782 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Analysis/ProgramPoint.h
63d3201619fdac284adfd3b9328562fa20a01c40 07-Oct-2011 Anna Zaks <ganna@apple.com> ProgramPoint cleanup after the previous commit r141408 (remove the copy constructor, mark withTag const).

Move getProgramPoint() utility from CoreEngine.cpp into ProgramPoint.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141414 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Analysis/ProgramPoint.h
af42712cd8f548f15c700d49a7038ddb846aafa8 07-Oct-2011 Anna Zaks <ganna@apple.com> Add a copy constructor to ProgramPoint and pull withTag() method from a child. (withTag essentialy creates a copy with a given tag.)

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141408 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Analysis/ProgramPoint.h
e4c6675cccbaac991843def43072687bca50d989 30-Sep-2011 Ted Kremenek <kremenek@apple.com> Fix crash when analyzing C++ code involving constant enums and switch statements (<rdar://problem/10202899>).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140844 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Analysis/ProgramPoint.h
2f041d0b12aa87f3345e5fb2e38fefba30c5bff3 29-Sep-2011 Ted Kremenek <kremenek@apple.com> Like IBOutletCollection, it only makes sense to apply the IBOutlet annotation to Objective-C object types. Fixes <rdar://problem/10142685>.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140778 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Analysis/ProgramPoint.h
86b39f20d5091ca3fdcbeb4a22766aaffdf6ac35 16-Aug-2011 Ted Kremenek <kremenek@apple.com> [analyzer] Remove PostStmtCustom ProgramPoint. It can be represented using tagged PostStmts.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137697 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Analysis/ProgramPoint.h
9c378f705405d37f49795d5e915989de774fe11f 13-Aug-2011 Ted Kremenek <kremenek@apple.com> Cleanup various declarations of 'Stmt*' to be 'Stmt *', etc. in libAnalyzer and libStaticAnalyzer[*]. It was highly inconsistent, and very ugly to look at.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137537 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Analysis/ProgramPoint.h
1ab69c513239596946286373e081b89fa3358612 13-Aug-2011 Ted Kremenek <kremenek@apple.com> Document purpose of ProgramPointTag::getTagKind().

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137530 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Analysis/ProgramPoint.h
ca804539d908d3a0e8c72a0df5f1f571d29490bb 13-Aug-2011 Ted Kremenek <kremenek@apple.com> [analyzer] change "tag" in ProgramPoint from "void*" to a ProgramPointTag*.

Having a notion of an actual ProgramPointTag will aid in introspection of the analyzer's behavior.
For example, the GraphViz output of the analyzer will pretty-print the tags in a useful manner.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137529 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Analysis/ProgramPoint.h
8083414ee7cc8f5c807ed6a4e120fb4e0ab50ff8 03-Apr-2011 Ted Kremenek <kremenek@apple.com> static analyzer: Add a new ProgramPoint PostCondition to represent the post position of a branch condition, and a new generateNode method to BranchNodeBuilder using PostCondition ProgramPoint. This method generates a new ExplodedNode but not a new block edge.

Patch by Lei Zhang!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128784 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Analysis/ProgramPoint.h
58465900ca10e53b8700a64e9265870de34e1aca 09-Feb-2011 Ted Kremenek <kremenek@apple.com> Make ProgramPoint::getTag() public.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125153 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Analysis/ProgramPoint.h
4bac726dadb09ee38bab8147f1e706380368b362 13-Jan-2011 Ted Kremenek <kremenek@apple.com> Remove CheckerContext's dependence on setting
the node builder's "tag" ivar (which we would
like to remove).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123361 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Analysis/ProgramPoint.h
b6a2b08a6b3fbce1a6a4b69d4185165de970696c 11-Jan-2011 Ted Kremenek <kremenek@apple.com> Remove ProgramPoint parameter from GenericNodeBuilder::generateNode().

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123240 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Analysis/ProgramPoint.h
cbb67480094b3bcb5b715acd827cbad55e2a204c 08-Jan-2011 Sean Hunt <scshunt@csclub.uwaterloo.ca> Renamed CXXBaseOrMemberInitializer to CXXCtorInitializer. This is both shorter,
more accurate, and makes it make sense for it to hold a delegating constructor
call.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123084 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Analysis/ProgramPoint.h
03013fa9a0bf1ef4b907f5fec006c8f4000fdd21 29-Nov-2010 Michael J. Spencer <bigcheesegs@gmail.com> Merge System into Support.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120297 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Analysis/ProgramPoint.h
19b78d9e3dbbc27bbcbdd8c3017a00fe88849ecd 24-Nov-2010 Zhongxing Xu <xuzhongxing@gmail.com> Use StackFrameContext directly in CallEnter program point. Then we don't need
to remake the stackframe everytime in GRExprEngine::ProcessCallEnter().


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120087 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Analysis/ProgramPoint.h
9dc84c9455df2a77195147d0210c915dc1775a88 16-Nov-2010 Zhongxing Xu <xuzhongxing@gmail.com> Handle member initializer in C++ ctor.
- Add a new Kind of ProgramPoint: PostInitializer.
- Still use GRStmtNodeBuilder. But special handling PostInitializer in
GRStmtNodeBuilder::GenerateAutoTransition().
- Someday we should clean up the interface of GRStmtNodeBuilder.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119335 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Analysis/ProgramPoint.h
b36cd3e1757fb4fcd9509f35558c847b04bef35f 16-Sep-2010 Zhongxing Xu <xuzhongxing@gmail.com> Introduce new CFGElement hierarchy to support C++ CFG, based on Marcin's patch
and discussions with Ted and Jordy.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114056 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Analysis/ProgramPoint.h
4462ee2f0000e6cb966e3fff4516c84292f0cce8 03-Sep-2010 Ted Kremenek <kremenek@apple.com> Fix enum: CallEnter/CallExit are StmtPoints

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112928 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Analysis/ProgramPoint.h
b73279120d67817156717a1625207ee1bbf41477 23-Jul-2010 Zhongxing Xu <xuzhongxing@gmail.com> AnalysisContext is not const.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109210 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Analysis/ProgramPoint.h
03509aea098772644bf4662dc1c88634818ceecc 20-Jul-2010 Zhongxing Xu <xuzhongxing@gmail.com> Constify all references to Stmt* and CFGBlock* in libChecker.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108811 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Analysis/ProgramPoint.h
c6238d2786cfd961b94580b3d3675a1b3ff0721c 19-Jul-2010 Zhongxing Xu <xuzhongxing@gmail.com> Reapply r108617.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108668 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Analysis/ProgramPoint.h
ee30965ce96e0a7b04b1aa16df60e9ba8b0a33c9 17-Jul-2010 Benjamin Kramer <benny.kra@googlemail.com> Revert r108617, it broke the build.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108621 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Analysis/ProgramPoint.h
69b81941aa4211ba6b8eaa89093f9e45aff81392 17-Jul-2010 Zhongxing Xu <xuzhongxing@gmail.com> Prepare the analyzer for the callee in another translation unit:
Let AnalysisContext contain a TranslationUnit.
Let CallEnter refer to an AnalysisContext instead of a FunctionDecl.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108617 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Analysis/ProgramPoint.h
a5fdd9ce694b1c2dbfd225cb6f55ef743d1ab562 11-May-2010 Douglas Gregor <dgregor@apple.com> Fixes for compilation with Microsoft Visual Studio 2010, from Steven Watanabe!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103458 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Analysis/ProgramPoint.h
102acd5369bbb17c0d6ab868af376671acff7a93 25-Feb-2010 Douglas Gregor <dgregor@apple.com> Restore Zhongxing's commits r97122 r97127 r97129 r97131 which were reverted due to a Clang-on-Clang failure

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97162 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Analysis/ProgramPoint.h
2b706e56b57c9646dae8c9134d8614fe815a1873 25-Feb-2010 Jakob Stoklund Olesen <stoklund@2pi.dk> Revert patches r97122 r97127 r97129 r97131.
They were breaking clang-x86_64-darwin10-selfhost

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97138 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Analysis/ProgramPoint.h
833e50e6a2c246dbc4b3c17b7c9d657c5b5d333e 25-Feb-2010 Zhongxing Xu <xuzhongxing@gmail.com> Call inliner improvements:

This patch implements the CallEnter/CallExit idea of Ted.

Add two interfaces to GRSubEngine: ProcessCallEnter, ProcessCallExit.

The CallEnter program point uses caller's location context. The
CallExit program point uses callee's location context.

CallEnter is built by GRStmtNodeBuilder. CallExit is built by
GREndPathNodeBuilder.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97122 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Analysis/ProgramPoint.h
852274d4257134906995cb252fb3dfd2d71deae8 16-Dec-2009 Ted Kremenek <kremenek@apple.com> Add (initial?) static analyzer support for handling C++ references.
This change was a lot bigger than I originally anticipated; among
other things it requires us storing more information in the CFG to
record what block-level expressions need to be evaluated as lvalues.

The big change is that CFGBlocks no longer contain Stmt*'s by
CFGElements. Currently CFGElements just wrap Stmt*, but they also
store a bit indicating whether the block-level expression should be
evalauted as an lvalue. DeclStmts involving the initialization of a
reference require us treating the initialization expression as an
lvalue, even though that information isn't recorded in the AST.
Conceptually this change isn't that complicated, but it required
bubbling up the data through the CFGBuilder, to GRCoreEngine, and
eventually to GRExprEngine.

The addition of CFGElement is also useful for when we want to handle
more control-flow constructs or other data we want to keep in the CFG
that isn't represented well with just a block of statements.

In GRExprEngine, this patch introduces logic for evaluating the
lvalues of references, which currently retrieves the internal "pointer
value" that the reference represents. EvalLoad does a two stage load
to catch null dereferences involving an invalid reference (although
this could possibly be caught earlier during the initialization of a
reference).

Symbols are currently symbolicated using the reference type, instead
of a pointer type, and special handling is required creating
ElementRegions that layer on SymbolicRegions (see the changes to
RegionStoreManager).

Along the way, the DeadStoresChecker also silences warnings involving
dead stores to references. This was the original change I introduced
(which I wrote test cases for) that I realized caused GRExprEngine to
crash.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91501 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Analysis/ProgramPoint.h
06159e878569e5f39bf0e8f11b84ac3ad0970597 15-Dec-2009 Chris Lattner <sabre@nondot.org> update to match LLVM API change:

Remove isPod() from DenseMapInfo, splitting it out to its own
isPodLike type trait. This is a generally useful type trait for
more than just DenseMap, and we really care about whether something
acts like a pod, not whether it really is a pod.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91422 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Analysis/ProgramPoint.h
d651141308a777d60ff98309d21e045bb936f8b7 16-Nov-2009 Ted Kremenek <kremenek@apple.com> Fix condition in LocationCheck::classof(). Thanks to Marius Wachtler for pointing this out!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88949 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Analysis/ProgramPoint.h
b4b817d704287836b52b34369009e682f208aa2b 11-Nov-2009 Ted Kremenek <kremenek@apple.com> Refactor DereferenceChecker to use only the new Checker API instead of
the old builder API. This percolated a bunch of changes up to the
Checker class (where CheckLocation has been renamed VisitLocation) and
GRExprEngine. ProgramPoint now has the notion of a "LocationCheck"
point (with PreLoad and PreStore respectively), and a bunch of the old
ProgramPoints that are no longer used have been removed.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86798 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Analysis/ProgramPoint.h
9f8eb2032030482b1d3de86e9bee725d93564302 26-Oct-2009 Chandler Carruth <chandlerc@gmail.com> Update location of DataTypes.h to reflect move in LLVM with r85086.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85087 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Analysis/ProgramPoint.h
1eb4433ac451dc16f4133a88af2d002ac26c58ef 09-Sep-2009 Mike Stump <mrs@apple.com> Remove tabs, and whitespace cleanups.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81346 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Analysis/ProgramPoint.h
fafd3834754d2093e0ad7a1c005860fd527ecb7f 20-Aug-2009 Zhongxing Xu <xuzhongxing@gmail.com> Rename: ProgramPoint::getContext() => ProgramPoint::getLocationContext().

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79502 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Analysis/ProgramPoint.h
25e695b2d574d919cc1bbddf3a2efe073d449b1c 15-Aug-2009 Zhongxing Xu <xuzhongxing@gmail.com> Extend the ProgramPoint to include the context information LocationContext,
which is either a stack frame context of the function or a local scope
context.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79072 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Analysis/ProgramPoint.h
5f85e17df3f5b0a8021443f2b590daecfb2cbd17 23-Jul-2009 Ted Kremenek <kremenek@apple.com> Refactor 'PostStmt' and 'PreStmt' to subclass a common parent 'StmtPoint'.

Educate GRExprEngine::VisitGraph() about 'PreStmt'.

Mark the constructor of 'PostStmt' to be explicit, preventing implicit
conversions and the selection of the wrong 'generateNode' method in
GRStmtNodeBuilder.

Constify a bunch of arguments, which falls out of the changes to ProgramPoint.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76809 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Analysis/ProgramPoint.h
cdd4f1783da7c7565be2376d14ca6ab2625aa4b6 22-Jul-2009 Ted Kremenek <kremenek@apple.com> Add 'PreStmt' program point. This will be used to represent checking for
preconditions (in GRExprEngine) before the statement itself is evaluated.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76791 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Analysis/ProgramPoint.h
d6b9e37311013bdf24fd709f7e9962e3b141e6fb 22-Jul-2009 Ted Kremenek <kremenek@apple.com> Restructure ProgramPoint to have the 'Kind' value be its own instance
variable. This gives us much more flexibility with defining more
ProgramPoints, which is the direction we are heading. The removal of
various bit-mangling of pointers also cleans up the logic.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76721 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Analysis/ProgramPoint.h
e41611aa2237d06a0ef61db4528fb2883a8defcd 16-Jul-2009 Ted Kremenek <kremenek@apple.com> Move the source-level CFG from libAST to libAnalysis.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76092 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Analysis/ProgramPoint.h
6bad354120ce0d35901e86ca63e5534b7b9ed092 13-May-2009 Ted Kremenek <kremenek@apple.com> Add PostStmt::getStmtAs(). This unbreaks the build.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71701 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Analysis/ProgramPoint.h
ab422d17dce198f2af9851340ea7384771a2a8c5 09-May-2009 Ted Kremenek <kremenek@apple.com> Make BlockEntrace program points taggable.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71280 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Analysis/ProgramPoint.h
7090d5465de7ca620da16211cf886edf1edc1f1f 07-May-2009 Ted Kremenek <kremenek@apple.com> analyzer: Add ProgramPoint 'PostLValue' just to distinguish (for
analysis introspection) when we computed an lvalue. This shouldn't
effect the current analysis results in any way.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71169 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Analysis/ProgramPoint.h
1670e403c48f3af4fceff3f6773a0e1cfc6c4eb3 11-Apr-2009 Ted Kremenek <kremenek@apple.com> Implement analyzer support for OSCompareAndSwap. This required pushing "tagged"
ProgramPoints all the way through to GRCoreEngine.

NSString.m now fails with RegionStoreManager because of the void** cast.
Disabling use of region store for that test for now.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68845 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Analysis/ProgramPoint.h
e8063ae53bd241de10ba1053054d06867a5c56ab 10-Apr-2009 Ted Kremenek <kremenek@apple.com> Add arbitrary "tags" to ProgramPoints. While this fattens up ProgramPoint even
more, it gives us a tremendous amount of flexibility for extending the analyzer
to handle arbitrary program points.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68823 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Analysis/ProgramPoint.h
2680b5f926fad29c1a2b2723a70d189f4b637979 20-Feb-2009 Ted Kremenek <kremenek@apple.com> ProgramPoint::Profile now specially handles PostStmtCustom (hashes on tag and data) so that clients don't need a unique address for the pair itself.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65079 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Analysis/ProgramPoint.h
59753441b6391a9843eff287f0adb2614153b7c8 09-Feb-2009 Ted Kremenek <kremenek@apple.com> Refine PostStmtCustom to reference a tagged data pair with the tag to indicate the checker.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64144 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Analysis/ProgramPoint.h
f4be8ee748831bc23e35b542e6c1bb6d1eb49baa 09-Feb-2009 Ted Kremenek <kremenek@apple.com> Added a new ProgramPoint 'PostStmtCustom' to enable checker-specific ProgramPoints.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64143 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Analysis/ProgramPoint.h
8c354758c2d39db87c77c723d81e34b4d967f762 16-Dec-2008 Ted Kremenek <kremenek@apple.com> ProgramPoint:
- Added four new ProgramPoint types that subclass PostStmt for use in
GRExprEngine::EvalLocation:
- PostOutOfBoundsCheckFailed
- PostUndefLocationCheckFailed
- PostNullCheckFailed
- PostLocationChecksSucceed
These were created because of a horribly subtle caching bug in EvalLocation
where a node representing an "bug condition" in EvalLocation (e.g. a null
dereference) could be re-used as the "non-bug condition" because the Store did
not contain any information to differentiate between the two. The extra
program points just disables any accidental caching between EvalLocation and
its callers.

GRExprEngine:
- EvalLocation now returns a NodeTy* instead of GRState*. This should be used as the "vetted" predecessor for EvalLoad/EvalStore.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61105 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Analysis/ProgramPoint.h
82bae3f6bf7bc4733d9c87659b266e23ad55f420 20-Sep-2008 Ted Kremenek <kremenek@apple.com> Add PostStore, a new ProgramPoint to distinguish between 'stores' and other PostStmts.

GRExprEngine:
Use PostStore in EvalStore.
Use a second version of EvalStore in EvalBinaryOperator to associate the store with the expression on the LHS.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56383 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Analysis/ProgramPoint.h
d452758bb6b59340528a26def9ecc24b329d4ecf 16-Sep-2008 Ted Kremenek <kremenek@apple.com> ProgramPoint now takes the space of two pointers instead of one. This change was
motivated because it became clear that the number of subclasses of ProgramPoint
would expand and we ran out of bits to represent a pointer variant. As a plus of
this change, BlockEdge program points can now be represented explicitly without
using a cache of CFGBlock* pairs in CFG.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56245 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Analysis/ProgramPoint.h
331b0ac44b9eb0ffcba66b4f3f3f9adb27c2434f 18-Jun-2008 Ted Kremenek <kremenek@apple.com> Added a new ProgramPoint: PostPurgeDeadSymbols. This new program point distinguishes between the cases when we just evaluated the transfer function of a Stmt* (PostStmt) or performed a load (PostLoad). This solves a caching bug observed in a recent bug report.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52443 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Analysis/ProgramPoint.h
1b8bd4d71c2098126041b4de4267175a82f0103c 29-Apr-2008 Ted Kremenek <kremenek@apple.com> Major rewrite/refactoring of static analysis engine. We now use
EvalStore/EvalLoad to handle all loads/stores from symbolic memory, allowing us
to do checks for null dereferences, etc., at any arbitrary load/store (these
were missed checks before). This also resulted in some major cleanups, some
conceptual, and others just in the structure of the code.

This temporarily introduces a regression in the test suite (null-deref-ps.c)
before I add a new LVal type for structure fields.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50443 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Analysis/ProgramPoint.h
6e5977f0a8a680191fb4b4d8f32bc2c629faf0c2 26-Apr-2008 Argyrios Kyrtzidis <akyrtzi@gmail.com> Make assertions for all addresses passed to ProgramPoint that they have at least an 8-byte alignment.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50310 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Analysis/ProgramPoint.h
ea45bb2d3b5e445029ad8f42d88bc1ed5b483a0b 05-Mar-2008 Ted Kremenek <kremenek@apple.com> Reverted patch 47926 for ProgramPoint.h because it is currently buggy. May add back (fixed) later.
Updated CFGStmtVisitor to be in accord with rr47913: CallExprs are no longer (automatically) block-level expressions in the CFG.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47935 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Analysis/ProgramPoint.h
424f67155475296804f9b9159dba606859441924 05-Mar-2008 Ted Kremenek <kremenek@apple.com> Added support for ProgramPoints to represent ExplodedNodes in another
ExplodedGraph. This allows us to build "layered" ExplodedGraphs where one
simulation is layered on another.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47926 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Analysis/ProgramPoint.h
5226755ab5ce6346f98b5f41cdcffbe84c5bb484 03-Mar-2008 Ted Kremenek <kremenek@apple.com> Fixed subtle caching bug in ExplodedGraph that would cause some nodes to
be incorrectly merged together.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47851 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Analysis/ProgramPoint.h
754607e7cff2d902d9af8b771409449fb2f8d2bf 13-Feb-2008 Ted Kremenek <kremenek@apple.com> Added support to GREngine/GRConstants for handling computed gotos.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47038 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Analysis/ProgramPoint.h
b365b702229999bf90b668bbe4a95bc0d2293d69 16-Jan-2008 Ted Kremenek <kremenek@apple.com> Fixed broken bitmasking in the ctor of ProgramPoint.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46081 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Analysis/ProgramPoint.h
5e2fa75c211519719687a81c6b6db85fbaa80254 16-Jan-2008 Ted Kremenek <kremenek@apple.com> Fixed incorrect pointer mask.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46078 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Analysis/ProgramPoint.h
05e14cd46ef44c07385aae96ec2fdcb9bf7e9467 13-Jan-2008 Ted Kremenek <kremenek@apple.com> Now include "CFG.h" because the inline methods of "BlockEntrance" accessor
the methods of CFGBlock.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45925 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Analysis/ProgramPoint.h
a1d44b5b7dbd39d4cfdbbb5ceb1885499ea03c77 11-Jan-2008 Ted Kremenek <kremenek@apple.com> Renamed ProgramEdge.h to ProgramPoint.h


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45847 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Analysis/ProgramPoint.h