Get rid of isObjectType; when C++ says "object type", it generally
just means "not a function type", not "not a function type or void". This
changes behavior slightly, but generally in a way which accepts more code.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110303 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/AST/ExprConstant.cpp b/lib/AST/ExprConstant.cpp
index b74b327..30234f5 100644
--- a/lib/AST/ExprConstant.cpp
+++ b/lib/AST/ExprConstant.cpp
@@ -1106,7 +1106,7 @@
QualType T = GetObjectType(LVBase);
if (T.isNull() ||
T->isIncompleteType() ||
- !T->isObjectType() ||
+ T->isFunctionType() ||
T->isVariablyModifiedType() ||
T->isDependentType())
return false;
diff --git a/lib/AST/Type.cpp b/lib/AST/Type.cpp
index 8ae138a..31af6fb 100644
--- a/lib/AST/Type.cpp
+++ b/lib/AST/Type.cpp
@@ -166,13 +166,6 @@
return false;
}
-bool Type::isObjectType() const {
- if (isa<FunctionType>(CanonicalType) || isa<ReferenceType>(CanonicalType) ||
- isVoidType())
- return false;
- return true;
-}
-
bool Type::isDerivedType() const {
switch (CanonicalType->getTypeClass()) {
case Pointer: