diff options
| author | Dimitry Andric <dim@FreeBSD.org> | 2018-07-28 11:06:01 +0000 |
|---|---|---|
| committer | Dimitry Andric <dim@FreeBSD.org> | 2018-07-28 11:06:01 +0000 |
| commit | 486754660bb926339aefcf012a3f848592babb8b (patch) | |
| tree | ecdbc446c9876f4f120f701c243373cd3cb43db3 /lib/StaticAnalyzer/Checkers/CastToStructChecker.cpp | |
| parent | 55e6d896ad333f07bb3b1ba487df214fc268a4ab (diff) | |
Notes
Diffstat (limited to 'lib/StaticAnalyzer/Checkers/CastToStructChecker.cpp')
| -rw-r--r-- | lib/StaticAnalyzer/Checkers/CastToStructChecker.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/StaticAnalyzer/Checkers/CastToStructChecker.cpp b/lib/StaticAnalyzer/Checkers/CastToStructChecker.cpp index 65e81315f095..00e903355720 100644 --- a/lib/StaticAnalyzer/Checkers/CastToStructChecker.cpp +++ b/lib/StaticAnalyzer/Checkers/CastToStructChecker.cpp @@ -78,7 +78,7 @@ bool CastToStructVisitor::VisitCastExpr(const CastExpr *CE) { // Don't warn for references const ValueDecl *VD = nullptr; if (const auto *SE = dyn_cast<DeclRefExpr>(U->getSubExpr())) - VD = dyn_cast<ValueDecl>(SE->getDecl()); + VD = SE->getDecl(); else if (const auto *SE = dyn_cast<MemberExpr>(U->getSubExpr())) VD = SE->getMemberDecl(); if (!VD || VD->getType()->isReferenceType()) |
