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:
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
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
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
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,
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
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
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
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
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
10 matches
Mail list logo