diff options
Diffstat (limited to 'clang/include')
-rw-r--r-- | clang/include/clang/AST/DeclTemplate.h | 10 | ||||
-rw-r--r-- | clang/include/clang/Basic/DiagnosticSemaKinds.def | 2 |
2 files changed, 12 insertions, 0 deletions
diff --git a/clang/include/clang/AST/DeclTemplate.h b/clang/include/clang/AST/DeclTemplate.h index ccbe1288f84..334a03a439d 100644 --- a/clang/include/clang/AST/DeclTemplate.h +++ b/clang/include/clang/AST/DeclTemplate.h @@ -66,9 +66,19 @@ public: unsigned size() const { return NumParams; } + /// \btief Returns the minimum number of arguments needed to form a + /// template specialization. This may be fewer than the number of + /// template parameters, if some of the parameters have default + /// arguments. + unsigned getMinRequiredArguments() const; + SourceLocation getTemplateLoc() const { return TemplateLoc; } SourceLocation getLAngleLoc() const { return LAngleLoc; } SourceLocation getRAngleLoc() const { return RAngleLoc; } + + SourceRange getSourceRange() const { + return SourceRange(TemplateLoc, RAngleLoc); + } }; //===----------------------------------------------------------------------===// diff --git a/clang/include/clang/Basic/DiagnosticSemaKinds.def b/clang/include/clang/Basic/DiagnosticSemaKinds.def index 4fed9443d02..25fe8254bbc 100644 --- a/clang/include/clang/Basic/DiagnosticSemaKinds.def +++ b/clang/include/clang/Basic/DiagnosticSemaKinds.def @@ -505,6 +505,8 @@ DIAG(err_template_param_default_arg_missing, ERROR, // C++ Template Argument Lists DIAG(err_template_arg_list_different_arity, ERROR, "%select{too few|too many}0 template arguments for %select{class template|function template|template template parameter|template}1 %2") +DIAG(note_template_decl_here, NOTE, + "template is declared here") DIAG(err_template_arg_must_be_type, ERROR, "template argument for template type parameter must be a type") DIAG(err_template_arg_must_be_expr, ERROR, |