blob: e215e8df83c36efa6ba3dd41ba7e3de668f60aca [file] [log] [blame]
Aaron Ballman46bc3042015-10-05 20:08:59 +00001//===--- VariadicFunctionDefCheck.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_CERT_VARIADICFUNCTIONDEF_H
11#define LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_CERT_VARIADICFUNCTIONDEF_H
12
13#include "../ClangTidy.h"
14
15namespace clang {
16namespace tidy {
Aaron Ballman1284f042016-01-04 14:31:14 +000017namespace cert {
Aaron Ballman46bc3042015-10-05 20:08:59 +000018
19/// Guards against any C-style variadic function definitions (not declarations).
20///
21/// For the user-facing documentation see:
Aaron Ballmana6ab2ef2015-12-27 19:14:55 +000022/// http://clang.llvm.org/extra/clang-tidy/checks/cert-dcl50-cpp.html
Aaron Ballman46bc3042015-10-05 20:08:59 +000023class VariadicFunctionDefCheck : public ClangTidyCheck {
24public:
25 VariadicFunctionDefCheck(StringRef Name, ClangTidyContext *Context)
26 : ClangTidyCheck(Name, Context) {}
27 void registerMatchers(ast_matchers::MatchFinder *Finder) override;
28 void check(const ast_matchers::MatchFinder::MatchResult &Result) override;
29};
30
Aaron Ballman1284f042016-01-04 14:31:14 +000031} // namespace cert
Aaron Ballman46bc3042015-10-05 20:08:59 +000032} // namespace tidy
33} // namespace clang
34
35#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_CERT_VARIADICFUNCTIONDEF_H