================ @@ -537,15 +537,21 @@ class Expr : public ValueStmt { /// semantically correspond to a bool. bool isKnownToHaveBooleanValue(bool Semantic = true) const; - /// Check whether this array fits the idiom of a flexible array member, - /// depending on the value of -fstrict-flex-array. + /// isFlexibleArrayMemberLike - Check whether this array fits the idiom of a + /// flexible array member, depending on the value of -fstrict-flex-array. /// When IgnoreTemplateOrMacroSubstitution is set, it doesn't consider sizes /// resulting from the substitution of a macro or a template as special sizes. bool isFlexibleArrayMemberLike( ASTContext &Context, LangOptions::StrictFlexArraysLevelKind StrictFlexArraysLevel, bool IgnoreTemplateOrMacroSubstitution = false) const; + /// getMemberExpr - Find the first MemberExpr of the Expr. This method + /// intentionally looks through all casts, array subscripts, and unary + /// operators to find an underlying MemberExpr. If one doesn't exist, it + /// returns a nullptr. + const MemberExpr *getMemberExpr() const; ---------------- Sirraide wrote:
Ah, did I miss a use of it in Sema somewhere? If it’s used in both, then it’s fine. https://github.com/llvm/llvm-project/pull/102549 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits