From 2521813d45e0af47b27673a095329ee33932d49c Mon Sep 17 00:00:00 2001
From: Larisse Voufo <lvoufo@google.com>
Date: Tue, 6 Aug 2013 07:33:00 +0000
Subject: [PATCH] A bit of clean up based on peer's feedback...

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@187784 91177308-0d34-0410-b5e6-96231b3b80d8
---
 lib/Parse/ParseDecl.cpp            |  3 +--
 lib/Sema/SemaTemplate.cpp          | 10 +++++-----
 lib/Sema/SemaTemplateDeduction.cpp |  2 +-
 3 files changed, 7 insertions(+), 8 deletions(-)

diff --git a/lib/Parse/ParseDecl.cpp b/lib/Parse/ParseDecl.cpp
index 3f15b5b089a..eda52a4e83a 100644
--- a/lib/Parse/ParseDecl.cpp
+++ b/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/lib/Sema/SemaTemplate.cpp b/lib/Sema/SemaTemplate.cpp
index 098187244a6..be43495982a 100644
--- a/lib/Sema/SemaTemplate.cpp
+++ b/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/lib/Sema/SemaTemplateDeduction.cpp b/lib/Sema/SemaTemplateDeduction.cpp
index e87354663b0..e5a1d7a3d4b 100644
--- a/lib/Sema/SemaTemplateDeduction.cpp
+++ b/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,
-- 
GitLab