@@ -7146,7 +7146,7 @@ Sema::BuildCompoundLiteralExpr(SourceLocation LParenLoc, TypeSourceInfo *TInfo,
71467146 // means the following compound literal is not at file scope:
71477147 // void func(char *para[(int [1]){ 0 }[0]);
71487148 const Scope *S = getCurScope();
7149- bool isFileScope = !CurContext->isFunctionOrMethod() &&
7149+ bool IsFileScope = !CurContext->isFunctionOrMethod() &&
71507150 (!S || !S->isFunctionPrototypeScope());
71517151
71527152 // In C, compound literals are l-values for some reason.
@@ -7168,20 +7168,20 @@ Sema::BuildCompoundLiteralExpr(SourceLocation LParenLoc, TypeSourceInfo *TInfo,
71687168 // FIXME: GCC supports compound literals of reference type, which should
71697169 // obviously have a value kind derived from the kind of reference involved.
71707170 ExprValueKind VK =
7171- (getLangOpts().CPlusPlus && !(isFileScope && literalType->isArrayType()))
7171+ (getLangOpts().CPlusPlus && !(IsFileScope && literalType->isArrayType()))
71727172 ? VK_PRValue
71737173 : VK_LValue;
71747174
7175- if (isFileScope )
7175+ if (IsFileScope )
71767176 if (auto ILE = dyn_cast<InitListExpr>(LiteralExpr))
71777177 for (unsigned i = 0, j = ILE->getNumInits(); i != j; i++) {
71787178 Expr *Init = ILE->getInit(i);
71797179 ILE->setInit(i, ConstantExpr::Create(Context, Init));
71807180 }
71817181
7182- auto *E = new (Context) CompoundLiteralExpr(LParenLoc, TInfo, literalType,
7183- VK, LiteralExpr, isFileScope );
7184- if (isFileScope ) {
7182+ auto *E = new (Context) CompoundLiteralExpr(LParenLoc, TInfo, literalType, VK,
7183+ LiteralExpr, IsFileScope );
7184+ if (IsFileScope ) {
71857185 if (!LiteralExpr->isTypeDependent() &&
71867186 !LiteralExpr->isValueDependent() &&
71877187 !literalType->isDependentType()) // C99 6.5.2.5p3
@@ -7197,7 +7197,7 @@ Sema::BuildCompoundLiteralExpr(SourceLocation LParenLoc, TypeSourceInfo *TInfo,
71977197 return ExprError();
71987198 }
71997199
7200- if (!isFileScope && !getLangOpts().CPlusPlus) {
7200+ if (!IsFileScope && !getLangOpts().CPlusPlus) {
72017201 // Compound literals that have automatic storage duration are destroyed at
72027202 // the end of the scope in C; in C++, they're just temporaries.
72037203
0 commit comments