summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema/SemaTemplate.cpp
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2009-10-06 21:27:51 +0000
committerDouglas Gregor <dgregor@apple.com>2009-10-06 21:27:51 +0000
commit27c26e9a09f99a6161ad9fe9d5fa5cd331214a75 (patch)
tree354a5952aaada4ba6288481a3e5ad24eb76e8c19 /clang/lib/Sema/SemaTemplate.cpp
parent3251776d1d46e426c7cbddf60c41e09a8ad2f242 (diff)
downloadbcm5719-llvm-27c26e9a09f99a6161ad9fe9d5fa5cd331214a75.tar.gz
bcm5719-llvm-27c26e9a09f99a6161ad9fe9d5fa5cd331214a75.zip
Test explicit specialization for all of the various cases where
explicit specializations can occur. Also, fix a minor recovery bug where we should allow declarations coming from the parser to be NULL. llvm-svn: 83416
Diffstat (limited to 'clang/lib/Sema/SemaTemplate.cpp')
-rw-r--r--clang/lib/Sema/SemaTemplate.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/Sema/SemaTemplate.cpp b/clang/lib/Sema/SemaTemplate.cpp
index d12ec9318af..02c3e43b333 100644
--- a/clang/lib/Sema/SemaTemplate.cpp
+++ b/clang/lib/Sema/SemaTemplate.cpp
@@ -257,7 +257,7 @@ bool Sema::DiagnoseTemplateParameterShadow(SourceLocation Loc, Decl *PrevDecl) {
/// the parameter D to reference the templated declaration and return a pointer
/// to the template declaration. Otherwise, do nothing to D and return null.
TemplateDecl *Sema::AdjustDeclIfTemplate(DeclPtrTy &D) {
- if (TemplateDecl *Temp = dyn_cast<TemplateDecl>(D.getAs<Decl>())) {
+ if (TemplateDecl *Temp = dyn_cast_or_null<TemplateDecl>(D.getAs<Decl>())) {
D = DeclPtrTy::make(Temp->getTemplatedDecl());
return Temp;
}
OpenPOWER on IntegriCloud