Charusso added a comment.

Thanks for the review! It is much better: F9740817: 
report-Driver.cpp-operator()-6-2.html <https://reviews.llvm.org/F9740817>



================
Comment at: clang/lib/StaticAnalyzer/Core/BugReporterVisitors.cpp:2420
+  if (!IsAssuming) {
+    PathDiagnosticLocation Loc(BExpr->getLHS(), BRC.getSourceManager(), LCtx);
     return std::make_shared<PathDiagnosticPopUpPiece>(Loc, Message);
----------------
NoQ wrote:
> Charusso wrote:
> > NoQ wrote:
> > > Just curious, can `BExpr->getLHS()` potentially still be a multi-line 
> > > expression? Or are we making sure it's always a 
> > > `DeclRefExpr`/`MemberExpr`?
> > > 
> > > In case of `MemberExpr` i'm pretty sure you can fit a newline 
> > > before/after `.` or `->`.
> > Previously I have focused on `DeclRefExpr` and `MemberExpr` 
> > value-evaluation, so that there the expression must be one of them. Because 
> > we have no `getField()` method for obtaining the field of the `MemberExpr`, 
> > I have picked `getBase()`.
> It's `MemberExpr::getMemberLoc()`. It's always a single token. Unlike the 
> base, which may still be arbitrarily complex.
I am thinking about the opposite when we `have->a->lot->of->stuff`. It is 
working fine, thanks for the ideas!


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D65663/new/

https://reviews.llvm.org/D65663



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to