r187784 - A bit of clean up based on peer's feedback...

Larisse Voufo lvoufo at google.com
Tue Aug 6 00:33:00 PDT 2013


Author: lvoufo
Date: Tue Aug  6 02:33:00 2013
New Revision: 187784

URL: http://llvm.org/viewvc/llvm-project?rev=187784&view=rev
Log:
A bit of clean up based on peer's feedback...

Modified:
    cfe/trunk/lib/Parse/ParseDecl.cpp
    cfe/trunk/lib/Sema/SemaTemplate.cpp
    cfe/trunk/lib/Sema/SemaTemplateDeduction.cpp

Modified: cfe/trunk/lib/Parse/ParseDecl.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Parse/ParseDecl.cpp?rev=187784&r1=187783&r2=187784&view=diff
==============================================================================
--- cfe/trunk/lib/Parse/ParseDecl.cpp (original)
+++ cfe/trunk/lib/Parse/ParseDecl.cpp Tue Aug  6 02:33:00 2013
@@ -1806,8 +1806,7 @@ Decl *Parser::ParseDeclarationAfterDecla
       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();

Modified: cfe/trunk/lib/Sema/SemaTemplate.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaTemplate.cpp?rev=187784&r1=187783&r2=187784&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaTemplate.cpp (original)
+++ cfe/trunk/lib/Sema/SemaTemplate.cpp Tue Aug  6 02:33:00 2013
@@ -2281,11 +2281,11 @@ static bool CheckTemplateSpecializationS
 
 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)

Modified: cfe/trunk/lib/Sema/SemaTemplateDeduction.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaTemplateDeduction.cpp?rev=187784&r1=187783&r2=187784&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaTemplateDeduction.cpp (original)
+++ cfe/trunk/lib/Sema/SemaTemplateDeduction.cpp Tue Aug  6 02:33:00 2013
@@ -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,





More information about the cfe-commits mailing list