6bcf27bb9a4b5c3f79cb44c0e4654a6d7619ad89 |
|
29-May-2014 |
Stephen Hines <srhines@google.com> |
Update Clang for 3.5 rebase (r209713). Change-Id: I8c9133b0f8f776dc915f270b60f94962e771bc83
/external/clang/lib/StaticAnalyzer/Core/ExprEngineC.cpp
|
651f13cea278ec967336033dd032faef0e9fc2ec |
|
24-Apr-2014 |
Stephen Hines <srhines@google.com> |
Updated to Clang 3.5a. Change-Id: I8127eb568f674c2e72635b639a3295381fe8af82
/external/clang/lib/StaticAnalyzer/Core/ExprEngineC.cpp
|
dd9e9cec6f863afa15dd91b34fbf15c66c678c02 |
|
09-Dec-2013 |
Bill Wendling <isanbard@gmail.com> |
Merging r196593: ------------------------------------------------------------------------ r196593 | zaks | 2013-12-06 10:56:29 -0800 (Fri, 06 Dec 2013) | 7 lines Revert "[analyzer] Refactor conditional expression evaluating code" This reverts commit r189090. The original patch introduced regressions (see the added live-variables.* tests). The patch depends on the correctness of live variable analyses, which are not computed correctly. I've opened PR18159 to track the proper resolution to this problem. The patch was a stepping block to r189746. This is why part of the patch reverts temporary destructor tests that started crashing. The temporary destructors feature is disabled by default. ------------------------------------------------------------------------ git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_34@196795 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/StaticAnalyzer/Core/ExprEngineC.cpp
|
3eb52bb5d791630f926ff2226dae25012315ad9a |
|
20-Nov-2013 |
Bill Wendling <isanbard@gmail.com> |
Merging r195174: ------------------------------------------------------------------------ r195174 | zaks | 2013-11-19 16:11:42 -0800 (Tue, 19 Nov 2013) | 1 line [analyzer] Fix an infinite recursion in region invalidation by adding block count to the BlockDataRegion. ------------------------------------------------------------------------ git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_34@195228 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/StaticAnalyzer/Core/ExprEngineC.cpp
|
d7c47d94a55a03aeea14d411768e5593f50445da |
|
27-Sep-2013 |
Jordan Rose <jordan_rose@apple.com> |
[analyzer] Allow pre/post-statement checkers for UnaryOperator. Found by Arthur Yoo. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@191532 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/StaticAnalyzer/Core/ExprEngineC.cpp
|
c07cad8364e7fb0e8cb0d5181edb7db718271b65 |
|
13-Sep-2013 |
Jordan Rose <jordan_rose@apple.com> |
[analyzer] Run post-stmt checks for DeclStmt. No tests because no in-tree checkers use this, but that shouldn't stop out-of-tree checkers. Found by Aemon Cannon! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@190650 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/StaticAnalyzer/Core/ExprEngineC.cpp
|
6a556a42d48cc098fb8dcb5d4ecdd0e03e32c0ec |
|
23-Aug-2013 |
Pavel Labath <labath@google.com> |
[analyzer] Refactor conditional expression evaluating code Summary: Instead of digging through the ExplodedGraph, to figure out which edge brought us here, I compute the value of conditional expression by looking at the sub-expression values. To do this, I needed to change the liveness algorithm a bit -- now, the full conditional expression also depends on all atomic sub-expressions, not only the outermost ones. Reviewers: jordan_rose CC: cfe-commits Differential Revision: http://llvm-reviews.chandlerc.com/D1340 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@189090 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/StaticAnalyzer/Core/ExprEngineC.cpp
|
6ebe9df900b79fd56a4db03b4f8aa6a180307a9d |
|
09-Aug-2013 |
Pavel Labath <labath@google.com> |
[analyzer] Enable usage of temporaries in InitListExprs Summary: ExprEngine had code which specificaly disabled using CXXTempObjectRegions in InitListExprs. This was a hack put in r168757 to silence a false positive. The underlying problem seems to have been fixed in the mean time, as removing this code doesn't seem to break anything. Therefore I propose to remove it and solve PR16629 in the process. Reviewers: jordan_rose CC: cfe-commits Differential Revision: http://llvm-reviews.chandlerc.com/D1325 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188059 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/StaticAnalyzer/Core/ExprEngineC.cpp
|
330231537010ab1d77affcbcaffd4bbe358b4cfa |
|
02-Jul-2013 |
Jordan Rose <jordan_rose@apple.com> |
[analyzer] Pointers-to-members are (currently) Locs, not NonLocs. While we don't model pointers-to-members besides "null" and "non-null", we were using Loc symbols for valid pointers and NonLoc integers for the null case. This hit the assert committed in r185401. Fixed by using a true (Loc) null for null member pointers. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@185444 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/StaticAnalyzer/Core/ExprEngineC.cpp
|
bd34520a8c4fe689cca8afaa8114e50bd6bad8f8 |
|
19-Jun-2013 |
Anna Zaks <ganna@apple.com> |
[analyzer] Do not create a CompoundVal for lvalue InitListExprs. These should be treated like scalars. This fixes a crash reported in radar://14164698. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@184257 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/StaticAnalyzer/Core/ExprEngineC.cpp
|
3056439bb175db8c46b89fb4385de8b3a8e42d0d |
|
29-May-2013 |
Anna Zaks <ganna@apple.com> |
[analyzer] Re-enable reasoning about CK_LValueBitCast It’s important for us to reason about the cast as it is used in std::addressof. The reason we did not handle the cast previously was a crash on a test case (see commit r157478). The crash was in processing array to pointer decay when the region type was not an array. Address the issue, by just returning an unknown in that case. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@182808 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/StaticAnalyzer/Core/ExprEngineC.cpp
|
6376703eb3325fe41233aed234fde81164af42a1 |
|
06-May-2013 |
Jordan Rose <jordan_rose@apple.com> |
[analyzer] Handle CXXTemporaryObjectExprs in compound literals. This occurs because in C++11 the compound literal syntax can trigger a constructor call via list-initialization. That is, "Point{x, y}" and "(Point){x, y}" end up being equivalent. If this occurs, the inner CXXConstructExpr will have already handled the object construction; the CompoundLiteralExpr just needs to propagate that value forwards. <rdar://problem/13804098> git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181213 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/StaticAnalyzer/Core/ExprEngineC.cpp
|
d8eeac5bd5e3cca0b3ff3993ee479ec9e66f386e |
|
16-Apr-2013 |
Anna Zaks <ganna@apple.com> |
[analyzer] Do not crash when processing binary "?:" in C++ When computing the value of ?: expression, we rely on the last expression in the previous basic block to be the resulting value of the expression. This is not the case for binary "?:" operator (GNU extension) in C++. As the last basic block has the expression for the condition subexpression, which is an R-value, whereas the true subexpression is the L-value. Note the operator evaluation just happens to work in C since the true subexpression is an R-value (like the condition subexpression). CFG is the same in C and C++ case, but the AST nodes are different, which the LValue to Rvalue conversion happening after the BinaryConditionalOperator evaluation. Changed the logic to only use the last expression from the predecessor only if it matches either true or false subexpression. Note, the logic needed fortification anyway: L and R were passed but not even used by the function. Also, change the conjureSymbolVal to correctly compute the type, when the expression is an LG-value. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179574 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/StaticAnalyzer/Core/ExprEngineC.cpp
|
a5796f87229b4aeebca71fa6ee1790ae7a5a0382 |
|
09-Apr-2013 |
Jordan Rose <jordan_rose@apple.com> |
[analyzer] Replace isIntegerType() with isIntegerOrEnumerationType(). Previously, the analyzer used isIntegerType() everywhere, which uses the C definition of "integer". The C++ predicate with the same behavior is isIntegerOrUnscopedEnumerationType(). However, the analyzer is /really/ using this to ask if it's some sort of "integrally representable" type, i.e. it should include C++11 scoped enumerations as well. hasIntegerRepresentation() sounds like the right predicate, but that includes vectors, which the analyzer represents by its elements. This commit audits all uses of isIntegerType() and replaces them with the general isIntegerOrEnumerationType(), except in some specific cases where it makes sense to exclude scoped enumerations, or any enumerations. These cases now use isIntegerOrUnscopedEnumerationType() and getAs<BuiltinType>() plus BuiltinType::isInteger(). isIntegerType() is hereby banned in the analyzer - lib/StaticAnalysis and include/clang/StaticAnalysis. :-) Fixes real assertion failures. PR15703 / <rdar://problem/12350701> git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179081 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/StaticAnalyzer/Core/ExprEngineC.cpp
|
0f5c5c60e9806d13f0907cd99d7204ffab0e08f7 |
|
29-Mar-2013 |
Ted Kremenek <kremenek@apple.com> |
Add static analyzer support for conditionally executing static initializers. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@178318 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/StaticAnalyzer/Core/ExprEngineC.cpp
|
41f3f3a4792f46787632fdb94f952f6b3ce3f4ae |
|
05-Mar-2013 |
Jordan Rose <jordan_rose@apple.com> |
Silence a number of static analyzer warnings with assertions and such. No functionality change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@176469 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/StaticAnalyzer/Core/ExprEngineC.cpp
|
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/lib/StaticAnalyzer/Core/ExprEngineC.cpp
|
f08740ba5903d089a53cc315c19286e2189f9ff3 |
|
22-Feb-2013 |
Ted Kremenek <kremenek@apple.com> |
Fix regression in modeling assignments of an address of a variable to itself. Fixes <rdar://problem/13226577>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@175852 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/StaticAnalyzer/Core/ExprEngineC.cpp
|
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/lib/StaticAnalyzer/Core/ExprEngineC.cpp
|
fdf6a279c9a75c778eba382d9a156697092982a1 |
|
21-Feb-2013 |
David Blaikie <dblaikie@gmail.com> |
Replace CFGElement 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@175796 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/StaticAnalyzer/Core/ExprEngineC.cpp
|
dc84cd5efdd3430efb22546b4ac656aa0540b210 |
|
20-Feb-2013 |
David Blaikie <dblaikie@gmail.com> |
Include llvm::Optional in clang/Basic/LLVM.h Post-commit CR feedback from Jordan Rose regarding r175594. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@175679 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/StaticAnalyzer/Core/ExprEngineC.cpp
|
5251abea41b446c26e3239c8dd6c7edea6fc335d |
|
20-Feb-2013 |
David Blaikie <dblaikie@gmail.com> |
Replace SVal 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@175594 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/StaticAnalyzer/Core/ExprEngineC.cpp
|
8135886ab74d852a6702b1f5656a0b146abe210a |
|
08-Feb-2013 |
Anna Zaks <ganna@apple.com> |
[analyzer] Remove redundant check as per Jordan's feedback. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@174680 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/StaticAnalyzer/Core/ExprEngineC.cpp
|
2b6876173b36d92aaf379c29cb339d91b4d358ee |
|
08-Feb-2013 |
Anna Zaks <ganna@apple.com> |
[analyzer] Don't reinitialize static globals more than once along a path This patch makes sure that we do not reinitialize static globals when the function is called more than once along a path. The motivation is code with initialization patterns that rely on 2 static variables, where one of them has an initializer while the other does not. Currently, we reset the static variables with initializers on every visit to the function along a path. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@174676 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/StaticAnalyzer/Core/ExprEngineC.cpp
|
e6b9d802fb7b16d93474c4f1c179ab36202e8a8b |
|
20-Jan-2013 |
Guy Benyei <guy.benyei@intel.com> |
Implement OpenCL event_t as Clang builtin type, including event_t related OpenCL restrictions (OpenCL 1.2 spec 6.9) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@172973 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/StaticAnalyzer/Core/ExprEngineC.cpp
|
9195caf28f2a5dcef1e299bf3e5232a018ca1c68 |
|
12-Jan-2013 |
Ted Kremenek <kremenek@apple.com> |
Refine analyzer's handling of unary '!' and floating types to not assert. Fixes PR 14634 and <rdar://problem/12903080>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@172274 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/StaticAnalyzer/Core/ExprEngineC.cpp
|
707a8659a546d32cf976d4c3927c793a643b18e1 |
|
11-Jan-2013 |
Ted Kremenek <kremenek@apple.com> |
Correctly propagate uninitialized values within logical expressions. Fixes assertion failure reported in PR 14635 and <rdar://problem/12902945> respectively. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@172263 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/StaticAnalyzer/Core/ExprEngineC.cpp
|
9852f58f50b4fc20914fbce5b4454135a42343f4 |
|
01-Dec-2012 |
Benjamin Kramer <benny.kra@googlemail.com> |
Don't include Type.h in DeclarationName.h. Recursively prune some includes. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169094 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/StaticAnalyzer/Core/ExprEngineC.cpp
|
1994e3993e5e2c606f4ab22563768af6f03dad30 |
|
28-Nov-2012 |
Ted Kremenek <kremenek@apple.com> |
Fix another false positive due to a CXX temporary object appearing in a C initializer. The stop-gap here is to just drop such objects when processing the InitListExpr. We still need a better solution. Fixes <rdar://problem/12755044>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@168757 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/StaticAnalyzer/Core/ExprEngineC.cpp
|
352c657f789d5633b07d56d76cf78fda05c31353 |
|
06-Sep-2012 |
Anna Zaks <ganna@apple.com> |
[analyzer] Fix a crash PR13762. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163262 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/StaticAnalyzer/Core/ExprEngineC.cpp
|
d04713598ee8af6e01b925dca4e38bfd78227dad |
|
01-Sep-2012 |
Jordan Rose <jordan_rose@apple.com> |
[analyzer] Don't attempt to create a floating-point value of "1" for ++/--. The current logic would actually create a float- or double-sized signed integer value of 1, which is not at all the same. No test because the value would be swallowed by an Unknown as soon as it gets added or subtracted to the original value, but it enables the cleanup in the next patch. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163068 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/StaticAnalyzer/Core/ExprEngineC.cpp
|
a6c66cedc022c9e5d45a937d6b8cff491a6bf81b |
|
31-Aug-2012 |
Eli Friedman <eli.friedman@gmail.com> |
Change the representation of builtin functions in the AST (__builtin_* etc.) so that it isn't possible to take their address. Specifically, introduce a new type to represent a reference to a builtin function, and a new cast kind to convert it to a function pointer in the operand of a call. Fixes PR13195. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162962 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/StaticAnalyzer/Core/ExprEngineC.cpp
|
c210cb7a358d14cdd93b58562f33ff5ed2d895c1 |
|
27-Aug-2012 |
Jordan Rose <jordan_rose@apple.com> |
[analyzer] Inline constructors for any object with a trivial destructor. This allows us to better reason about status objects, like Clang's own llvm::Optional (when its contents are trivially destructible), which are often intended to be passed around by value. We still don't inline constructors for temporaries in the general case. <rdar://problem/11986434> git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162681 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/StaticAnalyzer/Core/ExprEngineC.cpp
|
0156439a3d718ea0ef5922c38d189a60829c8a86 |
|
24-Aug-2012 |
Jordan Rose <jordan_rose@apple.com> |
[analyzer] For now, treat pointers-to-members as non-null void * symbols. Until we have full support for pointers-to-members, we can at least approximate some of their use by tracking null and non-null values. We thus treat &A::m_ptr as a non-null void * symbol, and MemberPointer(0) as a pointer-sized null constant. This enables support for what is sometimes called the "safe bool" idiom, demonstrated in the test case. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162495 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/StaticAnalyzer/Core/ExprEngineC.cpp
|
c386d8f148c1a9d4992c64188e2873fcbc6da20d |
|
24-Aug-2012 |
Jordan Rose <jordan_rose@apple.com> |
[analyzer] Handle UserDefinedConversion casts in C++. This is trivial; the UserDefinedConversion always wraps a CXXMemberCallExpr for the appropriate conversion function, so it's just a matter of propagating that value to the CastExpr itself. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162494 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/StaticAnalyzer/Core/ExprEngineC.cpp
|
66c486f275531df6362b3511fc3af6563561801b |
|
22-Aug-2012 |
Ted Kremenek <kremenek@apple.com> |
Rename 'currentX' to 'currX' throughout analyzer and libAnalysis. Also rename 'getCurrentBlockCounter()' to 'blockCount()'. This ripples a bunch of code simplifications; mostly aesthetic, but makes the code a bit tighter. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162349 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/StaticAnalyzer/Core/ExprEngineC.cpp
|
3b1df8bb941a18c4a7256d7cfcbccb9de7e39995 |
|
22-Aug-2012 |
Ted Kremenek <kremenek@apple.com> |
Rename 'getConjuredSymbol*' to 'conjureSymbol*'. No need to have the "get", the word "conjure" is a verb too! Getting a conjured symbol is the same as conjuring one up. This shortening is largely cosmetic, but just this simple changed cleaned up a handful of lines, making them less verbose. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162348 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/StaticAnalyzer/Core/ExprEngineC.cpp
|
32a549a64922af0903bdb777613ae7ae4490b70f |
|
22-Aug-2012 |
Ted Kremenek <kremenek@apple.com> |
Remove Store::bindDecl() and Store::bindDeclWithNoInit(), and all forwarding methods. This functionality is already covered by bindLoc(). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162346 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/StaticAnalyzer/Core/ExprEngineC.cpp
|
fa06f0464a04bb7fce1fcfb3780d151bb029e00c |
|
20-Aug-2012 |
Jordan Rose <jordan_rose@apple.com> |
[analyzer] Replace boolean IsSink parameters with 'generateSink' methods. Generating a sink is significantly different behavior from generating a normal node, and a simple boolean parameter can be rather opaque. Per offline discussion with Anna, adding new generation methods is the clearest way to communicate intent. No functionality change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162215 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/StaticAnalyzer/Core/ExprEngineC.cpp
|
7f839a6b35e5007964b538423b0a570eed26fc10 |
|
20-Aug-2012 |
Jordan Rose <jordan_rose@apple.com> |
[analyzer] The result of && or || is always a 1 or 0. Forgetting to at least cast the result was giving us Loc/NonLoc problems in SValBuilder (hitting an assertion). But the standard (both C and C++) does actually guarantee that && and || will result in the actual values 1 and 0, typed as 'int' in C and 'bool' in C++, and we can easily model that. PR13461 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162209 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/StaticAnalyzer/Core/ExprEngineC.cpp
|
2c5f8d79ed128892fa548a3308a938a3a53fbb5e |
|
09-Aug-2012 |
Jordan Rose <jordan_rose@apple.com> |
[analyzer] A CXXBaseObjectRegion should correspond to a DIRECT base. An ASTContext's RecordLayoutInfo can only be used to look up offsets of direct base classes, and we need the offset to make non-symbolic bindings in RegionStore. This change makes sure that we have one layer of CXXBaseObjectRegion for each base we are casting through. This was causing crashes on an internal buildbot. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161621 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/StaticAnalyzer/Core/ExprEngineC.cpp
|
c7ecc43c33a21b82c49664910b19fcc1f555aa51 |
|
07-Aug-2012 |
Anna Zaks <ganna@apple.com> |
[analyzer] Add a checker to manage dynamic type propagation. Instead of sprinkling dynamic type info propagation throughout ExprEngine, the added checker would add the more precise type information on known APIs (Ex: ObjC alloc, new) and propagate the type info in other cases (ex: ObjC init method, casts (the second is not implemented yet)). Add handling of ObjC alloc, new and init to the checker. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161357 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/StaticAnalyzer/Core/ExprEngineC.cpp
|
148fee988e32efcad45ecf7b3bf714880c657dda |
|
03-Aug-2012 |
Anna Zaks <ganna@apple.com> |
[analyzer] ObjC Inlining: Start tracking dynamic type info in the GDM In the following code, find the type of the symbolic receiver by following it and updating the dynamic type info in the state when we cast the symbol from id to MyClass *. MyClass *a = [[self alloc] init]; return 5/[a testSelf]; git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161264 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/StaticAnalyzer/Core/ExprEngineC.cpp
|
6da60499eae46caf9f92f7ba35c607043dc3f7fa |
|
27-Jul-2012 |
Ted Kremenek <kremenek@apple.com> |
Look at the preceding CFGBlock for the expression to load from in ExprEngine::VisitGuardedExpr instead of walking to the preceding PostStmt node. There are cases where the last evaluated expression does not appear in the ExplodedGraph. Fixes PR 13466. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160819 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/StaticAnalyzer/Core/ExprEngineC.cpp
|
e460c46c5d602f65354cab0879c458890273591c |
|
26-Jul-2012 |
Jordan Rose <jordan_rose@apple.com> |
[analyzer] Don't crash on array constructors and destructors. This workaround is fairly lame: we simulate the first element's constructor and destructor and rely on the region invalidation to "initialize" the rest of the elements. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160809 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/StaticAnalyzer/Core/ExprEngineC.cpp
|
469841a8e0967f038aa0f78e1926ce82e06248c7 |
|
25-Jul-2012 |
Ted Kremenek <kremenek@apple.com> |
Update ExprEngine's handling of ternary operators to find the ternary expression value by scanning the path, rather than assuming we have visited the '?:' operator as a terminator (which sets a value indicating which expression to grab the final ternary expression value from). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160760 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/StaticAnalyzer/Core/ExprEngineC.cpp
|
89e5aaf57e20b39e35b0d068ebbc09ae736f2e1e |
|
17-Jul-2012 |
Jordan Rose <jordan_rose@apple.com> |
[analyzer] Handle new-expressions with initializers for scalars. <rdar://problem/11818967> git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160328 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/StaticAnalyzer/Core/ExprEngineC.cpp
|
f85f60ae3a6aad0f2b92154bf3a9601cf9a245c0 |
|
16-Jul-2012 |
Daniel Jasper <djasper@google.com> |
Prevent unused-variable warning in optimized builds. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160257 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/StaticAnalyzer/Core/ExprEngineC.cpp
|
3f635c08b2d0b2d5bafb38da09589cb238407faa |
|
14-Jul-2012 |
Ted Kremenek <kremenek@apple.com> |
Refine CFG so that '&&' and '||' don't lead to extra confluence points when used in a branch, but instead push the terminator for the branch down into the basic blocks of the subexpressions of '&&' and '||' respectively. This eliminates some artifical control-flow from the CFG and results in a more compact CFG. Note that this patch only alters the branches 'while', 'if' and 'for'. This was complex enough for one patch. The remaining branches (e.g., do...while) can be handled in a separate patch, but they weren't immediately tackled because they were less important. It is possible that this patch introduces some subtle bugs, particularly w.r.t. to destructor placement. I've tried to audit these changes, but it is also known that the destructor logic needs some refinement in the area of '||' and '&&' regardless (i.e., their are known bugs). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160218 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/StaticAnalyzer/Core/ExprEngineC.cpp
|
48b6247804eacc262cc5508e0fbb74ed819fbb6e |
|
11-Jul-2012 |
Jordan Rose <jordan_rose@apple.com> |
[analyzer] Construct stack variables directly in their VarDecl. Also contains a number of tweaks to inlining that are necessary for constructors and destructors. (I have this enabled on a private branch, but it is very much unstable.) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160023 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/StaticAnalyzer/Core/ExprEngineC.cpp
|
333e05f24717c79637e83806fd5142c752a86afa |
|
18-Jun-2012 |
Jordan Rose <jordan_rose@apple.com> |
[analyzer] Add a comment: why we treat array compound literals as lvalues. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158681 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/StaticAnalyzer/Core/ExprEngineC.cpp
|
3083d3c550dedf68101dd9133905c3c7d35662bd |
|
16-Jun-2012 |
Jordan Rose <jordan_rose@apple.com> |
[analyzer] Array CompoundLiteralExprs need to be treated like lvalues. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158588 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/StaticAnalyzer/Core/ExprEngineC.cpp
|
5b8c69494881b7d35bc6244b4a19be0cc2eab368 |
|
12-Jun-2012 |
Jordan Rose <jordan_rose@apple.com> |
Revert "[analyzer] Treat LValueBitCasts like regular pointer bit casts." This does not actually give us the right behavior for reinterpret_cast of references. Reverting so I can think about it some more. This reverts commit 50a75a6e26a49011150067adac556ef978639fe6. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158341 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/StaticAnalyzer/Core/ExprEngineC.cpp
|
570d03c6831a8e19447dc863aa94ffff020077eb |
|
12-Jun-2012 |
Jordan Rose <jordan_rose@apple.com> |
[analyzer] Treat LValueBitCasts like regular pointer bit casts. These casts only appear in very well-defined circumstances, in which the target of a reinterpret_cast or a function formal parameter is an lvalue reference. According to the C++ standard, the following are equivalent: reinterpret_cast<T&>( x) *reinterpret_cast<T*>(&x) [expr.reinterpret.cast]p11 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158338 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/StaticAnalyzer/Core/ExprEngineC.cpp
|
e41458c37923c77fdae39676b3b4bce9f6c80def |
|
25-May-2012 |
Anna Zaks <ganna@apple.com> |
[analyzer] Don't crash on LValBitCast git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157478 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/StaticAnalyzer/Core/ExprEngineC.cpp
|
13dd47a0c01f8b4a6b3fbe379218f7ba8e692d0f |
|
22-May-2012 |
Anna Zaks <ganna@apple.com> |
[analyzer] Bind UnknownVal to InitListExpr for unsupported types (ex: float). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157211 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/StaticAnalyzer/Core/ExprEngineC.cpp
|
591b5f53c0e11d87401b4804bb1be1a53f95c619 |
|
19-May-2012 |
Anna Zaks <ganna@apple.com> |
[analyzer] For locations, use isGLValue() instead of isLValue(). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157088 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/StaticAnalyzer/Core/ExprEngineC.cpp
|
85d87df66a50a15a1957f7213802000b451a8ec9 |
|
04-May-2012 |
Ted Kremenek <kremenek@apple.com> |
Explicitly model capturing variables for blocks in the static analyzer. Fixes <rdar://problem/11125868>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156211 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/StaticAnalyzer/Core/ExprEngineC.cpp
|
e55a14a025c38800d07f1ab0db7dbbe4a2fe1605 |
|
03-May-2012 |
Anna Zaks <ganna@apple.com> |
[analyzer] Conjure a symbol to ensure we can identify pointer arithmetic We need to identify the value of ptr as ElementRegion (result of pointer arithmetic) in the following code. However, before this commit '(2-x)' evaluated to Unknown value, and as the result, 'p + (2-x)' evaluated to Unknown value as well. int *p = malloc(sizeof(int)); ptr = p + (2-x); git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156052 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/StaticAnalyzer/Core/ExprEngineC.cpp
|
7ea1c5639764aa3ebe124f4350c5f2b3be795667 |
|
12-Apr-2012 |
Anna Zaks <ganna@apple.com> |
[analyzer] dynamic_cast Simplify null value generation. As per Jordy's review. Creating a symbol here is more flexible; however I could not come up with an example where it was needed. (What constrains can be added on of the symbol constrained to 0?) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154542 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/StaticAnalyzer/Core/ExprEngineC.cpp
|
a2c8d2edfff1573450c6feba876830dd746ffaad |
|
10-Apr-2012 |
Anna Zaks <ganna@apple.com> |
[analyzer] dynamic_cast: Better model cast from a reference. Generate a sink when the dynamic_cast from a reference fails to represent a thrown exception. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154438 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/StaticAnalyzer/Core/ExprEngineC.cpp
|
e19f86edab8fb3c2c1e99e0e9815b6058504df9b |
|
10-Apr-2012 |
Anna Zaks <ganna@apple.com> |
[analyzer] Add support for C++ dynamic_cast. Simulate the C++ dynamic_cast in the analyzer. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154434 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/StaticAnalyzer/Core/ExprEngineC.cpp
|
bd613137499b1d4c3b63dccd0aa21f6add243f4f |
|
07-Apr-2012 |
Ted Kremenek <kremenek@apple.com> |
Rework ExprEngine::evalLoad and clients (e.g. VisitBinaryOperator) so that when we generate a new ExplodedNode we use the same Expr* as the one being currently visited. This is preparation for transitioning to having ProgramPoints refer to CFGStmts. This required a bit of trickery. We wish to keep the old Expr* bindings in the Environment intact, as plenty of logic relies on it and there is no reason to change it, but we sometimes want the Stmt* for the ProgramPoint to be different than the Expr* being used for bindings. This requires adding an extra argument for some functions (e.g., evalLocation). This looks a bit strange for some clients, but it will look a lot cleaner when were start using CFGStmt* in the appropriate places. As some fallout, the diagnostics arrows are a bit difference, since some of the node locations have changed. I have audited these, and they look reasonable. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154214 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/StaticAnalyzer/Core/ExprEngineC.cpp
|
b98b998e9a5637012ab39ad1dabdad7c798721e8 |
|
05-Apr-2012 |
Ted Kremenek <kremenek@apple.com> |
Handle symbolicating a reference in an initializer expression that we don't understand. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154084 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/StaticAnalyzer/Core/ExprEngineC.cpp
|
4e4d08403ca5cfd4d558fa2936215d3a4e5a528d |
|
11-Mar-2012 |
David Blaikie <dblaikie@gmail.com> |
Unify naming of LangOptions variable/get function across the Clang stack (Lex to AST). The member variable is always "LangOpts" and the member function is always "getLangOpts". Reviewed by Chris Lattner git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@152536 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/StaticAnalyzer/Core/ExprEngineC.cpp
|
ac1303eca6cbe3e623fb5ec6fe7ec184ef4b0dfa |
|
22-Feb-2012 |
Douglas Gregor <dgregor@apple.com> |
Generate an AST for the conversion from a lambda closure type to a block pointer that returns a block literal which captures (by copy) the lambda closure itself. Some aspects of the block literal are left unspecified, namely the capture variable (which doesn't actually exist) and the body (which will be filled in by IRgen because it can't be written as an AST). Because we're switching to this model, this patch also eliminates tracking the copy-initialization expression for the block capture of the conversion function, since that information is now embedded in the synthesized block literal. -1 side tables FTW. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151131 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/StaticAnalyzer/Core/ExprEngineC.cpp
|
3133f79cf451e6302dd05262b4bb53a3e4fd6300 |
|
18-Feb-2012 |
Ted Kremenek <kremenek@apple.com> |
Have conjured symbols depend on LocationContext, to add context sensitivity for functions called more than once. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150849 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/StaticAnalyzer/Core/ExprEngineC.cpp
|
4d4e5c1ae83f4510caa486b3ad19de13048f9f04 |
|
15-Feb-2012 |
John McCall <rjmccall@apple.com> |
Split reinterpret_casts of member pointers out from CK_BitCast; this is general goodness because representations of member pointers are not always equivalent across member pointer types on all ABIs (even though this isn't really standard-endorsed). Take advantage of the new information to teach IR-generation how to do these reinterprets in constant initializers. Make sure this works when intermingled with hierarchy conversions (although this is not part of our motivating use case). Doing this in the constant-evaluator would probably have been better, but that would require a *lot* of extra structure in the representation of constant member pointers: you'd really have to track an arbitrary chain of hierarchy conversions and reinterpretations in order to get this right. Ultimately, this seems less complex. I also wasn't quite sure how to extend the constant evaluator to handle foldings that we don't actually want to treat as extended constant expressions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150551 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/StaticAnalyzer/Core/ExprEngineC.cpp
|
9050e3ad959d08fb53446a5e261e66aaa97d9fc8 |
|
14-Feb-2012 |
Ted Kremenek <kremenek@apple.com> |
Remove recusive expression visitation in ExprEngine::VisitIncrementDecrementOperator(). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150511 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/StaticAnalyzer/Core/ExprEngineC.cpp
|
a91ac5bae3944e0eed9ef25294dfb2b8681b8159 |
|
14-Feb-2012 |
Ted Kremenek <kremenek@apple.com> |
Remove recursive visitation in ExprEngine for UO_Not, UO_Minus, UO_LNot. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150509 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/StaticAnalyzer/Core/ExprEngineC.cpp
|
224c48945b1687489a8079fb4fcc42b409823400 |
|
14-Feb-2012 |
Ted Kremenek <kremenek@apple.com> |
Remove recursive visitation in ExprEngine for UO_Deref, UO_AddrOf, and UO_Extension. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150506 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/StaticAnalyzer/Core/ExprEngineC.cpp
|
c1e08dc876d7944678214f0ba222e258d62c9953 |
|
14-Feb-2012 |
Ted Kremenek <kremenek@apple.com> |
Remove ExprEngine recursive visitation of unary UO_Imag operation. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150505 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/StaticAnalyzer/Core/ExprEngineC.cpp
|
019316636b0a2d2273b945a98e52d454acee66ef |
|
14-Feb-2012 |
Ted Kremenek <kremenek@apple.com> |
Further remove some recursive visitiation in ExprEngine that is no longer needed because the CFG is fully linearized. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150504 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/StaticAnalyzer/Core/ExprEngineC.cpp
|
8bef8238181a30e52dea380789a7e2d760eac532 |
|
26-Jan-2012 |
Ted Kremenek <kremenek@apple.com> |
Change references to 'const ProgramState *' to typedef 'ProgramStateRef'. At this point this is largely cosmetic, but it opens the door to replace ProgramStateRef with a smart pointer that more eagerly acts in the role of reclaiming unused ProgramState objects. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149081 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/StaticAnalyzer/Core/ExprEngineC.cpp
|
7a7ee3033e44b45630981355460ef89efa0bdcc4 |
|
16-Jan-2012 |
David Chisnall <csdavec@swan.ac.uk> |
Some improvements to the handling of C11 atomic types: - Add atomic-to/from-nonatomic cast types - Emit atomic operations for arithmetic on atomic types - Emit non-atomic stores for initialisation of atomic types, but atomic stores and loads for every other store / load - Add a __atomic_init() intrinsic which does a non-atomic store to an _Atomic() type. This is needed for the corresponding C11 stdatomic.h function. - Enables the relevant __has_feature() checks. The feature isn't 100% complete yet, but it's done enough that we want people testing it. Still to do: - Make the arithmetic operations on atomic types (e.g. Atomic(int) foo = 1; foo++;) use the correct LLVM intrinsic if one exists, not a loop with a cmpxchg. - Add a signal fence builtin - Properly set the fenv state in atomic operations on floating point values - Correctly handle things like _Atomic(_Complex double) which are too large for an atomic cmpxchg on some platforms (this requires working out what 'correctly' means in this context) - Fix the many remaining corner cases git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148242 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/StaticAnalyzer/Core/ExprEngineC.cpp
|
5eca482fe895ea57bc82410222e6426c09e63284 |
|
06-Jan-2012 |
Ted Kremenek <kremenek@apple.com> |
[analyzer] Make the entries in 'Environment' context-sensitive by making entries map from (Stmt*,LocationContext*) pairs to SVals instead of Stmt* to SVals. This is needed to support basic IPA via inlining. Without this, we cannot tell if a Stmt* binding is part of the current analysis scope (StackFrameContext) or part of a parent context. This change introduces an uglification of the use of getSVal(), and thus takes two steps forward and one step back. There are also potential performance implications of enlarging the Environment. Both can be addressed going forward by refactoring the APIs and optimizing the internal representation of Environment. This patch mainly introduces the functionality upon when we want to build upon (and clean up). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147688 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/StaticAnalyzer/Core/ExprEngineC.cpp
|
80d4b55db94db2172a04617d1a80feca6bbcea5c |
|
28-Dec-2011 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Small refactoring and simplification of constant evaluation and some of its clients. No functionality change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147318 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/StaticAnalyzer/Core/ExprEngineC.cpp
|
084842d334fca296279262c2534f6aa31b1dfdbb |
|
05-Dec-2011 |
Anna Zaks <ganna@apple.com> |
[analyzer] Simplify the condition. This is a fixup for r145832. The extra clauses do not matter after we remove the dependency on canReasonAbout(InitVal) in r145832. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145856 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/StaticAnalyzer/Core/ExprEngineC.cpp
|
76462f00854171d2aa3ebc34f9aac1c60021b0ea |
|
05-Dec-2011 |
Anna Zaks <ganna@apple.com> |
[analyzer] Remove all uses of ConstraintManager::canResonAbout() from ExprEngine. Teach SimpleConstraintManager::assumeSymRel() to propagate constraints to symbolic expressions. + One extra warning (real bug) is now generated due to enhanced assumeSymRel(). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145832 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/StaticAnalyzer/Core/ExprEngineC.cpp
|
3cdf584e068056540769dab56cad333e95a89750 |
|
05-Dec-2011 |
Anna Zaks <ganna@apple.com> |
[analyzer] First step toward removing ConstraintManager::canReasonAbout() from the ExprEngine. ExprEngine should not care if the constraint solver can reason about something or not. The solver should be able to handle all the SymExprs. To do this, the solver should be able to keep track of not only the SymbolData but of all SymExprs. This is why we change SymbolRef to be an alias of SymExpr*. When encountering an expression it cannot simplify, the solver should just add the constraints to it. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145831 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/StaticAnalyzer/Core/ExprEngineC.cpp
|
0d339d06f8721d14befd6311bd306ac485772188 |
|
18-Nov-2011 |
Anna Zaks <ganna@apple.com> |
[analyzer] Do not conjure a symbol when we need to propagate taint. When the solver and SValBuilder cannot reason about symbolic expressions (ex: (x+1)*y ), the analyzer conjures a new symbol with no ties to the past. This helps it to recover some path-sensitivity. However, this breaks the taint propagation. With this commit, we are going to construct the expression even if we cannot reason about it later on if an operand is tainted. Also added some comments and asserts. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@144932 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/StaticAnalyzer/Core/ExprEngineC.cpp
|
7864435ef2bce200224120bd1df3aed98ea5b99a |
|
07-Nov-2011 |
John McCall <rjmccall@apple.com> |
Rip out CK_GetObjCProperty. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143910 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/StaticAnalyzer/Core/ExprEngineC.cpp
|
92d3dda09f72b700e15b7b652a7bb47718989994 |
|
04-Nov-2011 |
Benjamin Kramer <benny.kra@googlemail.com> |
Remove unused variables. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143696 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/StaticAnalyzer/Core/ExprEngineC.cpp
|
6889679d72859960e0fc8d1080487f63c4df1e0a |
|
01-Nov-2011 |
Anna Zaks <ganna@apple.com> |
[analyzer] Make sure the child builder use temporary destination sets The parent and child builders should not share node sets. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143515 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/StaticAnalyzer/Core/ExprEngineC.cpp
|
51f4708c00110940ca3f337961915f2ca1668375 |
|
29-Oct-2011 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Rename Expr::Evaluate to Expr::EvaluateAsRValue to make it clear that it will implicitly perform an lvalue-to-rvalue conversion if used on an lvalue expression. Also improve the documentation of Expr::Evaluate* to indicate which of them will accept expressions with side-effects. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143263 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/StaticAnalyzer/Core/ExprEngineC.cpp
|
2e9264a17bacc7dc228d5f93caaeb98dfb23d508 |
|
25-Oct-2011 |
Anna Zaks <ganna@apple.com> |
[analyzer] Remove unused headers. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142945 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/StaticAnalyzer/Core/ExprEngineC.cpp
|
aa0aeb1cbe117db68d35700cb3a34aace0f99b99 |
|
24-Oct-2011 |
Anna Zaks <ganna@apple.com> |
[analyzer] Node builders cleanup + comments Renamed PureNodeBuilder->StmtNodeBuilder. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142849 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/StaticAnalyzer/Core/ExprEngineC.cpp
|
056c4b46335a3bd2612414735d5749ee159c0165 |
|
24-Oct-2011 |
Anna Zaks <ganna@apple.com> |
[analyzer] Completely remove the global Builder object. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142847 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/StaticAnalyzer/Core/ExprEngineC.cpp
|
ebae6d0209e1ec3d5ea14f9e63bd0d740218ed14 |
|
24-Oct-2011 |
Anna Zaks <ganna@apple.com> |
[analyzer] Convert ExprEngine::visit() to use short lived builders. This commit removes the major functional dependency on the ExprEngine::Builder member variable. In some cases the code became more verbose. Particularly, we call takeNodes() and addNodes() to move responsibility for the nodes from one builder to another. This will get simplified later on. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142831 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/StaticAnalyzer/Core/ExprEngineC.cpp
|
d231d0130a95336610ab9a42eaeb2cdac19992f3 |
|
24-Oct-2011 |
Anna Zaks <ganna@apple.com> |
[analyzer] Convert VisitDeclStmt to use local node builder. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142830 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/StaticAnalyzer/Core/ExprEngineC.cpp
|
6b6152ba96c164a292cc0b8d8b1d4cecbec27a60 |
|
24-Oct-2011 |
Anna Zaks <ganna@apple.com> |
[analyzer] Convert more functions (ex:evalBind()) to iterative builders git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142829 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/StaticAnalyzer/Core/ExprEngineC.cpp
|
8ad8c546372fe602708cb7ceeaf0ebbb866735c6 |
|
24-Oct-2011 |
Anna Zaks <ganna@apple.com> |
[analyzer] Convert VisitUnaryOperator to use short lived Node builders To convert iteratively, we take the nodes the local builder will process from the from the global builder and add the generated nodes after the short lived builder is done. PureStmtNodeBuilder is the one we should eventually use everywhere. Added Stmt index and Builder context as ExprEngine globals. To avoid passing them around. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142828 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/StaticAnalyzer/Core/ExprEngineC.cpp
|
eb2d1f1c88836bd5382e5d7aa8f6b85148a88b27 |
|
23-Sep-2011 |
David Blaikie <dblaikie@gmail.com> |
Removing a bunch of dead returns/breaks after llvm_unreachables. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140407 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/StaticAnalyzer/Core/ExprEngineC.cpp
|
b219cfc4d75f0a03630b7c4509ef791b7e97b2c8 |
|
23-Sep-2011 |
David Blaikie <dblaikie@gmail.com> |
Switch assert(0/false) llvm_unreachable. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140367 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/StaticAnalyzer/Core/ExprEngineC.cpp
|
33e56f3273457bfa22c7c50bc46cf5a18216863d |
|
10-Sep-2011 |
John McCall <rjmccall@apple.com> |
Rename the ARC cast kinds to start with "ARC". git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139466 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/StaticAnalyzer/Core/ExprEngineC.cpp
|
dc05b11c67331016473fbc7909827b1b89c9616b |
|
10-Sep-2011 |
John McCall <rjmccall@apple.com> |
When converting a block pointer to an Objective-C pointer type, extend the lifetime of the block by copying it to the heap, or else we'll get a dangling reference because the code working with the non-block-typed object will not know it needs to copy. There is some danger here, e.g. with assigning a block literal to an unsafe variable, but, well, it's an unsafe variable. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139451 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/StaticAnalyzer/Core/ExprEngineC.cpp
|
1d9b3b25f7ac0d0195bba6b507a684fe5e7943ee |
|
09-Sep-2011 |
John McCall <rjmccall@apple.com> |
Give conversions of block pointers to ObjC pointers a different cast kind than conversions of C pointers to ObjC pointers. In order to ensure that we've caught every case, add asserts to CastExpr that strictly determine which cast kind is used for which kind of bit cast. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139352 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/StaticAnalyzer/Core/ExprEngineC.cpp
|
93bd5ca766c4d7906878f4ffe76ce1b2080e540b |
|
28-Aug-2011 |
Jordy Rose <jediknil@belkadan.com> |
[analyzer] Remove the ProgramState argument from ExprEngine::evalBind; we were ignoring it anyway. No functionality change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138720 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/StaticAnalyzer/Core/ExprEngineC.cpp
|
540dda6f2e4982b3eab0300c804345f5b6104c11 |
|
23-Aug-2011 |
Ted Kremenek <kremenek@apple.com> |
Fix regression in -Wuninitialized involving VLAs. It turns out that we were modeling sizeof(VLAs) incorrectly in the CFG, and also the static analyzer. This patch regresses the analyzer a bit, but that needs to be followed up with a better solution. Fixes <rdar://problem/10008112>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138372 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/StaticAnalyzer/Core/ExprEngineC.cpp
|
d203c026c6f836e79abfbf2171ac4ba30e52db76 |
|
20-Aug-2011 |
Ted Kremenek <kremenek@apple.com> |
[analyzer] Simplify ExprEngine::VisitBinaryOperator() by removing recursive visit to subexpressions (which is no longer needed). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138195 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/StaticAnalyzer/Core/ExprEngineC.cpp
|
294fd0a62b95f512637910bf85c7efa6c2354b50 |
|
20-Aug-2011 |
Ted Kremenek <kremenek@apple.com> |
Start partitioning ExprEngine.cpp into separate .cpp files that handle different parts of the analysis (e.g., analysis of C expressions, analysis of Objective-C expressions, and so on). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138194 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/StaticAnalyzer/Core/ExprEngineC.cpp
|