clang
22.0.0git
include
clang
Tooling
Refactoring
Rename
USRFinder.h
Go to the documentation of this file.
1
//===--- USRFinder.h - Clang refactoring library --------------------------===//
2
//
3
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4
// See https://llvm.org/LICENSE.txt for license information.
5
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6
//
7
//===----------------------------------------------------------------------===//
8
///
9
/// \file
10
/// Methods for determining the USR of a symbol at a location in source
11
/// code.
12
///
13
//===----------------------------------------------------------------------===//
14
15
#ifndef LLVM_CLANG_TOOLING_REFACTORING_RENAME_USRFINDER_H
16
#define LLVM_CLANG_TOOLING_REFACTORING_RENAME_USRFINDER_H
17
18
#include "
clang/AST/AST.h
"
19
#include "
clang/AST/ASTContext.h
"
20
#include <string>
21
#include <vector>
22
23
namespace
clang
{
24
25
class
ASTContext
;
26
class
Decl
;
27
class
SourceLocation
;
28
class
NamedDecl
;
29
30
namespace
tooling
{
31
32
// Given an AST context and a point, returns a NamedDecl identifying the symbol
33
// at the point. Returns null if nothing is found at the point.
34
const
NamedDecl *
getNamedDeclAt
(
const
ASTContext &Context,
35
const
SourceLocation Point);
36
37
// Given an AST context and a fully qualified name, returns a NamedDecl
38
// identifying the symbol with a matching name. Returns null if nothing is
39
// found for the name.
40
const
NamedDecl *
getNamedDeclFor
(
const
ASTContext &Context,
41
const
std::string &Name);
42
43
// Converts a Decl into a USR.
44
std::string
getUSRForDecl
(
const
Decl *Decl);
45
46
}
// end namespace tooling
47
}
// end namespace clang
48
49
#endif
// LLVM_CLANG_TOOLING_REFACTORING_RENAME_USRFINDER_H
ASTContext.h
Defines the clang::ASTContext interface.
AST.h
clang::ASTContext
Holds long-lived AST nodes (such as types and decls) that can be referred to throughout the semantic ...
Definition
ASTContext.h:188
clang::Decl
Decl - This represents one declaration (or definition), e.g.
Definition
DeclBase.h:86
clang::NamedDecl
This represents a decl that may have a name.
Definition
Decl.h:273
clang::SourceLocation
Encodes a location in the source.
Definition
SourceLocation.h:90
clang::tooling
Definition
AllTUsExecution.h:22
clang::tooling::getNamedDeclFor
const NamedDecl * getNamedDeclFor(const ASTContext &Context, const std::string &Name)
Definition
USRFinder.cpp:126
clang::tooling::getNamedDeclAt
const NamedDecl * getNamedDeclAt(const ASTContext &Context, const SourceLocation Point)
Definition
USRFinder.cpp:75
clang::tooling::getUSRForDecl
std::string getUSRForDecl(const Decl *Decl)
Definition
USRFinder.cpp:133
clang
The JSON file list parser is used to communicate input to InstallAPI.
Definition
CalledOnceCheck.h:17
Generated on
for clang by
1.14.0