[PATCH] D65663: [analyzer] ConditionBRVisitor: Fix HTML PathDiagnosticPopUpPieces
Artem Dergachev via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Aug 6 16:43:54 PDT 2019
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
More information about the cfe-commits
mailing list