efriedma added a comment.

> We have the VariableArrayType to represent a VLA type and I think we're using 
> that type when we should be using a variably modified type

The clang AST for function signatures encodes two types: the type as written, 
and the type after promotion.  Semantic analysis always uses the type after 
promotion, but the type as written is useful if you're trying to do source 
rewriting, or something like that.

We could theoretically mess with the AST representation somehow, but I don't 
see any compelling reason to.  We probably just want to emit the warn_vla_used 
diagnostic somewhere else.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D132952/new/

https://reviews.llvm.org/D132952

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to