]> granicus.if.org Git - clang/commitdiff
Drop an unjustified limitation from Type::isObjectType(). Fixes PR7801 and doesn...
authorSebastian Redl <sebastian.redl@getdesigned.at>
Thu, 5 Aug 2010 01:21:19 +0000 (01:21 +0000)
committerSebastian Redl <sebastian.redl@getdesigned.at>
Thu, 5 Aug 2010 01:21:19 +0000 (01:21 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110295 91177308-0d34-0410-b5e6-96231b3b80d8

lib/AST/Type.cpp
test/CXX/conv/conv.ptr/p2.cpp [new file with mode: 0644]

index 1085efec19bb1b40c3c5f7c815b2cb704139ee01..8ae138a2acf548ef3e6fb4d830d322033ef31bc1 100644 (file)
@@ -168,7 +168,7 @@ bool Type::isVoidType() const {
 
 bool Type::isObjectType() const {
   if (isa<FunctionType>(CanonicalType) || isa<ReferenceType>(CanonicalType) ||
-      isa<IncompleteArrayType>(CanonicalType) || isVoidType())
+      isVoidType())
     return false;
   return true;
 }
diff --git a/test/CXX/conv/conv.ptr/p2.cpp b/test/CXX/conv/conv.ptr/p2.cpp
new file mode 100644 (file)
index 0000000..8808d20
--- /dev/null
@@ -0,0 +1,6 @@
+// RUN: %clang_cc1 -fsyntax-only -verify %s
+
+namespace pr7801 {
+  extern void* x[];
+  void* dummy[] = { &x };
+}