[cfe-commits] r110295 - in /cfe/trunk: lib/AST/Type.cpp test/CXX/conv/conv.ptr/p2.cpp
Sebastian Redl
sebastian.redl at getdesigned.at
Wed Aug 4 18:21:20 PDT 2010
Author: cornedbee
Date: Wed Aug 4 20:21:19 2010
New Revision: 110295
URL: http://llvm.org/viewvc/llvm-project?rev=110295&view=rev
Log:
Drop an unjustified limitation from Type::isObjectType(). Fixes PR7801 and doesn't seem to break anything.
Added:
cfe/trunk/test/CXX/conv/conv.ptr/p2.cpp
Modified:
cfe/trunk/lib/AST/Type.cpp
Modified: cfe/trunk/lib/AST/Type.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/AST/Type.cpp?rev=110295&r1=110294&r2=110295&view=diff
==============================================================================
--- cfe/trunk/lib/AST/Type.cpp (original)
+++ cfe/trunk/lib/AST/Type.cpp Wed Aug 4 20:21:19 2010
@@ -168,7 +168,7 @@
bool Type::isObjectType() const {
if (isa<FunctionType>(CanonicalType) || isa<ReferenceType>(CanonicalType) ||
- isa<IncompleteArrayType>(CanonicalType) || isVoidType())
+ isVoidType())
return false;
return true;
}
Added: cfe/trunk/test/CXX/conv/conv.ptr/p2.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CXX/conv/conv.ptr/p2.cpp?rev=110295&view=auto
==============================================================================
--- cfe/trunk/test/CXX/conv/conv.ptr/p2.cpp (added)
+++ cfe/trunk/test/CXX/conv/conv.ptr/p2.cpp Wed Aug 4 20:21:19 2010
@@ -0,0 +1,6 @@
+// RUN: %clang_cc1 -fsyntax-only -verify %s
+
+namespace pr7801 {
+ extern void* x[];
+ void* dummy[] = { &x };
+}
More information about the cfe-commits
mailing list