clang-tools  4.0.0
USRLocFinder.h
Go to the documentation of this file.
1 //===--- tools/extra/clang-rename/USRLocFinder.h - Clang rename tool ------===//
2 //
3 // The LLVM Compiler Infrastructure
4 //
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
9 ///
10 /// \file
11 /// \brief Provides functionality for finding all instances of a USR in a given
12 /// AST.
13 ///
14 //===----------------------------------------------------------------------===//
15 
16 #ifndef LLVM_CLANG_TOOLS_EXTRA_CLANG_RENAME_USR_LOC_FINDER_H
17 #define LLVM_CLANG_TOOLS_EXTRA_CLANG_RENAME_USR_LOC_FINDER_H
18 
19 #include "clang/AST/AST.h"
20 #include "llvm/ADT/StringRef.h"
21 #include <string>
22 #include <vector>
23 
24 namespace clang {
25 namespace rename {
26 
27 // FIXME: make this an AST matcher. Wouldn't that be awesome??? I agree!
28 std::vector<SourceLocation>
29 getLocationsOfUSRs(const std::vector<std::string> &USRs,
30  llvm::StringRef PrevName, Decl *Decl);
31 
32 } // namespace rename
33 } // namespace clang
34 
35 #endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_RENAME_USR_LOC_FINDER_H
const std::string PrevName
std::vector< SourceLocation > getLocationsOfUSRs(const std::vector< std::string > &USRs, StringRef PrevName, Decl *Decl)