Benjamin Kramer | 47c4d10 | 2014-07-15 09:50:32 +0000 | [diff] [blame] | 1 | //===--- ExplicitMakePairCheck.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_GOOGLE_EXPLICIT_MAKE_PAIR_CHECK_H |
| 11 | #define LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_GOOGLE_EXPLICIT_MAKE_PAIR_CHECK_H |
| 12 | |
| 13 | #include "../ClangTidy.h" |
| 14 | |
| 15 | namespace clang { |
| 16 | namespace tidy { |
| 17 | namespace build { |
| 18 | |
| 19 | /// \brief Check that make_pair's template arguments are deduced. |
| 20 | /// |
| 21 | /// G++ 4.6 in C++11 mode fails badly if make_pair's template arguments are |
| 22 | /// specified explicitly, and such use isn't intended in any case. |
| 23 | /// |
| 24 | /// Corresponding cpplint.py check name: 'build/explicit_make_pair'. |
| 25 | class ExplicitMakePairCheck : public ClangTidyCheck { |
| 26 | public: |
Alexander Kornienko | 6e0cbc8 | 2014-09-12 08:53:36 +0000 | [diff] [blame] | 27 | ExplicitMakePairCheck(StringRef Name, ClangTidyContext *Context) |
| 28 | : ClangTidyCheck(Name, Context) {} |
Benjamin Kramer | 47c4d10 | 2014-07-15 09:50:32 +0000 | [diff] [blame] | 29 | void registerMatchers(ast_matchers::MatchFinder *Finder) override; |
| 30 | void check(const ast_matchers::MatchFinder::MatchResult &Result) override; |
| 31 | }; |
| 32 | |
| 33 | } // namespace build |
| 34 | } // namespace tidy |
| 35 | } // namespace clang |
| 36 | |
| 37 | #endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_GOOGLE_EXPLICIT_MAKE_PAIR_CHECK_H |