commit | d0f3d7148ca761fda2243528b2b62f916770f546 | [log] [tgz] |
---|---|---|
author | Ted Kremenek <kremenek@apple.com> | Fri Oct 12 22:56:42 2012 +0000 |
committer | Ted Kremenek <kremenek@apple.com> | Fri Oct 12 22:56:42 2012 +0000 |
tree | 8179c9821bc02744920a1e9efb424f31081442cc | |
parent | 5a8fc88b18793f25d4423805d7e4ac5d0325b9a6 [diff] [blame] |
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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165841 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/StaticAnalyzer/Checkers/CheckSecuritySyntaxOnly.cpp b/lib/StaticAnalyzer/Checkers/CheckSecuritySyntaxOnly.cpp index b8b7c36..5cd6194 100644 --- a/lib/StaticAnalyzer/Checkers/CheckSecuritySyntaxOnly.cpp +++ b/lib/StaticAnalyzer/Checkers/CheckSecuritySyntaxOnly.cpp
@@ -270,6 +270,7 @@ // 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;