class Declarator

Declaration

class Declarator : public Tree { /* full declaration omitted */ };

Description

Covers a name, an initializer and a part of the type outside declaration specifiers. Examples are: `*a` in `int *a` `a[10]` in `int a[10]` `*a = nullptr` in `int *a = nullptr` Declarators can be unnamed too: `**` in `new int**` `* = nullptr` in `void foo(int* = nullptr)` Most declarators you encounter are instances of SimpleDeclarator. They may contain an inner declarator inside parentheses, we represent it as ParenDeclarator. E.g. `(*a)` in `int (*a) = 10`

Declared at: clang/include/clang/Tooling/Syntax/Nodes.h:486

Inherits from: Tree

Member Variables

Method Overview

  • public Declarator(clang::syntax::NodeKind K)
  • public static bool classof(const clang::syntax::Node * N)

Inherited from Tree:

Inherited from Node:

Methods

Declarator(clang::syntax::NodeKind K)

Declared at: clang/include/clang/Tooling/Syntax/Nodes.h:488

Parameters

clang::syntax::NodeKind K

static bool classof(const clang::syntax::Node* N)

Declared at: clang/include/clang/Tooling/Syntax/Nodes.h:489

Parameters

const clang::syntax::Node* N