clang-tools 6.0.0

FixItHintUtils.h
Go to the documentation of this file.
1 //===--- FixItHintUtils.h - clang-tidy---------------------------*- 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 #ifndef LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_UTILS_FIXITHINTUTILS_H
11 #define LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_UTILS_FIXITHINTUTILS_H
12
13 #include "clang/AST/ASTContext.h"
14 #include "clang/AST/Decl.h"
15
16 namespace clang {
17 namespace tidy {
18 namespace utils {
19 namespace fixit {
20
21 /// \brief Creates fix to make ``VarDecl`` a reference by adding ``&``.
22 FixItHint changeVarDeclToReference(const VarDecl &Var, ASTContext &Context);
23
24 /// \brief Creates fix to make ``VarDecl`` const qualified.
25 FixItHint changeVarDeclToConst(const VarDecl &Var);
26
27 } // namespace fixit
28 } // namespace utils
29 } // namespace tidy
30 } // namespace clang
31
32 #endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_UTILS_FIXITHINTUTILS_H
clang
Definition: AndroidTidyModule.cpp:28
clang::tidy::utils::fixit::changeVarDeclToConst
FixItHint changeVarDeclToConst(const VarDecl &Var)
Creates fix to make VarDecl const qualified.
Definition: FixItHintUtils.cpp:29
clang::tidy::utils::fixit::changeVarDeclToReference
FixItHint changeVarDeclToReference(const VarDecl &Var, ASTContext &Context)
Creates fix to make VarDecl a reference by adding &.
Definition: FixItHintUtils.cpp:19