clang API Documentation

Public Types | Public Member Functions | Public Attributes
clang::comments::DeclInfo Struct Reference

Information about the declaration, useful to clients of FullComment. More...

#include <Comment.h>

Collaboration diagram for clang::comments::DeclInfo:
Collaboration graph
[legend]

List of all members.

Public Types

enum  DeclKind {
  OtherKind, FunctionKind, ClassKind, VariableKind,
  NamespaceKind, TypedefKind, EnumKind
}
enum  TemplateDeclKind { NotTemplate, Template, TemplateSpecialization, TemplatePartialSpecialization }
 What kind of template specialization CommentDecl is. More...

Public Member Functions

void fill ()
DeclKind getKind () const LLVM_READONLY
TemplateDeclKind getTemplateKind () const LLVM_READONLY

Public Attributes

const DeclCommentDecl
const DeclCurrentDecl
ArrayRef< const ParmVarDecl * > ParamVars
QualType ReturnType
const TemplateParameterListTemplateParameters
unsigned IsFilled: 1
 If false, only CommentDecl is valid.
unsigned Kind: 3
 Simplified kind of CommentDecl, see DeclKind enum.
unsigned TemplateKind: 2
 Is CommentDecl a template declaration.
unsigned IsObjCMethod: 1
 Is CommentDecl an ObjCMethodDecl.
unsigned IsInstanceMethod: 1
unsigned IsClassMethod: 1

Detailed Description

Information about the declaration, useful to clients of FullComment.

Definition at line 986 of file Comment.h.


Member Enumeration Documentation

A simplified description of CommentDecl kind that should be good enough for documentation rendering purposes.

Enumerator:
OtherKind 

Everything else not explicitly mentioned below.

FunctionKind 

Something that we consider a "function":

  • function,
  • function template,
  • function template specialization,
  • member function,
  • member function template,
  • member function template specialization,
  • ObjC method,
  • a typedef for a function pointer, member function pointer, ObjC block.
ClassKind 

Something that we consider a "class":

  • class/struct,
  • class template,
  • class template (partial) specialization.
VariableKind 

Something that we consider a "variable":

  • namespace scope variables;
  • static and non-static class data members;
  • enumerators.
NamespaceKind 

A C++ namespace.

TypedefKind 

A C++ typedef-name (a 'typedef' decl specifier or alias-declaration), see TypedefNameDecl.

EnumKind 

An enumeration or scoped enumeration.

Definition at line 1016 of file Comment.h.

What kind of template specialization CommentDecl is.

Enumerator:
NotTemplate 
Template 
TemplateSpecialization 
TemplatePartialSpecialization 

Definition at line 1056 of file Comment.h.


Member Function Documentation

Definition at line 1091 of file Comment.h.

References TemplateKind.

Referenced by clang::comments::Sema::isTemplateOrSpecialization().


Member Data Documentation

Declaration the comment is actually attached to (in the source). Should not be NULL.

Definition at line 989 of file Comment.h.

Referenced by clang::comments::Sema::checkDeprecatedCommand(), clang::comments::Sema::checkReturnsCommand(), clang::ASTContext::cloneFullComment(), fill(), clang::comments::FullComment::getDecl(), and clang::comments::Sema::setDecl().

CurrentDecl is the declaration with which the FullComment is associated.

It can be different from CommentDecl. It happens when we we decide that the comment originally attached to CommentDecl is fine for CurrentDecl too (for example, for a redeclaration or an overrider of CommentDecl).

The information in the DeclInfo corresponds to CurrentDecl.

Definition at line 999 of file Comment.h.

Referenced by fill(), clang::comments::Sema::isAnyFunctionDecl(), clang::comments::Sema::isClassOrStructDecl(), clang::comments::Sema::isClassTemplateDecl(), clang::comments::Sema::isFunctionOrMethodVariadic(), clang::comments::Sema::isFunctionPointerVarDecl(), clang::comments::Sema::isFunctionTemplateDecl(), clang::comments::Sema::isObjCInterfaceDecl(), clang::comments::Sema::isObjCMethodDecl(), clang::comments::Sema::isObjCPropertyDecl(), clang::comments::Sema::isObjCProtocolDecl(), and clang::comments::Sema::isUnionDecl().

Is CommentDecl a static member function of C++ class or class method of ObjC class. Can be true only if IsFunctionDecl is true.

Definition at line 1083 of file Comment.h.

Referenced by fill().

Is CommentDecl a non-static member function of C++ class or instance method of ObjC class. Can be true only if IsFunctionDecl is true.

Definition at line 1078 of file Comment.h.

Referenced by fill().

Is CommentDecl an ObjCMethodDecl.

Definition at line 1073 of file Comment.h.

Referenced by clang::comments::Sema::checkReturnsCommand(), and fill().

Simplified kind of CommentDecl, see DeclKind enum.

Definition at line 1067 of file Comment.h.

Referenced by getKind().

Parameters that can be referenced by \param if CommentDecl is something that we consider a "function".

Definition at line 1003 of file Comment.h.

Referenced by fill(), clang::comments::ParamCommandComment::getParamName(), and clang::comments::Sema::getParamVars().

Function return type if CommentDecl is something that we consider a "function".

Definition at line 1007 of file Comment.h.

Referenced by clang::comments::Sema::checkReturnsCommand(), and fill().

Is CommentDecl a template declaration.

Definition at line 1070 of file Comment.h.

Referenced by fill(), and getTemplateKind().

Template parameters that can be referenced by \tparam if CommentDecl is a template (IsTemplateDecl or IsTemplatePartialSpecialization is true).

Definition at line 1012 of file Comment.h.

Referenced by clang::comments::Sema::actOnTParamCommandParamNameArg(), clang::ASTContext::cloneFullComment(), fill(), and clang::comments::TParamCommandComment::getParamName().


The documentation for this struct was generated from the following files: