|
|
|||
File indexing completed on 2026-05-10 08:37:11
0001 //===--- USRFinder.h - Clang refactoring library --------------------------===// 0002 // 0003 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 0004 // See https://llvm.org/LICENSE.txt for license information. 0005 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 0006 // 0007 //===----------------------------------------------------------------------===// 0008 /// 0009 /// \file 0010 /// Methods for determining the USR of a symbol at a location in source 0011 /// code. 0012 /// 0013 //===----------------------------------------------------------------------===// 0014 0015 #ifndef LLVM_CLANG_TOOLING_REFACTORING_RENAME_USRFINDER_H 0016 #define LLVM_CLANG_TOOLING_REFACTORING_RENAME_USRFINDER_H 0017 0018 #include "clang/AST/AST.h" 0019 #include "clang/AST/ASTContext.h" 0020 #include <string> 0021 #include <vector> 0022 0023 namespace clang { 0024 0025 class ASTContext; 0026 class Decl; 0027 class SourceLocation; 0028 class NamedDecl; 0029 0030 namespace tooling { 0031 0032 // Given an AST context and a point, returns a NamedDecl identifying the symbol 0033 // at the point. Returns null if nothing is found at the point. 0034 const NamedDecl *getNamedDeclAt(const ASTContext &Context, 0035 const SourceLocation Point); 0036 0037 // Given an AST context and a fully qualified name, returns a NamedDecl 0038 // identifying the symbol with a matching name. Returns null if nothing is 0039 // found for the name. 0040 const NamedDecl *getNamedDeclFor(const ASTContext &Context, 0041 const std::string &Name); 0042 0043 // Converts a Decl into a USR. 0044 std::string getUSRForDecl(const Decl *Decl); 0045 0046 } // end namespace tooling 0047 } // end namespace clang 0048 0049 #endif // LLVM_CLANG_TOOLING_REFACTORING_RENAME_USRFINDER_H
| [ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
|
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |
|