Skip to content

Commit 1f7e736

Browse files
committed
Address review comments
1 parent f39a8f0 commit 1f7e736

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

clang/lib/AST/Interp/Interp.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -336,7 +336,7 @@ bool CheckGlobalInitialized(InterpState &S, CodePtr OpPC, const Pointer &Ptr) {
336336
if (Ptr.isInitialized())
337337
return true;
338338

339-
const VarDecl *VD = cast<VarDecl>(Ptr.getDeclDesc()->asValueDecl());
339+
const auto *VD = cast<VarDecl>(Ptr.getDeclDesc()->asValueDecl());
340340
if ((S.getLangOpts().CPlusPlus && !VD->hasConstantInitialization() &&
341341
VD->mightBeUsableInConstantExpressions(S.getCtx())) ||
342342
((S.getLangOpts().CPlusPlus || S.getLangOpts().OpenCL) &&

clang/lib/AST/Interp/Interp.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1014,7 +1014,7 @@ bool GetGlobal(InterpState &S, CodePtr OpPC, uint32_t I) {
10141014
if (Ptr.isExtern())
10151015
return false;
10161016

1017-
// If a global variable is uninitialized, that means the initialize we've
1017+
// If a global variable is uninitialized, that means the initializer we've
10181018
// compiled for it wasn't a constant expression. Diagnose that.
10191019
if (!CheckGlobalInitialized(S, OpPC, Ptr))
10201020
return false;

0 commit comments

Comments
 (0)