[cfe-commits] r65169 - /cfe/trunk/lib/Sema/SemaTemplate.cpp
Chris Lattner
sabre at nondot.org
Fri Feb 20 13:37:53 PST 2009
Author: lattner
Date: Fri Feb 20 15:37:53 2009
New Revision: 65169
URL: http://llvm.org/viewvc/llvm-project?rev=65169&view=rev
Log:
silence some warnings in no asserts mode.
Modified:
cfe/trunk/lib/Sema/SemaTemplate.cpp
Modified: cfe/trunk/lib/Sema/SemaTemplate.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaTemplate.cpp?rev=65169&r1=65168&r2=65169&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaTemplate.cpp (original)
+++ cfe/trunk/lib/Sema/SemaTemplate.cpp Fri Feb 20 15:37:53 2009
@@ -1215,11 +1215,11 @@
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 @@
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
More information about the cfe-commits
mailing list