10 #include "clang/AST/ASTContext.h"
11 #include "clang/AST/Type.h"
12 #include "clang/ASTMatchers/ASTMatchFinder.h"
13 #include "clang/Lex/Lexer.h"
19 void CloexecFopenCheck::registerMatchers(MatchFinder *Finder) {
20 auto CharPointerType = hasType(pointerType(pointee(isAnyCharacter())));
21 registerMatchersImpl(Finder,
22 functionDecl(isExternC(), returns(asString(
"FILE *")),
24 hasParameter(0, CharPointerType),
25 hasParameter(1, CharPointerType)));
29 insertStringFlag(Result,
'e', 1);