erichkeane accepted this revision.
erichkeane added a comment.

Looking through `isCompleteType` I note that arrays of an elements of 
incomplete types would have also hit this crash, as would member-pointers in 
MicrosoftABI (in some weird cases?), and some ObjC types.

Anyway, other than the nit above, LGTM.



================
Comment at: clang/lib/Sema/SemaTemplate.cpp:401
     IsDependent = !LookupCtx && ObjectType->isDependentType();
-    assert((IsDependent || !ObjectType->isIncompleteType() ||
+    assert((IsDependent || !ObjectType->getAs<TagType>() ||
+            !ObjectType->isIncompleteType() ||
----------------
Slight preference for making the `getAs` happen after the completeness check, 
since that is in the 'order of costliness'.  

Also, not sure the assert message here makes any sense, but I don't know of 
anything better here.




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

https://reviews.llvm.org/D132712

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

Reply via email to