[PATCH] D45491: [analyzer] Do not invalidate the `this` pointer.

2018-04-15 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC330095: [analyzer] Do not invalidate the `this` pointer. (authored by henrywong, committed by ). Repository: rC Clang https://reviews.llvm.org/D45491 Files: lib/StaticAnalyzer/Core/LoopWidening.cpp

[PATCH] D45491: [analyzer] Do not invalidate the `this` pointer.

2018-04-14 Thread Henry Wong via Phabricator via cfe-commits
MTC added a comment. In https://reviews.llvm.org/D45491#1067852, @NoQ wrote: > Yeah, i think this makes sense, thanks! It feels a bit weird that we have to > add it as an exception - i wonder if there are other exceptions that we need > to make. Widening over the stack memory space should be a

[PATCH] D45491: [analyzer] Do not invalidate the `this` pointer.

2018-04-13 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ accepted this revision. NoQ added a comment. This revision is now accepted and ready to land. Yeah, i think this makes sense, thanks! It feels a bit weird that we have to add it as an exception - i wonder if there are other exceptions that we need to make. Widening over the stack memory spac

[PATCH] D45491: [analyzer] Do not invalidate the `this` pointer.

2018-04-11 Thread Henry Wong via Phabricator via cfe-commits
MTC updated this revision to Diff 142026. MTC marked 2 inline comments as done. MTC added a comment. - Move the `CXXThisRegion`'s check to `LoopWidening.cpp` - Use `isa(R)` instead of `CXXThisRegion::classof(R)`. Repository: rC Clang https://reviews.llvm.org/D45491 Files: lib/StaticAnalyze

[PATCH] D45491: [analyzer] Do not invalidate the `this` pointer.

2018-04-11 Thread Henry Wong via Phabricator via cfe-commits
MTC marked 2 inline comments as done. MTC added inline comments. Comment at: lib/StaticAnalyzer/Core/RegionStore.cpp:1024-1027 + // 'this' pointer is not an lvalue, we should not invalidate it. + if (CXXThisRegion::classof(baseR)) +return; + NoQ wrote: > I

[PATCH] D45491: [analyzer] Do not invalidate the `this` pointer.

2018-04-11 Thread Henry Wong via Phabricator via cfe-commits
MTC added a comment. In https://reviews.llvm.org/D45491#1063364, @george.karpenkov wrote: > @MTC what happens for > > this.j = 0; > for (int i=0; i<100; i++) > this.j++; > > > ? @george.karpenkov `this`'s value will remain unchanged, `j` will be invalidated. 1 void clang_analyz

[PATCH] D45491: [analyzer] Do not invalidate the `this` pointer.

2018-04-10 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added inline comments. Comment at: lib/StaticAnalyzer/Core/RegionStore.cpp:1024-1027 + // 'this' pointer is not an lvalue, we should not invalidate it. + if (CXXThisRegion::classof(baseR)) +return; + I don't think this run-time check belongs here. The f

[PATCH] D45491: [analyzer] Do not invalidate the `this` pointer.

2018-04-10 Thread George Karpenkov via Phabricator via cfe-commits
george.karpenkov added a comment. @MTC what happens for this.j = 0; for (int i=0; i<100; i++) this.j++; ? Repository: rC Clang https://reviews.llvm.org/D45491 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.or

[PATCH] D45491: [analyzer] Do not invalidate the `this` pointer.

2018-04-10 Thread Henry Wong via Phabricator via cfe-commits
MTC created this revision. MTC added reviewers: NoQ, george.karpenkov, a.sidorin, seaneveson, szepet. Herald added subscribers: cfe-commits, rnkovacs, xazax.hun. MTC edited the summary of this revision. `this` pointer is not an l-value, although we have modeled `CXXThisRegion` for `this` pointer,