10#include "clang/AST/ASTContext.h"
11#include "clang/AST/Type.h"
12#include "clang/ASTMatchers/ASTMatchFinder.h"
13#include "clang/Lex/Lexer.h"
20 auto CharPointerType = hasType(pointerType(pointee(isAnyCharacter())));
22 functionDecl(isExternC(), returns(asString(
"FILE *")),
24 hasParameter(0, CharPointerType),
25 hasParameter(1, CharPointerType)));
void registerMatchersImpl(ast_matchers::MatchFinder *Finder, ast_matchers::internal::Matcher< FunctionDecl > Function)
void insertStringFlag(const ast_matchers::MatchFinder::MatchResult &Result, const char Mode, const int ArgPos)
Type3 is also to add a flag to the corresponding argument, but this time, the flag is some string and...
void check(const ast_matchers::MatchFinder::MatchResult &Result) override
ClangTidyChecks that register ASTMatchers should do the actual work in here.
void registerMatchers(ast_matchers::MatchFinder *Finder) override
Override this to register AST matchers with Finder.