clang-tools  7.0.0
AST.h
Go to the documentation of this file.
1 //===--- AST.h - Utility AST functions -------------------------*- C++ -*-===//
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 // Various code that examines C++ source code using AST.
11 //
12 //===----------------------------------------------------------------------===//
13 
14 #ifndef LLVM_CLANG_TOOLS_EXTRA_CLANGD_AST_H_
15 #define LLVM_CLANG_TOOLS_EXTRA_CLANGD_AST_H_
16 
17 #include "clang/AST/Decl.h"
18 #include "clang/Basic/SourceLocation.h"
19 
20 namespace clang {
21 class SourceManager;
22 class Decl;
23 
24 namespace clangd {
25 
26 /// Find the identifier source location of the given D.
27 ///
28 /// The returned location is usually the spelling location where the name of the
29 /// decl occurs in the code.
30 SourceLocation findNameLoc(const clang::Decl *D);
31 
32 /// Returns the qualified name of ND. The scope doesn't contain unwritten scopes
33 /// like inline namespaces.
34 std::string printQualifiedName(const NamedDecl &ND);
35 
36 } // namespace clangd
37 } // namespace clang
38 
39 #endif // LLVM_CLANG_TOOLS_EXTRA_CLANGD_AST_H_
std::string printQualifiedName(const NamedDecl &ND)
Returns the qualified name of ND.
Definition: AST.cpp:41
SourceLocation findNameLoc(const clang::Decl *D)
Find the identifier source location of the given D.
Definition: AST.cpp:20
===– Representation.cpp - ClangDoc Representation --------—*- C++ -*-===//