diff options
author | Chris Lattner <sabre@nondot.org> | 2009-02-20 21:37:53 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2009-02-20 21:37:53 +0000 |
commit | 696197cd30fd6daeacd361eb5bb5d57af2cd94a3 (patch) | |
tree | 153ba04e787c166c4be5d6409c3e30c02de15f0b /clang/lib/Sema/SemaTemplate.cpp | |
parent | 2229872d2fde3492427069a6a5cc1a17d51975bf (diff) | |
download | bcm5719-llvm-696197cd30fd6daeacd361eb5bb5d57af2cd94a3.tar.gz bcm5719-llvm-696197cd30fd6daeacd361eb5bb5d57af2cd94a3.zip |
silence some warnings in no asserts mode.
llvm-svn: 65169
Diffstat (limited to 'clang/lib/Sema/SemaTemplate.cpp')
-rw-r--r-- | clang/lib/Sema/SemaTemplate.cpp | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/clang/lib/Sema/SemaTemplate.cpp b/clang/lib/Sema/SemaTemplate.cpp index a47634ba694..223094b0668 100644 --- a/clang/lib/Sema/SemaTemplate.cpp +++ b/clang/lib/Sema/SemaTemplate.cpp @@ -1215,11 +1215,11 @@ bool Sema::CheckTemplateArgument(NonTypeTemplateParmDecl *Param, return false; } - if (const PointerType *ParamPtrType = ParamType->getAsPointerType()) { + if (ParamType->isPointerType()) { // -- 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(ParamPtrType->getPointeeType()->isObjectType() && + assert(ParamType->getAsPointerType()->getPointeeType()->isObjectType() && "Only object pointers allowed here"); if (ArgType->isArrayType()) { @@ -1539,9 +1539,8 @@ Sema::ActOnClassTemplateSpecialization(Scope *S, unsigned TagSpec, TagKind TK, assert(TemplateParameterLists.size() == 1 && "Clang doesn't handle with ill-formed specializations yet."); - TemplateParameterList *TemplateParams = - static_cast<TemplateParameterList*>(*TemplateParameterLists.get()); - assert(TemplateParams->size() == 0 && + assert(static_cast<TemplateParameterList*>(*TemplateParameterLists.get()) + ->size() == 0 && "Clang doesn't handle class template partial specializations yet"); // Find the class template we're specializing |