[clang] [CIR] Upstream ArraySubscriptExpr for fixed size array (PR #134536)
Andy Kaylor via cfe-commits
cfe-commits at lists.llvm.org
Mon Apr 7 14:08:52 PDT 2025
================
@@ -232,6 +233,161 @@ LValue CIRGenFunction::emitUnaryOpLValue(const UnaryOperator *e) {
llvm_unreachable("Unknown unary operator kind!");
}
+/// If the specified expr is a simple decay from an array to pointer,
+/// return the array subexpression.
+/// FIXME: this could be abstracted into a common AST helper.
+static const Expr *isSimpleArrayDecayOperand(const Expr *e) {
----------------
andykaylor wrote:
```suggestion
static const Expr *getSimpleArrayDecayOperand(const Expr *e) {
```
Functions starting with "is" should return bool. Since that's not what we want here, the name shouldn't suggest it is.
https://github.com/llvm/llvm-project/pull/134536
More information about the cfe-commits
mailing list