diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2017-01-14 15:38:35 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2017-01-14 15:38:35 +0000 |
commit | d2e0a8dd949ab874c6d66f97106bd5c270e2fa7d (patch) | |
tree | e8a99a0386e8f6bece630700da5915c8a312c2d9 /lib/StaticAnalyzer/Core/ExprEngine.cpp | |
parent | fdc82ccb3f2b23a89e7002fe8238e1422b00f96a (diff) |
Diffstat (limited to 'lib/StaticAnalyzer/Core/ExprEngine.cpp')
-rw-r--r-- | lib/StaticAnalyzer/Core/ExprEngine.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/StaticAnalyzer/Core/ExprEngine.cpp b/lib/StaticAnalyzer/Core/ExprEngine.cpp index 7e7e329dc4d7..d563f8e9eac0 100644 --- a/lib/StaticAnalyzer/Core/ExprEngine.cpp +++ b/lib/StaticAnalyzer/Core/ExprEngine.cpp @@ -515,8 +515,9 @@ void ExprEngine::ProcessInitializer(const CFGInitializer Init, Init = ASE->getBase()->IgnoreImplicit(); SVal LValue = State->getSVal(Init, stackFrame); - if (Optional<Loc> LValueLoc = LValue.getAs<Loc>()) - InitVal = State->getSVal(*LValueLoc); + if (!Field->getType()->isReferenceType()) + if (Optional<Loc> LValueLoc = LValue.getAs<Loc>()) + InitVal = State->getSVal(*LValueLoc); // If we fail to get the value for some reason, use a symbolic value. if (InitVal.isUnknownOrUndef()) { @@ -870,6 +871,7 @@ void ExprEngine::Visit(const Stmt *S, ExplodedNode *Pred, case Stmt::OMPTargetTeamsDistributeDirectiveClass: case Stmt::OMPTargetTeamsDistributeParallelForDirectiveClass: case Stmt::OMPTargetTeamsDistributeParallelForSimdDirectiveClass: + case Stmt::OMPTargetTeamsDistributeSimdDirectiveClass: llvm_unreachable("Stmt should not be in analyzer evaluation loop"); case Stmt::ObjCSubscriptRefExprClass: |