clang
3.7.0
|
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/ADT/SmallPtrSet.h"
#include "llvm/Support/Debug.h"
Go to the source code of this file.
Namespaces | |
clang | |
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) |
This file implements a token annotator, i.e. creates AnnotatedTokens
out of FormatTokens
with required extra information.
Definition in file TokenAnnotator.cpp.
#define DEBUG_TYPE "format-token-annotator" |
Definition at line 21 of file TokenAnnotator.cpp.
bool AutoFound |
Definition at line 1217 of file TokenAnnotator.cpp.
unsigned BindingStrength |
Definition at line 788 of file TokenAnnotator.cpp.
Definition at line 796 of file TokenAnnotator.cpp.
Definition at line 799 of file TokenAnnotator.cpp.
Definition at line 792 of file TokenAnnotator.cpp.
Definition at line 791 of file TokenAnnotator.cpp.
Definition at line 793 of file TokenAnnotator.cpp.
tok::TokenKind ContextKind |
Definition at line 787 of file TokenAnnotator.cpp.
Referenced by clang::Sema::CodeCompleteTag(), and clang::Sema::getCurrentMangleNumberContext().
SmallVector<Context, 8> Contexts |
Definition at line 1212 of file TokenAnnotator.cpp.
Referenced by clang::DeclContext::buildLookup(), clang::AnalysisDeclContextManager::clear(), clang::ASTReader::completeVisibleDeclsMap(), clang::ASTReader::FindExternalVisibleDeclsByName(), clang::LocationContextManager::getBlockInvocationContext(), clang::AnalysisDeclContextManager::getContext(), getDeclShowContexts(), clang::CodeCompletionTUInfo::getParentName(), clang::LocationContextManager::getStackFrame(), clang::DeclContext::noload_lookup(), and clang::NamedDecl::printQualifiedName().
FormatToken* Current |
Definition at line 1414 of file TokenAnnotator.cpp.
Referenced by clang::format::ContinuationIndenter::addTokenToState(), clang::format::AnnotatedLine::AnnotatedLine(), clang::driver::Driver::BuildActions(), buildCudaActions(), clang::format::ContinuationIndenter::canBreak(), clang::Sema::CheckDelegatingCtorCycles(), clang::tooling::deduplicate(), diagnoseUseOfInternalDeclInInlineFunction(), clang::LocalInstantiationScope::findInstantiationOf(), clang::LocalInstantiationScope::getPartiallySubstitutedPack(), clang::LocalInstantiationScope::InstantiatedLocal(), clang::Module::isAvailable(), isDeadReturn(), clang::LocalInstantiationScope::MakeInstantiatedLocalArgPack(), clang::Module::markUnavailable(), clang::format::ContinuationIndenter::mustBreak(), clang::ObjCInterfaceDecl::filtered_category_iterator< Filter >::operator++(), clang::TypoCorrectionConsumer::peekNextCorrection(), and clang::format::AnnotatedLine::~AnnotatedLine().
FormatToken* CurrentToken |
Definition at line 1216 of file TokenAnnotator.cpp.
FormatToken* FirstObjCSelectorName = nullptr |
Definition at line 794 of file TokenAnnotator.cpp.
FormatToken* FirstStartOfName = nullptr |
Definition at line 795 of file TokenAnnotator.cpp.
Definition at line 798 of file TokenAnnotator.cpp.
Definition at line 797 of file TokenAnnotator.cpp.
bool IsExpression |
Definition at line 789 of file TokenAnnotator.cpp.
Definition at line 800 of file TokenAnnotator.cpp.
const AdditionalKeywords& Keywords |
Definition at line 1218 of file TokenAnnotator.cpp.
AnnotatedLine& Line |
Definition at line 1215 of file TokenAnnotator.cpp.
Referenced by clang::ASTUnit::CodeComplete(), DetectDistro(), clang::CodeGen::CodeGenFunction::EmitCheckSourceLocation(), clang::CodeGen::CGDebugInfo::EmitDeclareOfBlockDeclRefVariable(), clang::BackendConsumer::EmitOptimizationMessage(), clang::format::UnwrappedLineFormatter::format(), clang::LineEntry::get(), clang::format::ContinuationIndenter::getInitialState(), clang::LayoutOverrideSource::LayoutOverrideSource(), ParseDirective(), clang::comments::Parser::parseVerbatimBlock(), and clang::Preprocessor::SetCodeCompletionPoint().
unsigned LongestObjCSelectorName = 0 |
Definition at line 790 of file TokenAnnotator.cpp.
llvm::SmallPtrSet<FormatToken *, 16> NonTemplateLess |
Definition at line 1224 of file TokenAnnotator.cpp.
AnnotatingParser& P |
Definition at line 806 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::NaCl_TC::AddClangCXXStdlibIncludeArgs(), clang::driver::toolchains::MinGW::AddClangSystemIncludeArgs(), clang::driver::toolchains::Linux::AddClangSystemIncludeArgs(), clang::driver::toolchains::NaCl_TC::AddClangSystemIncludeArgs(), clang::driver::toolchains::MSVCToolChain::AddClangSystemIncludeArgs(), clang::driver::toolchains::DarwinClang::AddCXXStdlibLibArgs(), AddFunctionParameterChunks(), AddImplicitIncludePTH(), clang::driver::toolchains::DarwinClang::AddLinkARCArgs(), clang::driver::toolchains::MachO::AddLinkRuntimeLib(), AddObjCProperties(), AddOverloadParameterChunks(), clang::ASTWriter::AddTemplateArgument(), AddTemplateParameterChunks(), clang::ASTWriter::AddTemplateParameterList(), AdoptTemplateParameterList(), alreadyExecutedAtLeastOneLoopIteration(), appendUserToPath(), clang::CodeGen::CodeGenFunction::BuildBlockByrefAddress(), llvm::GraphTraits< clang::CallGraphNode * >::CGNDeref(), clang::ento::ConstraintManager::checkNull(), clang::Sema::CheckParmsForFunctionDef(), CheckPropertyAgainstProtocol(), checkRecordTypeForCapability(), 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::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::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::FileManager::removeDotPaths(), 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::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 1214 of file TokenAnnotator.cpp.