blob: c62ed84316aa41261ca1587b742f09c886255b08 [file] [log] [blame]
Edwin Vane44c31452013-01-22 18:31:49 +00001//===-- LoopConvert/LoopConvert.h - C++11 for-loop migration ----*- 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/// \file
11/// \brief This file provides the definition of the UseNullptrTransform
12/// class which is the main interface to the use-nullptr transform
13/// that tries to make use of nullptr where possible.
14///
15//===----------------------------------------------------------------------===//
16#ifndef LLVM_TOOLS_CLANG_TOOLS_EXTRA_CPP11_MIGRATE_USE_NULLPTR_H
17#define LLVM_TOOLS_CLANG_TOOLS_EXTRA_CPP11_MIGRATE_USE_NULLPTR_H
18
19#include "Transform.h"
20#include "llvm/Support/Compiler.h" // For LLVM_OVERRIDE
21
22/// \brief Subclass of Transform that transforms null pointer constants into
23/// C++11's nullptr keyword where possible.
24class UseNullptrTransform : public Transform {
25public:
26 /// \see Transform::run().
27 virtual int apply(const FileContentsByPath &InputStates,
28 RiskLevel MaxRiskLEvel,
29 const clang::tooling::CompilationDatabase &Database,
30 const std::vector<std::string> &SourcePaths,
31 FileContentsByPath &ResultStates) LLVM_OVERRIDE;
32};
33
34#endif // LLVM_TOOLS_CLANG_TOOLS_EXTRA_CPP11_MIGRATE_USE_NULLPTR_H