[clang] 536bd72 - [NFC] Rename 'Expr' to 'RefExpr' to fix the build warnings (#164828)
via cfe-commits
cfe-commits at lists.llvm.org
Thu Oct 23 08:09:36 PDT 2025
Author: Erich Keane
Date: 2025-10-23T15:09:32Z
New Revision: 536bd7214848a75594bb72ab01e02d13d54fb359
URL: https://github.com/llvm/llvm-project/commit/536bd7214848a75594bb72ab01e02d13d54fb359
DIFF: https://github.com/llvm/llvm-project/commit/536bd7214848a75594bb72ab01e02d13d54fb359.diff
LOG: [NFC] Rename 'Expr' to 'RefExpr' to fix the build warnings (#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.
Added:
Modified:
clang/include/clang/AST/StmtOpenACC.h
clang/lib/CIR/CodeGen/CIRGenStmtOpenACC.cpp
Removed:
################################################################################
diff --git a/clang/include/clang/AST/StmtOpenACC.h b/clang/include/clang/AST/StmtOpenACC.h
index f5240251b67af..ae8029797a36e 100644
--- a/clang/include/clang/AST/StmtOpenACC.h
+++ b/clang/include/clang/AST/StmtOpenACC.h
@@ -821,7 +821,9 @@ class OpenACCAtomicConstruct final
struct StmtInfo {
const Expr *V;
const Expr *X;
- const Expr *Expr;
+ // Listed as 'expr' in the standard, this is typically a generic expression
+ // as a component.
+ const Expr *RefExpr;
// TODO: OpenACC: We should expand this as we're implementing the other
// atomic construct kinds.
};
diff --git a/clang/lib/CIR/CodeGen/CIRGenStmtOpenACC.cpp b/clang/lib/CIR/CodeGen/CIRGenStmtOpenACC.cpp
index b125330321afd..349b111c0d8fd 100644
--- a/clang/lib/CIR/CodeGen/CIRGenStmtOpenACC.cpp
+++ b/clang/lib/CIR/CodeGen/CIRGenStmtOpenACC.cpp
@@ -346,7 +346,7 @@ CIRGenFunction::emitOpenACCAtomicConstruct(const OpenACCAtomicConstruct &s) {
}
case OpenACCAtomicKind::Write: {
mlir::Value x = emitLValue(inf.X).getPointer();
- mlir::Value expr = emitAnyExpr(inf.Expr).getValue();
+ mlir::Value expr = emitAnyExpr(inf.RefExpr).getValue();
auto op = mlir::acc::AtomicWriteOp::create(builder, start, x, expr,
/*ifCond=*/{});
emitOpenACCClauses(op, s.getDirectiveKind(), s.getDirectiveLoc(),
More information about the cfe-commits
mailing list