Do not use inheriting constructors.

git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@244597 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Manuel Klimek 2015-08-11 12:59:22 +00:00
Родитель bbdbc223ff
Коммит 91e3679539
1 изменённых файлов: 6 добавлений и 3 удалений

Просмотреть файл

@ -19,7 +19,8 @@ namespace {
class IncludeInserterCheckBase : public ClangTidyCheck {
public:
using ClangTidyCheck::ClangTidyCheck;
IncludeInserterCheckBase(StringRef CheckName, ClangTidyContext *Context)
: ClangTidyCheck(CheckName, Context) {}
void registerPPCallbacks(CompilerInstance &Compiler) override {
Inserter.reset(new IncludeInserter(Compiler.getSourceManager(),
Compiler.getLangOpts(),
@ -54,14 +55,16 @@ public:
class NonSystemHeaderInserterCheck : public IncludeInserterCheckBase {
public:
using IncludeInserterCheckBase::IncludeInserterCheckBase;
NonSystemHeaderInserterCheck(StringRef CheckName, ClangTidyContext *Context)
: IncludeInserterCheckBase(CheckName, Context) {}
StringRef HeaderToInclude() const override { return "path/to/header.h"; }
bool IsAngledInclude() const override { return false; }
};
class CXXSystemIncludeInserterCheck : public IncludeInserterCheckBase {
public:
using IncludeInserterCheckBase::IncludeInserterCheckBase;
CXXSystemIncludeInserterCheck(StringRef CheckName, ClangTidyContext *Context)
: IncludeInserterCheckBase(CheckName, Context) {}
StringRef HeaderToInclude() const override { return "set"; }
bool IsAngledInclude() const override { return true; }
};