[clang] [OpenACC][CIR] Implement atomic update lowering (PR #164836)

Andy Kaylor via cfe-commits cfe-commits at lists.llvm.org
Fri Oct 24 10:46:37 PDT 2025


================
@@ -304,12 +304,21 @@ CIRGenFunction::emitOpenACCCacheConstruct(const OpenACCCacheConstruct &s) {
   return mlir::success();
 }
 
+const VarDecl *getLValueDecl(const Expr *E) {
+  // We are going to assume that after stripping implicit casts, that the LValue
+  // is just a DRE around the var-decl.
+
+  E = E->IgnoreImpCasts();
+
+  const auto *DRE = cast<DeclRefExpr>(E);
----------------
andykaylor wrote:

```suggestion
  const auto *dre = cast<DeclRefExpr>(e);
```
I'm sure you must love flipping between two coding styles in the same PR. 😄 

https://github.com/llvm/llvm-project/pull/164836


More information about the cfe-commits mailing list