================
@@ -3044,6 +3044,85 @@ static QualType getVectorElementType(ASTContext 
&Context, QualType VecTy) {
   return QualType();
 }
 
+/// Returns true when the object holding the flexible array member reached by
+/// \p ME has a fixed allocation (a local, parameter, static, or global
+/// variable). A count cannot enlarge a fixed allocation, so '&fam' loses
+/// nothing useful there. Returns false when the member is reached through a
+/// pointer, where the count is the bound the layout fallback would lose.
+static bool flexibleArrayMemberHasFixedStorage(const MemberExpr *ME) {
----------------
hnrklssn wrote:

Given that https://github.com/llvm/llvm-project/pull/211697 warns for FAMs in 
these situations, is this still worth handling here?

https://github.com/llvm/llvm-project/pull/206760
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to