clang  3.8.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
 Dataflow Directional Tag Classes.
 
 clang::format
 

Macros

#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.

Macro Definition Documentation

#define DEBUG_TYPE   "format-token-annotator"

Definition at line 21 of file TokenAnnotator.cpp.

Variable Documentation

bool AutoFound

Definition at line 1264 of file TokenAnnotator.cpp.

unsigned BindingStrength

Definition at line 822 of file TokenAnnotator.cpp.

bool CanBeExpression = true

Definition at line 830 of file TokenAnnotator.cpp.

bool CaretFound = false

Definition at line 833 of file TokenAnnotator.cpp.

bool ColonIsDictLiteral = false

Definition at line 826 of file TokenAnnotator.cpp.

bool ColonIsForRangeExpr = false

Definition at line 825 of file TokenAnnotator.cpp.

bool ColonIsObjCMethodExpr = false

Definition at line 827 of file TokenAnnotator.cpp.

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

Definition at line 1263 of file TokenAnnotator.cpp.

FormatToken* FirstObjCSelectorName = nullptr

Definition at line 828 of file TokenAnnotator.cpp.

FormatToken* FirstStartOfName = nullptr

Definition at line 829 of file TokenAnnotator.cpp.

bool InCtorInitializer = false

Definition at line 832 of file TokenAnnotator.cpp.

bool InTemplateArgument = false

Definition at line 831 of file TokenAnnotator.cpp.

bool IsExpression

Definition at line 823 of file TokenAnnotator.cpp.

bool IsForEachMacro = false

Definition at line 834 of file TokenAnnotator.cpp.

const AdditionalKeywords& Keywords

Definition at line 1265 of file TokenAnnotator.cpp.

AnnotatedLine& Line
unsigned LongestObjCSelectorName = 0

Definition at line 824 of file TokenAnnotator.cpp.

llvm::SmallPtrSet<FormatToken *, 16> NonTemplateLess

Definition at line 1271 of file TokenAnnotator.cpp.

AnnotatingParser& P

Definition at line 840 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::CloudABI::AddClangCXXStdlibIncludeArgs(), clang::driver::toolchains::NaClToolChain::AddClangCXXStdlibIncludeArgs(), clang::driver::toolchains::MinGW::AddClangSystemIncludeArgs(), clang::driver::toolchains::Linux::AddClangSystemIncludeArgs(), clang::driver::toolchains::MipsLLVMToolChain::AddClangSystemIncludeArgs(), clang::driver::toolchains::NaClToolChain::AddClangSystemIncludeArgs(), clang::driver::toolchains::DarwinClang::AddCXXStdlibLibArgs(), AddFunctionParameterChunks(), AddImplicitIncludePTH(), clang::driver::toolchains::DarwinClang::AddLinkARCArgs(), clang::driver::toolchains::MachO::AddLinkRuntimeLib(), AddObjCProperties(), AddOverloadParameterChunks(), clang::driver::toolchains::Darwin::addProfileRTLibs(), clang::ASTWriter::AddTemplateArgument(), AddTemplateParameterChunks(), clang::ASTWriter::AddTemplateParameterList(), AdoptTemplateParameterList(), alreadyExecutedAtLeastOneLoopIteration(), appendUserToPath(), llvm::GraphTraits< clang::CallGraphNode * >::CGNDeref(), clang::Sema::CheckEnableIf(), clang::ento::ConstraintManager::checkNull(), clang::Sema::CheckParmsForFunctionDef(), CheckPropertyAgainstProtocol(), clang::Sema::CheckVarTemplateId(), clang::driver::toolchains::CloudABI::CloudABI(), clang::Sema::CodeCompleteObjCMethodDecl(), CollectOverriddenMethodsRecurse(), collectUnexpandedParameterPacks(), clang::ast_matchers::dynamic::Parser::completeExpression(), computeNodeID(), computeNodeSize(), clang::TemplateArgument::containsUnexpandedParameterPack(), ConvertDeducedTemplateArgument(), clang::CodeCompletionResult::CreateCodeCompletionString(), clang::ento::PathDiagnosticLocation::createEndOfPath(), CreateFrontendBaseAction(), CreateUbiViz(), clang::Sema::DeduceTemplateArguments(), DiagnoseUnexpandedParameterPacks(), clang::Sema::DiagnoseUnimplementedProperties(), clang::driver::Driver::Driver(), clang::Decl::dump(), clang::Decl::dumpColor(), clang::CodeGen::CodeGenFunction::EmitAArch64BuiltinExpr(), clang::Parser::ObjCTypeParamListScope::enter(), EraseUnwantedCUDAMatchesImpl(), 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::ento::PathDiagnosticLocation::getStmt(), clang::ASTContext::getSubstTemplateTypeParmPackType(), clang::ento::BasicValueFactory::getValue(), getValueDeclFromSExpr(), clang::VarDecl::hasInit(), 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::Sema::InstantiateClass(), clang::Sema::InstantiateClassTemplateSpecialization(), clang::ParentMap::isConsumedExpr(), clang::TemplateArgument::isDependent(), isInitializationOfVar(), clang::TemplateArgument::isInstantiationDependent(), clang::CXXMethodDecl::isLambdaStaticInvoker(), clang::Scope::isOpenMPLoopScope(), clang::ObjCInterfaceDecl::lookupNestedProtocol(), MarkUsedTemplateParameters(), MaybeAddOverrideCalls(), clang::Sema::MergeVarDeclExceptionSpecs(), NeedsInstantiationAsFunctionType(), clang::ast_matchers::dynamic::Parser::ScopedContextEntry::nextArg(), clang::RawComment::parse(), clang::ParseAST(), clang::TemplateArgument::print(), clang::NamedDecl::printQualifiedName(), clang::SubstTemplateTypeParmPackType::Profile(), 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(), SortAndUniqueProtocols(), clang::Sema::startLambdaDefinition(), clang::Sema::SubstituteExplicitTemplateArguments(), clang::TemplateDeclInstantiator::SubstTemplateParams(), clang::TemplateParameterList::TemplateParameterList(), clang::ento::bugreporter::trackNullOrUndefValue(), clang::threadSafety::CapabilityExpr::valueDecl(), 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 1261 of file TokenAnnotator.cpp.