]> granicus.if.org Git - clang/commitdiff
A bit of clean up based on peer's feedback...
authorLarisse Voufo <lvoufo@google.com>
Tue, 6 Aug 2013 07:33:00 +0000 (07:33 +0000)
committerLarisse Voufo <lvoufo@google.com>
Tue, 6 Aug 2013 07:33:00 +0000 (07:33 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@187784 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Parse/ParseDecl.cpp
lib/Sema/SemaTemplate.cpp
lib/Sema/SemaTemplateDeduction.cpp

index 3f15b5b089a44b76156d76766bf55c8b7c0b2637..eda52a4e83a84a8dbabf5facc6f6f3869dd69803 100644 (file)
@@ -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();
index 098187244a6ed016b4da1bdc90be3e1505ecb8a6..be43495982a10e9f21761f69a311665979d7cbc4 100644 (file)
@@ -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)
index e87354663b030e1fb6f1e7f617cff3b9fc2b0d13..e5a1d7a3d4b0910da41cdf5e47f383612e2e1dd2 100644 (file)
@@ -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,