summaryrefslogtreecommitdiffstats
path: root/clang/test/Analysis/call-invalidation.cpp
Commit message (Collapse)AuthorAgeFilesLines
* [analyzer] Invalidate regions indirectly accessible through const pointers.Jordan Rose2013-03-201-0/+91
In this case, the value of 'x' may be changed after the call to indirectAccess: struct Wrapper { int *ptr; }; void indirectAccess(const Wrapper &w); void test() { int x = 42; Wrapper w = { x }; clang_analyzer_eval(x == 42); // TRUE indirectAccess(w); clang_analyzer_eval(x == 42); // UNKNOWN } This is important for modelling return-by-value objects in C++, to show that the contents of the struct are escaping in the return copy-constructor. <rdar://problem/13239826> llvm-svn: 177570
OpenPOWER on IntegriCloud