-
Notifications
You must be signed in to change notification settings - Fork 0
/
PerlUndefSetsvCheck.h
28 lines (26 loc) · 1002 Bytes
/
PerlUndefSetsvCheck.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#pragma once
#include "llvm/ADT/StringRef.h"
#include "clang/Lex/Lexer.h"
#include "clang-tidy/ClangTidy.h"
#include "clang-tidy/ClangTidyCheck.h"
#include <string>
#include <vector>
class PerlUndefSetsvCheck : public clang::tidy::ClangTidyCheck
{
// Initialized from PerlCheckMulitplicity in the configuration.
// This should reflect whether -Dusemultiplicity is enabled for the
// build, note that -Dusethreads also turns on multiplicity
//
// I looked at initializing this from the macro definitions but
// we see that too late if we want to use the AST matchers for more
// than matching the macro name.
bool UseMultiplicity;
public:
// Construct a new check
// Name, Context - passed to base constructor
//
PerlUndefSetsvCheck(llvm::StringRef Name,
clang::tidy::ClangTidyContext* Context);
void registerMatchers(clang::ast_matchers::MatchFinder* Finder) override;
void check(const clang::ast_matchers::MatchFinder::MatchResult& Result) override;
};