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:
Ted Kremenek 2012-10-12 22:56:42 +00:00
parent b045b01840
commit 26a3661a10
1 changed files with 1 additions and 0 deletions

View File

@ -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;