Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | [analyzer] Functions marked __attribute__((const)) don't modify any memory. | Jordan Rose | 2014-05-07 | 1 | -0/+29 |
| | | | | | | | | | This applies to __attribute__((pure)) as well, but 'const' is more interesting because many of our builtins are marked 'const'. PR19661 llvm-svn: 208154 | ||||
* | [analyzer] Invalidate regions indirectly accessible through const pointers. | Jordan Rose | 2013-03-20 | 1 | -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 |