clang-tools  9.0.0
FixItHintUtils.h
Go to the documentation of this file.
1 //===--- FixItHintUtils.h - clang-tidy---------------------------*- C++ -*-===//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
8 
9 #ifndef LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_UTILS_FIXITHINTUTILS_H
10 #define LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_UTILS_FIXITHINTUTILS_H
11 
12 #include "clang/AST/ASTContext.h"
13 #include "clang/AST/Decl.h"
14 
15 namespace clang {
16 namespace tidy {
17 namespace utils {
18 namespace fixit {
19 
20 /// \brief Creates fix to make ``VarDecl`` a reference by adding ``&``.
21 FixItHint changeVarDeclToReference(const VarDecl &Var, ASTContext &Context);
22 
23 /// \brief Creates fix to make ``VarDecl`` const qualified.
24 FixItHint changeVarDeclToConst(const VarDecl &Var);
25 
26 } // namespace fixit
27 } // namespace utils
28 } // namespace tidy
29 } // namespace clang
30 
31 #endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_UTILS_FIXITHINTUTILS_H
===– Representation.cpp - ClangDoc Representation --------—*- C++ -*-===//
FixItHint changeVarDeclToConst(const VarDecl &Var)
Creates fix to make VarDecl const qualified.
FixItHint changeVarDeclToReference(const VarDecl &Var, ASTContext &Context)
Creates fix to make VarDecl a reference by adding &.