search for: ast_match

Displaying 1 result from an estimated 1 matches for "ast_match".

Did you mean: last_match
2020 Sep 27
3
How to add a new clang-tidy module
...icense-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +#include "M011Check.h" +#include "clang/AST/ASTContext.h" +#include "clang/ASTMatchers/ASTMatchFinder.h" + +using namespace clang::ast_matchers; + +namespace clang { +namespace tidy { +namespace misra { + +void M011Check::registerMatchers(MatchFinder *Finder) { + // FIXME: Add matchers. + Finder->addMatcher(functionDecl().bind("x"), this); +} + +void M011Check::check(const MatchFinder::MatchResult &Result) { + // FIX...