clang  5.0.0
Namespaces | Macros | Functions
TokenAnnotator.cpp File Reference

This file implements a token annotator, i.e. More...

#include "TokenAnnotator.h"
#include "clang/Basic/SourceManager.h"
#include "llvm/ADT/SmallPtrSet.h"
#include "llvm/Support/Debug.h"
Include dependency graph for TokenAnnotator.cpp:

Go to the source code of this file.

Namespaces

 clang
 /file This file defines classes for searching and anlyzing source code clones.
 
 clang::format
 

Macros

#define DEBUG_TYPE   "format-token-annotator"
 

Functions

static unsigned clang::format::maxNestingDepth (const AnnotatedLine &Line)
 
static bool clang::format::isFunctionDeclarationName (const FormatToken &Current, const AnnotatedLine &Line)
 
static bool clang::format::isAllmanBrace (const FormatToken &Tok)
 

Detailed Description

This file implements a token annotator, i.e.

creates AnnotatedTokens out of FormatTokens with required extra information.

Definition in file TokenAnnotator.cpp.

Macro Definition Documentation

#define DEBUG_TYPE   "format-token-annotator"

Definition at line 21 of file TokenAnnotator.cpp.

Variable Documentation

bool AutoFound

Definition at line 1476 of file TokenAnnotator.cpp.

unsigned BindingStrength

Definition at line 983 of file TokenAnnotator.cpp.

bool CanBeExpression = true

Definition at line 991 of file TokenAnnotator.cpp.

bool CaretFound = false

Definition at line 995 of file TokenAnnotator.cpp.

bool ColonIsDictLiteral = false

Definition at line 987 of file TokenAnnotator.cpp.

bool ColonIsForRangeExpr = false

Definition at line 986 of file TokenAnnotator.cpp.

bool ColonIsObjCMethodExpr = false

Definition at line 988 of file TokenAnnotator.cpp.

tok::TokenKind ContextKind
SmallVector<Context, 8> Contexts
FormatToken* Current
FormatToken* CurrentToken

Definition at line 1475 of file TokenAnnotator.cpp.

FormatToken* FirstObjCSelectorName = nullptr

Definition at line 989 of file TokenAnnotator.cpp.

FormatToken* FirstStartOfName = nullptr

Definition at line 990 of file TokenAnnotator.cpp.

bool InCtorInitializer = false

Definition at line 993 of file TokenAnnotator.cpp.

bool InInheritanceList = false

Definition at line 994 of file TokenAnnotator.cpp.

bool InTemplateArgument = false

Definition at line 992 of file TokenAnnotator.cpp.

bool IsExpression

Definition at line 984 of file TokenAnnotator.cpp.

bool IsForEachMacro = false

Definition at line 996 of file TokenAnnotator.cpp.

const AdditionalKeywords& Keywords

Definition at line 1477 of file TokenAnnotator.cpp.

AnnotatedLine& Line
unsigned LongestObjCSelectorName = 0

Definition at line 985 of file TokenAnnotator.cpp.

llvm::SmallPtrSet<FormatToken *, 16> NonTemplateLess

Definition at line 1483 of file TokenAnnotator.cpp.

AnnotatingParser& P

Definition at line 1002 of file TokenAnnotator.cpp.

const FormatStyle& Style

Definition at line 1473 of file TokenAnnotator.cpp.