diff --git a/clang/lib/Sema/SemaExpr.cpp b/clang/lib/Sema/SemaExpr.cpp index 5634c6cdd87d..b0c337149d9c 100644 --- a/clang/lib/Sema/SemaExpr.cpp +++ b/clang/lib/Sema/SemaExpr.cpp @@ -2369,7 +2369,7 @@ Sema::BuildDeclarationNameExpr(const CXXScopeSpec &SS, // variable is within the block, create a normal DeclRefExpr. QualType type = VD->getType(); - ExprValueKind valueKind = 0; + ExprValueKind valueKind = VK_RValue; switch (D->getKind()) { // Ignore all the non-ValueDecl kinds.