clang-tools  4.0.0
ASTUtils.h
Go to the documentation of this file.
1 //===---------- ASTUtils.h - clang-tidy -----------------------------------===//
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 #ifndef LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_ASTUTILS_H
11 #define LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_ASTUTILS_H
12 
13 #include "clang/AST/AST.h"
14 
15 namespace clang {
16 namespace tidy {
17 namespace utils {
18 // Returns the (closest) Function declaration surrounding |Statement| or NULL.
19 const FunctionDecl *getSurroundingFunction(ASTContext &Context,
20  const Stmt &Statement);
21 } // namespace utils
22 } // namespace tidy
23 } // namespace clang
24 
25 #endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_ASTUTILS_H
const FunctionDecl * getSurroundingFunction(ASTContext &Context, const Stmt &Statement)
Definition: ASTUtils.cpp:20
ClangTidyContext & Context
Definition: ClangTidy.cpp:87