History log of /external/clang/include/clang/StaticAnalyzer/Core/PathSensitive/SValBuilder.h
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
176edba5311f6eff0cad2631449885ddf4fbc9ea 01-Dec-2014 Stephen Hines <srhines@google.com> Update aosp/master Clang for rebase to r222490.

Change-Id: Ic557ac55e97fbf6ee08771c7b7c3594777b0aefd
/external/clang/include/clang/StaticAnalyzer/Core/PathSensitive/SValBuilder.h
6bcf27bb9a4b5c3f79cb44c0e4654a6d7619ad89 29-May-2014 Stephen Hines <srhines@google.com> Update Clang for 3.5 rebase (r209713).

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

Change-Id: I8127eb568f674c2e72635b639a3295381fe8af82
/external/clang/include/clang/StaticAnalyzer/Core/PathSensitive/SValBuilder.h
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/include/clang/StaticAnalyzer/Core/PathSensitive/SValBuilder.h
4b75085f5669efc6407c662b5686361624c3ff2f 02-May-2013 Jordan Rose <jordan_rose@apple.com> [analyzer] Don't try to evaluate MaterializeTemporaryExpr as a constant.

...and don't consider '0' to be a null pointer constant if it's the
initializer for a float!

Apparently null pointer constant evaluation looks through both
MaterializeTemporaryExpr and ImplicitCastExpr, so we have to be more
careful about types in the callers. For RegionStore this just means giving
up a little more; for ExprEngine this means handling the
MaterializeTemporaryExpr case explicitly.

Follow-up to r180894.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@180944 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/StaticAnalyzer/Core/PathSensitive/SValBuilder.h
e2b1246a24e8babf2f58c93713fba16b8edb8e2d 02-May-2013 Jordan Rose <jordan_rose@apple.com> [analyzer] Consolidate constant evaluation logic in SValBuilder.

Previously, this was scattered across Environment (literal expressions),
ExprEngine (default arguments), and RegionStore (global constants). The
former special-cased several kinds of simple constant expressions, while
the latter two deferred to the AST's constant evaluator.

Now, these are all unified as SValBuilder::getConstantVal(). To keep
Environment fast, the special cases for simple constant expressions have
been left in, but the main benefits are that (a) unusual constants like
ObjCStringLiterals now work as default arguments and global constant
initializers, and (b) we're not duplicating code between ExprEngine and
RegionStore.

This actually caught a bug in our test suite, which is awesome: we stop
tracking allocated memory if it's passed as an argument along with some
kind of callback, but not if the callback is 0. We were testing this in
a case where the callback parameter had a default value, but that value
was 0. After this change, the analyzer now (correctly) flags that as a
leak!

<rdar://problem/13773117>

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@180894 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/StaticAnalyzer/Core/PathSensitive/SValBuilder.h
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/include/clang/StaticAnalyzer/Core/PathSensitive/SValBuilder.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/StaticAnalyzer/Core/PathSensitive/SValBuilder.h
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/include/clang/StaticAnalyzer/Core/PathSensitive/SValBuilder.h
a4317709127e3b63c44a34f9fa1c3f8abe6a77a3 29-Nov-2012 Ted Kremenek <kremenek@apple.com> Change SValBuilder::getConditionType() to return BoolTy in C++. Fixes <rdar://problem/12772656>.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@168846 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/StaticAnalyzer/Core/PathSensitive/SValBuilder.h
2e4457a006fa2beaa87d909b743aa8f09fbf9ec6 30-Sep-2012 Bob Wilson <bob.wilson@apple.com> Whitespace.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@164900 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/StaticAnalyzer/Core/PathSensitive/SValBuilder.h
732cdf383f9030ff2b9fb28dfbdae2285ded80c6 26-Sep-2012 Ted Kremenek <kremenek@apple.com> Remove unnecessary ASTContext& parameter from SymExpr::getType().

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@164661 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/StaticAnalyzer/Core/PathSensitive/SValBuilder.h
91ab900a939e95d965e18299b66928fdbe2aa38d 01-Sep-2012 Jordan Rose <jordan_rose@apple.com> [analyzer] Disallow creation of int vals with explicit bit width / signedness.

All clients of BasicValueFactory should be using QualTypes instead, and
indeed it seems they are. This caught the (fortunately harmless) bug
fixed in the previous commit.

No intended functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163069 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/StaticAnalyzer/Core/PathSensitive/SValBuilder.h
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/include/clang/StaticAnalyzer/Core/PathSensitive/SValBuilder.h
478851c3ed6bd784e7377dffd8e57b200c1b9ba9 04-Jul-2012 Benjamin Kramer <benny.kra@googlemail.com> Drop the ASTContext.h include from Stmt.h and fix up transitive users.

This required moving the ctors for IntegerLiteral and FloatingLiteral out of
line which shouldn't change anything as they are usually called through Create
methods that are already out of line.

ASTContext::Deallocate has been a nop for a long time, drop it from ASTVector
and make it independent from ASTContext.h

Pass the StorageAllocator directly to AccessedEntity so it doesn't need to
have a definition of ASTContext around.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159718 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/StaticAnalyzer/Core/PathSensitive/SValBuilder.h
10f77ad7fc5e5cf3f37a9b14ff5843468b8b84d2 23-Jun-2012 Ted Kremenek <kremenek@apple.com> Implement initial static analysis inlining support for C++ methods.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159047 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/StaticAnalyzer/Core/PathSensitive/SValBuilder.h
e17fdb2d5dbf0ffefd417587003eebbe5baf5984 07-Jun-2012 Anna Zaks <ganna@apple.com> [analyzer] Anti-aliasing: different heap allocations do not alias

Add a concept of symbolic memory region belonging to heap memory space.
When comparing symbolic regions allocated on the heap, assume that they
do not alias.

Use symbolic heap region to suppress a common false positive pattern in
the malloc checker, in code that relies on malloc not returning the
memory aliased to other malloc allocations, stack.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158136 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/StaticAnalyzer/Core/PathSensitive/SValBuilder.h
009072fd2223c823032b804c64ca7b4c7c3badc4 28-May-2012 Benjamin Kramer <benny.kra@googlemail.com> Fix suspicous isIntegerType() check, found by PVS Studio (PR12357).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157593 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/StaticAnalyzer/Core/PathSensitive/SValBuilder.h
e2241cbb0455a60ba27d6c4b9d601ffef3ed103f 01-May-2012 Anna Zaks <ganna@apple.com> [analyzer] Construct a SymExpr even when the constraint solver cannot
reason about the expression.

This essentially keeps more history about how symbolic values were
constructed. As an optimization, previous to this commit, we only kept
the history if one of the symbols was tainted, but it's valuable keep
the history around for other purposes as well: it allows us to avoid
constructing conjured symbols.

Specifically, 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);

This change brings 2% slowdown on sqlite. Fixes radar://11329382.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155944 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/StaticAnalyzer/Core/PathSensitive/SValBuilder.h
337e4dbc6859589b8878146a88bebf754e916702 10-Mar-2012 Ted Kremenek <kremenek@apple.com> [analyzer] fix regression in analyzer of NOT actually aborting on Stmts it doesn't understand. We registered
as aborted, but didn't treat such cases as sinks in the ExplodedGraph.

Along the way, add basic support for CXXCatchStmt, expanding the set of code we actually analyze (hopefully correctly).

Fixes: <rdar://problem/10892489>

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@152468 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/StaticAnalyzer/Core/PathSensitive/SValBuilder.h
1a45a5ff5d495cb6cd9a3d4d06317af79c0f634d 06-Mar-2012 Ted Kremenek <kremenek@apple.com> Add static analyzer support for new NSArray/NSDictionary/NSNumber literals.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@152139 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/StaticAnalyzer/Core/PathSensitive/SValBuilder.h
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/include/clang/StaticAnalyzer/Core/PathSensitive/SValBuilder.h
c35fb7d67d515659ad2325b4f6ec97c9fe64fb63 28-Jan-2012 Benjamin Kramer <benny.kra@googlemail.com> StaticAnalyzer: Move ObjC- and CXX-specific methods out of line so checkers that don't care about the language don't have to pull in all the headers.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149178 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/StaticAnalyzer/Core/PathSensitive/SValBuilder.h
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/include/clang/StaticAnalyzer/Core/PathSensitive/SValBuilder.h
99ba9e3bd70671f3441fb974895f226a83ce0e66 20-Dec-2011 David Blaikie <dblaikie@gmail.com> Unweaken vtables as per http://llvm.org/docs/CodingStandards.html#ll_virtual_anch

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@146959 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/StaticAnalyzer/Core/PathSensitive/SValBuilder.h
6d6a83c3754b449ac24cb83bc6d3a50b10535061 11-Dec-2011 Anna Zaks <ganna@apple.com> [analyzer]Fixup r146336.

Forgot to commit the Header files.
Rename generateUnknownVal -> makeGenericVal.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@146337 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/StaticAnalyzer/Core/PathSensitive/SValBuilder.h
432a4558b8161c362efc319f8a38e074e74da201 09-Dec-2011 Anna Zaks <ganna@apple.com> [analyzer] Fix inconsistency on when SValBuilder assumes that 2
types are equivalent.

+ A taint test which tests bitwise operations and which was
triggering an assertion due to presence of the integer to integer cast.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@146240 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/StaticAnalyzer/Core/PathSensitive/SValBuilder.h
aace9ef279be3dadd53b481aee568bd7701178b4 07-Dec-2011 Anna Zaks <ganna@apple.com> [analyzer] Propagate taint through NonLoc to NonLoc casts.

- Created a new SymExpr type - SymbolCast.
- SymbolCast is created when we don't know how to simplify a NonLoc to
NonLoc casts.
- A bit of code refactoring: introduced dispatchCast to have better
code reuse, remove a goto.
- Updated the test case to showcase the new taint flow.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145985 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/StaticAnalyzer/Core/PathSensitive/SValBuilder.h
426a16d4e5efe7efefe76c405207fb170cabad9f 28-Nov-2011 Anna Zaks <ganna@apple.com> [analyzer] Minor cleanup of SValBuilder: Comments + code reuse.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145274 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/StaticAnalyzer/Core/PathSensitive/SValBuilder.h
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/include/clang/StaticAnalyzer/Core/PathSensitive/SValBuilder.h
18c66fdc3c4008d335885695fe36fb5353c5f672 16-Aug-2011 Ted Kremenek <kremenek@apple.com> Rename GRState to ProgramState, and cleanup some code formatting along the way.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137665 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/StaticAnalyzer/Core/PathSensitive/SValBuilder.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/StaticAnalyzer/Core/PathSensitive/SValBuilder.h
9697934650354bed2e509d8e7e44f21a1fb00f76 12-Aug-2011 Ted Kremenek <kremenek@apple.com> [analyzer] Introduce new MemRegion, "TypedValueRegion", so that we can separate TypedRegions that implement getValueType() from those that don't.

Patch by Olaf Krzikalla!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137498 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/StaticAnalyzer/Core/PathSensitive/SValBuilder.h
5e9ebb3c0fb554d9285aa99c470abdf283272bd9 21-May-2011 Douglas Gregor <dgregor@apple.com> A few more is(Un)signedIntegerType/is(Un)signedOrEnumerationType cleanups.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@131793 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/StaticAnalyzer/Core/PathSensitive/SValBuilder.h
cf333339615da345c2ed6e873d94a501810d9f3f 09-Mar-2011 Ted Kremenek <kremenek@apple.com> static analyzer: Fix use-after-free bug in RegionStore involving LazyCompoundValueData not reference counting Store objects.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127288 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/StaticAnalyzer/Core/PathSensitive/SValBuilder.h
9f8862aa64300ef97b8fe85034ee93bbc03e3b7b 01-Mar-2011 Zhanyong Wan <wan@google.com> Improves the coding style in SValBuilder. This patch:

- renames evalCastNL and evalCastL to evalCastFromNonLoc and
evalCastFromLoc (avoid abbreviations that aren't well known).

- makes all function parameter names start with a lower case letter
for consistency and distinction from member variables.

- avoids abbreviations in function parameter names.

Reviewed by kremenek@apple.com.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126722 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/StaticAnalyzer/Core/PathSensitive/SValBuilder.h
370e6e984cc32167228b66eaf9610c010da0d794 19-Feb-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> [analyzer] Fix crash when analyzing C++ code.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126013 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/StaticAnalyzer/Core/PathSensitive/SValBuilder.h
ad8dcf4a9df0e24051dc31bf9e6f3cd138a34298 17-Feb-2011 Chris Lattner <sabre@nondot.org> Step #1/N of implementing support for __label__: split labels into
LabelDecl and LabelStmt. There is a 1-1 correspondence between the
two, but this simplifies a bunch of code by itself. This is because
labels are the only place where we previously had references to random
other statements, causing grief for AST serialization and other stuff.

This does cause one regression (attr(unused) doesn't silence unused
label warnings) which I'll address next.

This does fix some minor bugs:
1. "The only valid attribute " diagnostic was capitalized.
2. Various diagnostics printed as ''labelname'' instead of 'labelname'
3. This reduces duplication of label checking between functions and blocks.

Review appreciated, particularly for the cindex and template bits.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125733 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/StaticAnalyzer/Core/PathSensitive/SValBuilder.h
7dfc9420babe83e236a47e752f8723bd06070d9d 16-Feb-2011 Zhanyong Wan <wan@google.com> Makes most methods in SVals.h conform to the naming guide. Reviewed
by kremenek.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125687 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/StaticAnalyzer/Core/PathSensitive/SValBuilder.h
9b663716449b618ba0390b1dbebc54fa8e971124 10-Feb-2011 Ted Kremenek <kremenek@apple.com> Split 'include/clang/StaticAnalyzer' into 'include/clang/StaticAnalyzer/Core' and 'include/clang/StaticAnalyzer/Checkers'.

This layout matches lib/StaticAnalyzer, which corresponds to two StaticAnalyzer libraries.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125251 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/StaticAnalyzer/Core/PathSensitive/SValBuilder.h