clang-tools 8.0.0

PathConfig.h
Go to the documentation of this file.
1 //===-- PathConfig.h - Process paths of symbols -----------------*- C++ -*-===//
2 //
3 //
4 // The LLVM Compiler Infrastructure
5 //
6 // This file is distributed under the University of Illinois Open Source
7 // License. See LICENSE.TXT for details.
8 //
9 //===----------------------------------------------------------------------===//
10
11 #ifndef LLVM_CLANG_TOOLS_EXTRA_FIND_ALL_SYMBOLS_PATH_CONFIG_H
12 #define LLVM_CLANG_TOOLS_EXTRA_FIND_ALL_SYMBOLS_PATH_CONFIG_H
13
14 #include "HeaderMapCollector.h"
15 #include "clang/Basic/SourceManager.h"
16 #include <string>
17
18 namespace clang {
19 namespace find_all_symbols {
20
21 /// \brief This calculates the include path for \p Loc.
22 ///
23 /// \param SM SourceManager.
24 /// \param Loc A SourceLocation.
25 /// \param Collector An optional header mapping collector.
26 ///
27 /// \return The file path (or mapped file path if Collector is provided) of the
28 /// header that includes \p Loc. If \p Loc comes from .inc header file, \p Loc
29 /// is set to the location from which the .inc header file is included. If \p
30 /// Loc is invalid or comes from a main file, this returns an empty string.
31 std::string getIncludePath(const SourceManager &SM, SourceLocation Loc,
32 const HeaderMapCollector *Collector = nullptr);
33
34 } // namespace find_all_symbols
35 } // namespace clang
36
37 #endif // LLVM_CLANG_TOOLS_EXTRA_FIND_ALL_SYMBOLS_PATH_CONFIG_H
Loc
SourceLocation Loc
&#39;#&#39; location in the include directive
Definition: IncludeOrderCheck.cpp:37
HeaderMapCollector.h
clang::find_all_symbols::getIncludePath
std::string getIncludePath(const SourceManager &SM, SourceLocation Loc, const HeaderMapCollector *Collector)
This calculates the include path for Loc.
Definition: PathConfig.cpp:17
clang
===– Representation.cpp - ClangDoc Representation --------—*- C++ -*-===//
Definition: ChangeNamespace.cpp:18