forked from OSchip/llvm-project
Silence static analyzer issue by documenting that in this context
that a DeclRefExpr can never return a null decl. We possibly should hoist this into getDecl() itself. llvm-svn: 165841
This commit is contained in:
parent
b045b01840
commit
26a3661a10
|
@ -270,6 +270,7 @@ void WalkAST::checkLoopConditionForFloat(const ForStmt *FS) {
|
|||
|
||||
// Emit the error. First figure out which DeclRefExpr in the condition
|
||||
// referenced the compared variable.
|
||||
assert(drInc->getDecl());
|
||||
const DeclRefExpr *drCond = vdLHS == drInc->getDecl() ? drLHS : drRHS;
|
||||
|
||||
SmallVector<SourceRange, 2> ranges;
|
||||
|
|
Loading…
Reference in New Issue