NoQ added inline comments.
================
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);
----------------
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.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D65663/new/
https://reviews.llvm.org/D65663
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits