[clang] [Clang] Add __builtin_get_counted_by builtin (PR #102549)
via cfe-commits
cfe-commits at lists.llvm.org
Tue Aug 13 02:07:17 PDT 2024
================
@@ -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:
This feels like a bit of a weird place to put this; I think this should just be somewhere in codegen (wherever it’s used basically).
https://github.com/llvm/llvm-project/pull/102549
More information about the cfe-commits
mailing list