[PATCH] D149612: [Sema] avoid merge error type

Shafik Yaghmour via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue May 2 21:13:00 PDT 2023


shafik added a subscriber: rsmith.
shafik added a comment.

In D149612#4314209 <https://reviews.llvm.org/D149612#4314209>, @HerrCai0907 wrote:

> in SemaType.cpp#BuildArrayType, It will generate `DependentSizedArrayType` which cannot be merged. 
> So we can either add additional check in `MergeVarDeclTypes` or directly ignore to generate this type in `BuildArrayType`.
> Which one is better?
>
>   } else if (ArraySize->isTypeDependent() || ArraySize->isValueDependent()) {
>     T = Context.getDependentSizedArrayType(T, ArraySize, ASM, Quals, Brackets);

I am not sure where the right place to fix this is, or when it is correct to use `containsErrors()`

Maybe @aaron.ballman or @rsmith might have some advice


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D149612



More information about the cfe-commits mailing list