[PATCH] D32437: [analyzer] Nullability: fix a crash when adding notes inside a synthesized property accessor.

2017-06-05 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL304710: [analyzer] Nullability: fix notes around synthesized ObjC property accessors. (authored by dergachev). Changed prior to commit: https://reviews.llvm.org/D32437?vs=100673=101392#toc Repository:

[PATCH] D32437: [analyzer] Nullability: fix a crash when adding notes inside a synthesized property accessor.

2017-05-30 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added inline comments. Comment at: lib/StaticAnalyzer/Core/PathDiagnostic.cpp:704 +const LocationContext *ParentLC = LC->getParent(); +while (ParentLC->getAnalysisDeclContext()->isBodyAutosynthesized()) { + LC = ParentLC; zaks.anna wrote: > Is

[PATCH] D32437: [analyzer] Nullability: fix a crash when adding notes inside a synthesized property accessor.

2017-05-30 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ updated this revision to Diff 100673. NoQ marked 3 inline comments as done. NoQ added a comment. Fix comments. https://reviews.llvm.org/D32437 Files: include/clang/StaticAnalyzer/Core/BugReporter/PathDiagnostic.h lib/StaticAnalyzer/Checkers/NullabilityChecker.cpp

[PATCH] D32437: [analyzer] Nullability: fix a crash when adding notes inside a synthesized property accessor.

2017-05-17 Thread Anna Zaks via Phabricator via cfe-commits
zaks.anna added a comment. Thanks! A couple of minor comments below. Comment at: lib/StaticAnalyzer/Core/PathDiagnostic.cpp:699 + // We cannot place diagnostics on autosynthesized code. + // Put them onto the call site through which we jumped into autosynthesized + // code

[PATCH] D32437: [analyzer] Nullability: fix a crash when adding notes inside a synthesized property accessor.

2017-05-17 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ updated this revision to Diff 99300. NoQ added a comment. Herald added a subscriber: xazax.hun. Automatically pop up from bodyfarm-originated code in `PathDiagnosticLocation::getStmt()`. Avoid putting "Calling..." and "Returning..." notes on Objective-C auto-synthesized property calls,

[PATCH] D32437: [analyzer] Nullability: fix a crash when adding notes inside a synthesized property accessor.

2017-05-10 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added a comment. In https://reviews.llvm.org/D32437#750622, @zaks.anna wrote: > > That wouldn't work this way because we'd have the completely redundant > > "calling property accessor" piece before that, and "returning..." after > > that. > > I think we should not print "calling" and

[PATCH] D32437: [analyzer] Nullability: fix a crash when adding notes inside a synthesized property accessor.

2017-05-10 Thread Anna Zaks via Phabricator via cfe-commits
zaks.anna added a comment. > That wouldn't work this way because we'd have the completely redundant > "calling property accessor" piece before that, and "returning..." after that. I think we should not print "calling" and "returning" for calling into and returning from autogenerated code, If

[PATCH] D32437: [analyzer] Nullability: fix a crash when adding notes inside a synthesized property accessor.

2017-05-10 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added a comment. > What are these? Is there a PR? The best explanation we currently have, with examples, is https://reviews.llvm.org/D24278 > It would be great if we could place a note on a parent that has location. That's actually the best approach in my opinion, if achievable. > For

[PATCH] D32437: [analyzer] Nullability: fix a crash when adding notes inside a synthesized property accessor.

2017-05-10 Thread Anna Zaks via Phabricator via cfe-commits
zaks.anna accepted this revision. zaks.anna added a comment. This revision is now accepted and ready to land. > These new "extra notes" of mine might be useful (we could put them at > property declaration), i could add them if everybody likes this idea. What are these? Is there a PR? It would

[PATCH] D32437: [analyzer] Nullability: fix a crash when adding notes inside a synthesized property accessor.

2017-04-24 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ created this revision. In this test case, the body of a property is autosynthesized, and its source locations are invalid. Path diagnostic locations must refer to valid source locations, hence we're hitting an assertion. This patch disables the bugvisitor's note, however we'd need to