clang
20.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::CodeGen::AlignmentSource::Decl
@ Decl
The l-value was an access to a declared entity or something equivalently strong, like the address of ...
clang::tooling::getNamedDeclFor
const NamedDecl * getNamedDeclFor(const ASTContext &Context, const std::string &Name)
Definition:
USRFinder.cpp:128
clang::tooling::getNamedDeclAt
const NamedDecl * getNamedDeclAt(const ASTContext &Context, const SourceLocation Point)
Definition:
USRFinder.cpp:77
clang::tooling::getUSRForDecl
std::string getUSRForDecl(const Decl *Decl)
Definition:
USRFinder.cpp:135
clang
The JSON file list parser is used to communicate input to InstallAPI.
Definition:
CalledOnceCheck.h:17
Generated on Wed Dec 18 2024 08:46:38 for clang by
1.9.6