[PATCH] Top level variable template declarations -- implicit and explicit instantiation.
Dmitri Gribenko
gribozavr at gmail.com
Wed Jun 19 20:10:52 PDT 2013
================
Comment at: include/clang/AST/Decl.h:716
@@ +715,3 @@
+
+ /// Definition - The declaration which defines this variable.
+ VarDecl *Definition;
----------------
"Definition -" -> \brief
================
Comment at: include/clang/AST/Decl.h:1185-1189
@@ -1153,4 +1184,7 @@
+ /// \brief Determine whether this particular variable is a specialization or
+ /// instantiation of a variable template or static data member of a class template,
+ /// and how it was instantiated or specialized.
/// \brief If this variable is a static data member, determine what kind of
/// template specialization or instantiation this is.
TemplateSpecializationKind getTemplateSpecializationKind() const;
----------------
Should the previous comment be deleted?
================
Comment at: include/clang/Sema/Sema.h:1379-1381
@@ -1371,1 +1378,5 @@
+ || Kind == NC_VarTemplate);
+ return Kind == NC_TypeTemplate? TNK_Type_template :
+ (NC_FunctionTemplate?
+ TNK_Function_template : TNK_Var_template);
}
----------------
"(NC_FunctionTemplate?" -> "(Kind == NC_FunctionTemplate?"
Also, consider using switch() and llvm_unreachable.
http://llvm-reviews.chandlerc.com/D1011
More information about the cfe-commits
mailing list