diff options
author | Dmitri Gribenko <gribozavr@gmail.com> | 2012-08-06 21:31:15 +0000 |
---|---|---|
committer | Dmitri Gribenko <gribozavr@gmail.com> | 2012-08-06 21:31:15 +0000 |
commit | 04bf29eb1b197e0a103139ab5d63b0b97432f004 (patch) | |
tree | a497e391d843f89efa7861d3c51f199c249d05b9 /lib/AST/CommentSema.cpp | |
parent | a801acd9773cacdbe16690269ecb47bd127440c5 (diff) |
Comment AST: DeclInfo: collapse a bunch of boolean flags into an enum.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161352 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/AST/CommentSema.cpp')
-rw-r--r-- | lib/AST/CommentSema.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/AST/CommentSema.cpp b/lib/AST/CommentSema.cpp index 42dd320b5c..978c748b74 100644 --- a/lib/AST/CommentSema.cpp +++ b/lib/AST/CommentSema.cpp @@ -205,7 +205,7 @@ TParamCommandComment *Sema::actOnTParamCommandStart(SourceLocation LocBegin, TParamCommandComment *Command = new (Allocator) TParamCommandComment(LocBegin, LocEnd, Name); - if (!isTemplateDecl()) + if (!isTemplateOrSpecialization()) Diag(Command->getLocation(), diag::warn_doc_tparam_not_attached_to_a_template_decl) << Command->getCommandNameRange(); @@ -226,7 +226,7 @@ void Sema::actOnTParamCommandParamNameArg(TParamCommandComment *Command, Arg); Command->setArgs(llvm::makeArrayRef(A, 1)); - if (!isTemplateDecl()) { + if (!isTemplateOrSpecialization()) { // We already warned that this \\tparam is not attached to a template decl. return; } @@ -536,12 +536,12 @@ bool Sema::isFunctionDecl() { return ThisDeclInfo->getKind() == DeclInfo::FunctionKind; } -bool Sema::isTemplateDecl() { +bool Sema::isTemplateOrSpecialization() { if (!ThisDeclInfo) return false; if (!ThisDeclInfo->IsFilled) inspectThisDecl(); - return ThisDeclInfo->IsTemplateDecl; + return ThisDeclInfo->getTemplateKind() != DeclInfo::NotTemplate; } ArrayRef<const ParmVarDecl *> Sema::getParamVars() { |