[PATCH] D24110: [Sema] Don't diagnose an array type mismatch when the new or previous declaration has a dependent type

Richard Smith via cfe-commits cfe-commits at lists.llvm.org
Wed Aug 31 17:01:13 PDT 2016


rsmith accepted this revision.
rsmith added a comment.
This revision is now accepted and ready to land.

LGTM as-is, but one suggestion if you want to still allow diagnosing a few more cases.


================
Comment at: lib/Sema/SemaDecl.cpp:3377-3378
@@ -3376,4 +3376,4 @@
 
           if (!Context.hasSameType(NewArray, PrevVDTy))
             return diagnoseVarDeclTypeMismatch(*this, New, PrevVD);
         }
----------------
If you do use `isDependentSizedArrayType()`, you'll need to change this to check the bounds of the array types rather than the type.


https://reviews.llvm.org/D24110





More information about the cfe-commits mailing list