[PATCH] D12761: MPI-Checker patch for Clang Static Analyzer

Alexander Droste via cfe-commits cfe-commits at lists.llvm.org
Tue Dec 8 01:57:11 PST 2015


Alexander_Droste added a comment.

@Anna 
Thanks for having a look once more! I will submit these parts as separate patches.

@Alexander
This should be only about the AST-based checks, as Anna takes care of the path-sensitive ones.
I think this is not about moving the checks to clang-tidy because they are not linters but detect
errors. The AST-based functionality is roughly structured as followed:

`MPIChecker.cpp` : This is the entry point class where `checkASTDecl` is the only callback for AST-based
checks. There the `TranslationUnitVisitor` is used which traverses the complete TU passed.
During the traversal each check is executed in the course of the `VisitCallExpr` callback. 
The AST-based checks are implemented in `MPICheckerAST.(cpp|h)`. The `TypeVisitor `, contained
in `TypeVisitor.h`, is used as a helper class, in order to detect type properties.

This patch contains 3 AST-based checks (type mismatch, incorrect buffer referencing, invalid argument type)
which are described here in detail (see 3.1 AST-Based Checks) :
https://dl.acm.org/ft_gateway.cfm?id=2833159&ftid=1644251&dwn=1&CFID=566596797&CFTOKEN=98261226


http://reviews.llvm.org/D12761





More information about the cfe-commits mailing list