diff options
author | Douglas Gregor <dgregor@apple.com> | 2009-03-24 20:13:58 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2009-03-24 20:13:58 +0000 |
commit | 8dcb29db8483d4dcaeeecc0e653b642b0a41cd2c (patch) | |
tree | 75e7a84f6aacdd9080f870653b65f619b171f4a4 /lib/Sema/SemaTemplate.cpp | |
parent | e7450f5dbd5bed63b8ef9db86350a8fc3db011e8 (diff) |
Fix a few isObjectTypes that really need to be isIncompleteOrObject
types; add another use of RequireCompleteType.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67644 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaTemplate.cpp')
-rw-r--r-- | lib/Sema/SemaTemplate.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/Sema/SemaTemplate.cpp b/lib/Sema/SemaTemplate.cpp index fd39a9150f..c7899d1ecc 100644 --- a/lib/Sema/SemaTemplate.cpp +++ b/lib/Sema/SemaTemplate.cpp @@ -1395,7 +1395,8 @@ bool Sema::CheckTemplateArgument(NonTypeTemplateParmDecl *Param, // -- for a non-type template-parameter of type pointer to // object, qualification conversions (4.4) and the // array-to-pointer conversion (4.2) are applied. - assert(ParamType->getAsPointerType()->getPointeeType()->isObjectType() && + assert(ParamType->getAsPointerType()->getPointeeType() + ->isIncompleteOrObjectType() && "Only object pointers allowed here"); if (ArgType->isArrayType()) { @@ -1434,7 +1435,7 @@ bool Sema::CheckTemplateArgument(NonTypeTemplateParmDecl *Param, // identical) type of the template-argument. The // template-parameter is bound directly to the // template-argument, which must be an lvalue. - assert(ParamRefType->getPointeeType()->isObjectType() && + assert(ParamRefType->getPointeeType()->isIncompleteOrObjectType() && "Only object references allowed here"); if (!Context.hasSameUnqualifiedType(ParamRefType->getPointeeType(), ArgType)) { |