aaron.ballman added inline comments.

================
Comment at: clang/lib/Sema/SemaDecl.cpp:3216
+           (Ty->isVariableArrayType() &&
+            cast<VariableArrayType>(Ty)->getSizeModifier() ==
+                ArrayType::ArraySizeModifier::Star);
----------------
I forgot about this gotcha -- arrays are special in that you shouldn't be using 
`cast<>` and friends on them, you need to ask the `ASTContext` to go from the 
`QualType` to the correct array type. e.g., 
`ASTContext::getAsConstantArrayType()` and 
`ASTContext::getAsVariableArrayType()` -- I think this is the cause of the 
failed assertions we're seeing in precommit CI.


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

https://reviews.llvm.org/D128449

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

Reply via email to