erichkeane added inline comments.

================
Comment at: clang/lib/Sema/SemaType.cpp:2582
   } else if (ArraySize->isTypeDependent() || ArraySize->isValueDependent()) {
-    T = Context.getDependentSizedArrayType(T, ArraySize, ASM, Quals, Brackets);
+    if (getLangOpts().CPlusPlus) {
+      T = Context.getDependentSizedArrayType(T, ArraySize, ASM, Quals,
----------------
HerrCai0907 wrote:
> erichkeane wrote:
> > So I'm still not sure this is the 'right' away about it.  I think we should 
> > instead properly handle the `containsErrors` case and just always create a 
> > non-dependent sized array, except with the `RecoveryExpr` having the 
> > correct type.
> For CPP, dependent sized array is acceptable and necessary.
> 
> For C, I don't think SemaType is a correctly way to resolve TypoExpr, It 
> should be done by `ActOnXXX`.
Why is the dependent array necessary for C++?  I also don't get your C logic 
here... I think that Nullptr should be a RecoveryExpr of the proper type.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D149612

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

Reply via email to