From: Sebastian Redl Date: Thu, 5 Aug 2010 01:21:19 +0000 (+0000) Subject: Drop an unjustified limitation from Type::isObjectType(). Fixes PR7801 and doesn... X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=7f584bbe9c2de8455bfb572d4ab571628c6c024e;p=clang Drop an unjustified limitation from Type::isObjectType(). Fixes PR7801 and doesn't seem to break anything. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110295 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/AST/Type.cpp b/lib/AST/Type.cpp index 1085efec19..8ae138a2ac 100644 --- a/lib/AST/Type.cpp +++ b/lib/AST/Type.cpp @@ -168,7 +168,7 @@ bool Type::isVoidType() const { bool Type::isObjectType() const { if (isa(CanonicalType) || isa(CanonicalType) || - isa(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 index 0000000000..8808d203fd --- /dev/null +++ b/test/CXX/conv/conv.ptr/p2.cpp @@ -0,0 +1,6 @@ +// RUN: %clang_cc1 -fsyntax-only -verify %s + +namespace pr7801 { + extern void* x[]; + void* dummy[] = { &x }; +}