clang 8.0.0

Functions
Lookup.cpp File Reference
`#include "clang/Tooling/Core/Lookup.h"`
`#include "clang/AST/Decl.h"`
`#include "clang/AST/DeclCXX.h"`
`#include "clang/AST/DeclarationName.h"`
Include dependency graph for Lookup.cpp:

Go to the source code of this file.

## Functions
static llvm::SmallVector< const NamespaceDecl *, 4 > | getAllNamedNamespaces (const DeclContext *Context)
static bool | usingFromDifferentCanonicalNamespace (const DeclContext *FromContext, const DeclContext *UseContext)
static StringRef | getBestNamespaceSubstr (const DeclContext *DeclA, StringRef NewName, bool HadLeadingColonColon)
static bool | isFullyQualified (const NestedNameSpecifier *NNS)
| Check if the name specifier begins with a written "::". More...
static bool | isAmbiguousNameInScope (StringRef Spelling, StringRef QName, const DeclContext &UseContext)

## Function Documentation

## ◆ getAllNamedNamespaces()

static llvm::SmallVector<const NamespaceDecl *, 4> getAllNamedNamespaces | ( | const DeclContext * | Context | ) |
| static

Definition at line 27 of file Lookup.cpp.

Referenced by isAmbiguousNameInScope(), and usingFromDifferentCanonicalNamespace().

## ◆ getBestNamespaceSubstr()

static StringRef getBestNamespaceSubstr | ( | const DeclContext * | DeclA,
|  | StringRef | NewName,
|  | bool | HadLeadingColonColon
| ) |  |
| static

Definition at line 82 of file Lookup.cpp.

References clang::DeclContext::getParent().

Referenced by clang::tooling::replaceNestedName().

## ◆ isAmbiguousNameInScope()

static bool isAmbiguousNameInScope | ( | StringRef | Spelling,
|  | StringRef | QName,
|  | const DeclContext & | UseContext
| ) |  |
| static

Definition at line 123 of file Lookup.cpp.

References getAllNamedNamespaces(), and clang::DeclContext::getParentASTContext().

Referenced by clang::tooling::replaceNestedName().

## ◆ isFullyQualified()

static bool isFullyQualified | ( | const NestedNameSpecifier * | NNS | ) |
| static

Check if the name specifier begins with a written "::".

Definition at line 109 of file Lookup.cpp.

References clang::NestedNameSpecifier::getKind(), clang::NestedNameSpecifier::getPrefix(), and clang::NestedNameSpecifier::Global.

Referenced by clang::tooling::replaceNestedName().

## ◆ usingFromDifferentCanonicalNamespace()

static bool usingFromDifferentCanonicalNamespace | ( | const DeclContext * | FromContext,
|  | const DeclContext * | UseContext
| ) |  |
| static

Definition at line 46 of file Lookup.cpp.

References getAllNamedNamespaces().

Referenced by clang::tooling::replaceNestedName().