Simplify checking of explicit template specialization/explicit
instantiation redeclaration semantics for function template
specializations and member functions of class template
specializations. Also, record the point of instantiation for
explicit-instantiated functions and static data members.

llvm-svn: 84188
diff --git a/clang/include/clang/AST/Decl.h b/clang/include/clang/AST/Decl.h
index f21541c..2a077fb 100644
--- a/clang/include/clang/AST/Decl.h
+++ b/clang/include/clang/AST/Decl.h
@@ -604,7 +604,8 @@
   
   /// \brief For a static data member that was instantiated from a static
   /// data member of a class template, set the template specialiation kind.
-  void setTemplateSpecializationKind(TemplateSpecializationKind TSK);
+  void setTemplateSpecializationKind(TemplateSpecializationKind TSK,
+                        SourceLocation PointOfInstantiation = SourceLocation());
   
   /// isFileVarDecl - Returns true for file scoped variable declaration.
   bool isFileVarDecl() const {
@@ -1170,7 +1171,16 @@
 
   /// \brief Determine what kind of template instantiation this function
   /// represents.
-  void setTemplateSpecializationKind(TemplateSpecializationKind TSK);
+  void setTemplateSpecializationKind(TemplateSpecializationKind TSK,
+                        SourceLocation PointOfInstantiation = SourceLocation());
+
+  /// \brief Retrieve the (first) point of instantiation of a function template
+  /// specialization or a member of a class template specialization.
+  ///
+  /// \returns the first point of instantiation, if this function was 
+  /// instantiated from a template; otherwie, returns an invalid source 
+  /// location.
+  SourceLocation getPointOfInstantiation() const;
 
   /// \brief Determine whether this is or was instantiated from an out-of-line 
   /// definition of a member function.