From 7f584bbe9c2de8455bfb572d4ab571628c6c024e Mon Sep 17 00:00:00 2001 From: Sebastian Redl Date: Thu, 5 Aug 2010 01:21:19 +0000 Subject: [PATCH] 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 --- lib/AST/Type.cpp | 2 +- test/CXX/conv/conv.ptr/p2.cpp | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) create mode 100644 test/CXX/conv/conv.ptr/p2.cpp 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 }; +} -- 2.40.0