diff options
author | Douglas Gregor <dgregor@apple.com> | 2009-03-24 20:32:41 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2009-03-24 20:32:41 +0000 |
commit | bad0e656c3732e3539a9cd6525de721d7e47408b (patch) | |
tree | 3f18b5b2a5688527adfa4e9227922b7144b91151 /lib/Sema/SemaType.cpp | |
parent | 337a6271b98c4c183f7eaad1563a75260b4f2871 (diff) |
Type::isObjectType now implements the (more sensible) C++ definition
of "object type" rather than the C definition of "object type". The
difference is that C's "object type" excludes incomplete types such as
struct X;
However, C's definition also makes it far too easy to use isObjectType
as a means to detect incomplete types when in fact we should use other
means (e.g., Sema::RequireCompleteType) that cope with C++ semantics,
including template instantiation.
I've already audited every use of isObjectType and isIncompleteType to
ensure that they are doing the right thing for both C and C++, so this
is patch does not change any functionality.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67648 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaType.cpp')
-rw-r--r-- | lib/Sema/SemaType.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Sema/SemaType.cpp b/lib/Sema/SemaType.cpp index fdd6ff91fe..196a30642b 100644 --- a/lib/Sema/SemaType.cpp +++ b/lib/Sema/SemaType.cpp @@ -235,7 +235,7 @@ QualType Sema::ConvertDeclSpecToType(const DeclSpec &DS) { Result->getAsPointerType()->getPointeeType() : Result->getAsReferenceType()->getPointeeType(); - // If we have a pointer or reference, the pointee must have an object or + // If we have a pointer or reference, the pointee must have an object // incomplete type. if (!EltTy->isIncompleteOrObjectType()) { Diag(DS.getRestrictSpecLoc(), |