[PATCH] D17355: [Sema] Remove assert in TreeTransform<Derived>::TransformObjCObjectType
Akira Hatanaka via cfe-commits
cfe-commits at lists.llvm.org
Wed Feb 24 23:13:11 PST 2016
This revision was automatically updated to reflect the committed changes.
Closed by commit rL261829: [Sema] Remove assert in TreeTransform<Derived>::TransformObjCObjectType. (authored by ahatanak).
Changed prior to commit:
http://reviews.llvm.org/D17355?vs=48247&id=49012#toc
Repository:
rL LLVM
http://reviews.llvm.org/D17355
Files:
cfe/trunk/lib/Sema/TreeTransform.h
cfe/trunk/test/SemaObjCXX/base-type-as-written.mm
Index: cfe/trunk/test/SemaObjCXX/base-type-as-written.mm
===================================================================
--- cfe/trunk/test/SemaObjCXX/base-type-as-written.mm
+++ cfe/trunk/test/SemaObjCXX/base-type-as-written.mm
@@ -0,0 +1,9 @@
+// RUN: %clang_cc1 -fsyntax-only -verify %s
+// Make sure we don't crash in TreeTransform<Derived>::TransformObjCObjectType.
+
+ at protocol P1
+ at end
+
+template <class T1><P1> foo1(T1) { // expected-warning {{protocol has no object type specified; defaults to qualified 'id'}}
+ foo1(0);
+}
Index: cfe/trunk/lib/Sema/TreeTransform.h
===================================================================
--- cfe/trunk/lib/Sema/TreeTransform.h
+++ cfe/trunk/lib/Sema/TreeTransform.h
@@ -5932,7 +5932,6 @@
}
ObjCObjectTypeLoc NewT = TLB.push<ObjCObjectTypeLoc>(Result);
- assert(TL.hasBaseTypeAsWritten() && "Can't be dependent");
NewT.setHasBaseTypeAsWritten(true);
NewT.setTypeArgsLAngleLoc(TL.getTypeArgsLAngleLoc());
for (unsigned i = 0, n = TL.getNumTypeArgs(); i != n; ++i)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D17355.49012.patch
Type: text/x-patch
Size: 1042 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20160225/f9bfb244/attachment.bin>
More information about the cfe-commits
mailing list