clang API Documentation

Namespaces | Defines | Functions
TokenAnnotator.cpp File Reference

This file implements a token annotator, i.e. creates AnnotatedTokens out of FormatTokens with required extra information. More...

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

Go to the source code of this file.

Namespaces

namespace  clang
namespace  clang::format

Defines

#define DEBUG_TYPE   "format-token-annotator"

Functions

static bool clang::format::isFunctionDeclarationName (const FormatToken &Current)
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.


Define Documentation

#define DEBUG_TYPE   "format-token-annotator"

Definition at line 20 of file TokenAnnotator.cpp.


Variable Documentation

Definition at line 1063 of file TokenAnnotator.cpp.

Definition at line 697 of file TokenAnnotator.cpp.

Definition at line 705 of file TokenAnnotator.cpp.

Definition at line 708 of file TokenAnnotator.cpp.

Definition at line 700 of file TokenAnnotator.cpp.

Definition at line 699 of file TokenAnnotator.cpp.

Definition at line 701 of file TokenAnnotator.cpp.

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

Definition at line 1061 of file TokenAnnotator.cpp.

FormatToken* FirstObjCSelectorName

Definition at line 702 of file TokenAnnotator.cpp.

FormatToken* FirstStartOfName

Definition at line 703 of file TokenAnnotator.cpp.

Definition at line 707 of file TokenAnnotator.cpp.

Definition at line 706 of file TokenAnnotator.cpp.

Definition at line 704 of file TokenAnnotator.cpp.

Definition at line 709 of file TokenAnnotator.cpp.

const AdditionalKeywords& Keywords

Definition at line 1064 of file TokenAnnotator.cpp.

Definition at line 1062 of file TokenAnnotator.cpp.

AnnotatedLine& Line

Definition at line 698 of file TokenAnnotator.cpp.

AnnotatingParser& P

Definition at line 715 of file TokenAnnotator.cpp.

Referenced by clang::Sema::ActOnExplicitInstantiation(), clang::Sema::ActOnOpenMPExecutableDirective(), clang::Sema::ActOnProperty(), clang::Sema::ActOnPropertyImplDecl(), clang::Sema::ActOnReenterFunctionContext(), clang::driver::toolchains::DarwinClang::AddCCKextLibArgs(), clang::driver::toolchains::Linux::AddClangSystemIncludeArgs(), clang::driver::toolchains::MSVCToolChain::AddClangSystemIncludeArgs(), clang::driver::toolchains::DarwinClang::AddCXXStdlibLibArgs(), AddFunctionParameterChunks(), AddImplicitIncludePTH(), clang::driver::toolchains::DarwinClang::AddLinkARCArgs(), clang::driver::toolchains::MachO::AddLinkRuntimeLib(), AddObjCProperties(), clang::ASTWriter::AddTemplateArgument(), AddTemplateParameterChunks(), clang::ASTWriter::AddTemplateParameterList(), AdoptTemplateParameterList(), alreadyExecutedAtLeastOneLoopIteration(), llvm::GraphTraits< clang::CallGraphNode * >::CGNDeref(), clang::ento::ConstraintManager::checkNull(), clang::Sema::CheckParmsForFunctionDef(), CheckPropertyAgainstProtocol(), checkRecordTypeForCapability(), clang::Sema::CheckVarTemplateId(), clang::Sema::CodeCompleteObjCMethodDecl(), clang::ASTContext::CollectInheritedProtocols(), CollectOverriddenMethodsRecurse(), clang::ast_matchers::dynamic::Parser::completeExpression(), clang::threadSafety::til::computeNodeID(), clang::threadSafety::til::computeNodeSize(), clang::TemplateArgument::containsUnexpandedParameterPack(), ConvertDeducedTemplateArgument(), clang::CodeCompletionResult::CreateCodeCompletionString(), clang::ento::PathDiagnosticLocation::createEndOfPath(), CreateFrontendBaseAction(), clang::threadSafety::LocalVariableMap::createReferenceContext(), CreateUbiViz(), clang::Sema::DeduceTemplateArguments(), DiagnoseUnexpandedParameterPacks(), clang::Sema::DiagnoseUnimplementedProperties(), clang::driver::Driver::Driver(), clang::Stmt::dump(), clang::Decl::dump(), clang::Stmt::dumpColor(), clang::Decl::dumpColor(), clang::CodeGen::CodeGenFunction::EmitAArch64BuiltinExpr(), clang::ento::ExprEngine::evalEagerlyAssumeBinOpBifurcation(), Evaluate(), clang::ClassTemplateDecl::findPartialSpecialization(), clang::ClassTemplateDecl::findPartialSpecInstantiatedFromMember(), clang::VarTemplateDecl::findPartialSpecInstantiatedFromMember(), clang::ObjCContainerDecl::FindPropertyDeclaration(), clang::ObjCInterfaceDecl::FindPropertyVisibleInPrimaryClass(), GenerateAlternateExtensivePathDiagnostic(), GenerateExtensivePathDiagnostic(), GenerateMinimalPathDiagnostic(), llvm::PointerLikeTypeTraits< ::clang::Type * >::getAsVoidPointer(), llvm::PointerLikeTypeTraits< ::clang::ExtQuals * >::getAsVoidPointer(), llvm::PointerLikeTypeTraits< clang::IdentifierInfo * >::getAsVoidPointer(), llvm::PointerLikeTypeTraits< const clang::IdentifierInfo * >::getAsVoidPointer(), getCN(), clang::ento::BugReporterVisitor::getDefaultEndPath(), clang::driver::Driver::GetFilePath(), clang::DeclarationName::getFromOpaqueInteger(), clang::DeclarationName::getFromOpaquePtr(), clang::IdentifierResolver::iterator::getFromOpaqueValue(), llvm::PointerLikeTypeTraits< ::clang::Type * >::getFromVoidPointer(), llvm::PointerLikeTypeTraits< ::clang::ExtQuals * >::getFromVoidPointer(), llvm::PointerLikeTypeTraits< clang::IdentifierInfo * >::getFromVoidPointer(), llvm::PointerLikeTypeTraits< const clang::IdentifierInfo * >::getFromVoidPointer(), getLVForTemplateParameterList(), clang::ento::StackHintGeneratorForSymbol::getMessage(), clang::TemplateParameterList::getMinRequiredArguments(), clang::ClassTemplateDecl::getPartialSpecializations(), clang::VarTemplateDecl::getPartialSpecializations(), clang::ento::BasicValueFactory::getPersistentSValPair(), clang::ento::BasicValueFactory::getPersistentSValWithData(), clang::driver::Driver::GetProgramPath(), clang::CompilerInvocation::GetResourcesPath(), getRoot(), getSelectorTableImpl(), clang::ObjCPropertyRefExpr::getSetterArgType(), clang::ento::PathDiagnosticLocation::getStmt(), clang::ASTContext::getSubstTemplateTypeParmPackType(), clang::ento::BasicValueFactory::getValue(), clang::threadSafety::getValueDeclFromSExpr(), clang::ObjCContainerDecl::HasUserDeclaredSetterMethod(), clang::Expr::IgnoreCasts(), clang::Expr::IgnoreParenCasts(), clang::Expr::IgnoreParenImpCasts(), clang::Expr::IgnoreParenLValueCasts(), clang::Expr::IgnoreParenNoopCasts(), clang::Expr::IgnoreParens(), clang::Sema::ImplMethodsVsClassMethods(), clang::ASTNodeImporter::ImportTemplateParameterList(), clang::ExternalASTSource::incrementGeneration(), clang::threadSafety::ThreadSafetyAnalyzer::inCurrentScope(), clang::Sema::InstantiateClass(), clang::Sema::InstantiateClassTemplateSpecialization(), clang::threadSafety::LocalVariableMap::intersectBackEdge(), clang::threadSafety::LocalVariableMap::intersectContexts(), clang::ParentMap::isConsumedExpr(), clang::TemplateArgument::isDependent(), isInitializationOfVar(), clang::TemplateArgument::isInstantiationDependent(), clang::CXXMethodDecl::isLambdaStaticInvoker(), clang::Scope::isOpenMPLoopScope(), clang::threadSafety::LocalVariableMap::lookupExpr(), clang::CXXRecordDecl::lookupInBases(), clang::ObjCInterfaceDecl::lookupNestedProtocol(), MarkUsedTemplateParameters(), MaybeAddOverrideCalls(), clang::ObjCInterfaceDecl::mergeClassExtensionProtocolList(), clang::Sema::MergeVarDeclExceptionSpecs(), NeedsInstantiationAsFunctionType(), clang::ast_matchers::dynamic::Parser::ScopedContextEntry::nextArg(), clang::RawComment::parse(), clang::ParseAST(), clang::TemplateArgument::print(), clang::Stmt::printPretty(), clang::NamedDecl::printQualifiedName(), clang::SubstTemplateTypeParmPackType::Profile(), removePathTraversal(), clang::OpaquePtr< TemplateName >::set(), clang::FunctionDecl::setHasInheritedPrototype(), clang::Sema::SetLateTemplateParser(), clang::CapturedDecl::setParam(), clang::TemplateParmPosition::setPosition(), clang::Preprocessor::setPredefines(), clang::ObjCProtocolExpr::setProtocol(), clang::FunctionDecl::setPure(), clang::HeaderSearch::SetSystemHeaderPrefixes(), clang::StmtIteratorBase::setVAPtr(), clang::Sema::startLambdaDefinition(), clang::Sema::SubstituteExplicitTemplateArguments(), clang::TemplateParameterList::TemplateParameterList(), clang::ento::bugreporter::trackNullOrUndefValue(), clang::ASTDeclWriter::VisitBlockDecl(), clang::TemplateDeclInstantiator::VisitCXXMethodDecl(), clang::ASTDeclWriter::VisitFunctionDecl(), clang::ASTNodeImporter::VisitFunctionDecl(), clang::TemplateDeclInstantiator::VisitFunctionDecl(), clang::ASTDeclWriter::VisitIndirectFieldDecl(), clang::ento::ExprEngine::VisitLogicalExpr(), clang::ento::FindLastStoreBRVisitor::VisitNode(), clang::ento::TrackConstraintBRVisitor::VisitNode(), clang::ento::NilReceiverBRVisitor::VisitNode(), clang::ASTDeclWriter::VisitObjCInterfaceDecl(), clang::ASTDeclWriter::VisitObjCMethodDecl(), clang::ASTNodeImporter::VisitObjCMethodDecl(), clang::ASTNodeImporter::VisitObjCObjectType(), clang::IdentifierResolver::IdDeclInfoMap::~IdDeclInfoMap(), and clang::ast_matchers::dynamic::Parser::ScopedContextEntry::~ScopedContextEntry().

const FormatStyle& Style

Definition at line 1059 of file TokenAnnotator.cpp.