Skip to content

Commit 58a72ed

Browse files
erichkeaneaokblast
authored andcommitted
[NFC] Rename 'Expr' to 'RefExpr' to fix the build warnings (llvm#164828)
I used 'expr' since that is what it is in the standard, but that obviously conflicts with our warnings on some build bots. This patch fixes that by renaming it.
1 parent f616196 commit 58a72ed

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

clang/include/clang/AST/StmtOpenACC.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -821,7 +821,9 @@ class OpenACCAtomicConstruct final
821821
struct StmtInfo {
822822
const Expr *V;
823823
const Expr *X;
824-
const Expr *Expr;
824+
// Listed as 'expr' in the standard, this is typically a generic expression
825+
// as a component.
826+
const Expr *RefExpr;
825827
// TODO: OpenACC: We should expand this as we're implementing the other
826828
// atomic construct kinds.
827829
};

clang/lib/CIR/CodeGen/CIRGenStmtOpenACC.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -346,7 +346,7 @@ CIRGenFunction::emitOpenACCAtomicConstruct(const OpenACCAtomicConstruct &s) {
346346
}
347347
case OpenACCAtomicKind::Write: {
348348
mlir::Value x = emitLValue(inf.X).getPointer();
349-
mlir::Value expr = emitAnyExpr(inf.Expr).getValue();
349+
mlir::Value expr = emitAnyExpr(inf.RefExpr).getValue();
350350
auto op = mlir::acc::AtomicWriteOp::create(builder, start, x, expr,
351351
/*ifCond=*/{});
352352
emitOpenACCClauses(op, s.getDirectiveKind(), s.getDirectiveLoc(),

0 commit comments

Comments
 (0)