summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLarisse Voufo <lvoufo@google.com>2013-08-06 07:33:00 +0000
committerLarisse Voufo <lvoufo@google.com>2013-08-06 07:33:00 +0000
commit833b05a273da65f78bc3915aecfaac1fed4a1cc5 (patch)
tree4f827b69cb84f8441fed0f1b7a6bfe86d73819e2
parentcf969eadaf5786cea0c008f3c786360d34c8bc34 (diff)
downloadbcm5719-llvm-833b05a273da65f78bc3915aecfaac1fed4a1cc5.tar.gz
bcm5719-llvm-833b05a273da65f78bc3915aecfaac1fed4a1cc5.zip
A bit of clean up based on peer's feedback...
llvm-svn: 187784
-rw-r--r--clang/lib/Parse/ParseDecl.cpp3
-rw-r--r--clang/lib/Sema/SemaTemplate.cpp10
-rw-r--r--clang/lib/Sema/SemaTemplateDeduction.cpp2
3 files changed, 7 insertions, 8 deletions
diff --git a/clang/lib/Parse/ParseDecl.cpp b/clang/lib/Parse/ParseDecl.cpp
index 3f15b5b089a..eda52a4e83a 100644
--- a/clang/lib/Parse/ParseDecl.cpp
+++ b/clang/lib/Parse/ParseDecl.cpp
@@ -1806,8 +1806,7 @@ Decl *Parser::ParseDeclarationAfterDeclaratorAndAttributes(Declarator &D,
SkipUntil(tok::semi, true, true);
return 0;
}
- if (VarTemplateDecl *VT =
- ThisDecl ? dyn_cast<VarTemplateDecl>(ThisDecl) : 0)
+ if (VarTemplateDecl *VT = dyn_cast_or_null<VarTemplateDecl>(ThisDecl))
// Re-direct this decl to refer to the templated decl so that we can
// initialize it.
ThisDecl = VT->getTemplatedDecl();
diff --git a/clang/lib/Sema/SemaTemplate.cpp b/clang/lib/Sema/SemaTemplate.cpp
index 098187244a6..be43495982a 100644
--- a/clang/lib/Sema/SemaTemplate.cpp
+++ b/clang/lib/Sema/SemaTemplate.cpp
@@ -2281,11 +2281,11 @@ static bool CheckTemplateSpecializationScope(Sema &S, NamedDecl *Specialized,
static TemplateSpecializationKind getTemplateSpecializationKind(Decl *D);
/*
-/// \brief Check the new variable specialization against the parsed input.
-///
-/// FIXME: Model this against function specializations where
-/// a new function declaration is checked against the specialization
-/// as candidate for redefinition... (?)
+// Check the new variable specialization against the parsed input.
+//
+// FIXME: Model this against function specializations where
+// a new function declaration is checked against the specialization
+// as candidate for redefinition... (?)
static bool CheckVariableTemplateSpecializationType() {
if (ExpectedType is undeduced && ParsedType is not undeduced)
diff --git a/clang/lib/Sema/SemaTemplateDeduction.cpp b/clang/lib/Sema/SemaTemplateDeduction.cpp
index e87354663b0..e5a1d7a3d4b 100644
--- a/clang/lib/Sema/SemaTemplateDeduction.cpp
+++ b/clang/lib/Sema/SemaTemplateDeduction.cpp
@@ -2246,7 +2246,7 @@ FinishTemplateArgumentDeduction(Sema &S,
}
/// \brief Perform template argument deduction to determine whether
-/// the given template arguments match the given variable template
+/// the given template arguments match the given class template
/// partial specialization per C++ [temp.class.spec.match].
Sema::TemplateDeductionResult
Sema::DeduceTemplateArguments(ClassTemplatePartialSpecializationDecl *Partial,
OpenPOWER on IntegriCloud