llvm-project/clang-tools-extra/clang-tidy/mpi
Nathan James 02d7ef3181
[clang-tidy] Fix mpi checks when running multiple TUs per clang-tidy process
Both the mpi-type-mismatch and mpi-buffer-deref check make use of a static MPIFunctionClassifier object.
This causes issue as the classifier is initialized with the first ASTContext that produces a match.
If the check is enabled on multiple translation units in a single clang-tidy process, this classifier won't be reinitialized for each TU. I'm not an expert in the MPIFunctionClassifier but I'd imagine this is a source of UB.
It is suspected that this bug may result in the crash caused here: https://bugs.llvm.org/show_bug.cgi?id=48985. However even if not the case, this should still be addressed.

Reviewed By: aaron.ballman

Differential Revision: https://reviews.llvm.org/D98275
2021-03-25 14:38:37 +00:00
..
BufferDerefCheck.cpp [clang-tidy] Fix mpi checks when running multiple TUs per clang-tidy process 2021-03-25 14:38:37 +00:00
BufferDerefCheck.h [clang-tidy] Fix mpi checks when running multiple TUs per clang-tidy process 2021-03-25 14:38:37 +00:00
CMakeLists.txt [openmp] Add missing dependencies for OMP.h.inc after d90443b 2020-06-23 11:48:04 -04:00
MPITidyModule.cpp
TypeMismatchCheck.cpp [clang-tidy] Fix mpi checks when running multiple TUs per clang-tidy process 2021-03-25 14:38:37 +00:00
TypeMismatchCheck.h [clang-tidy] Fix mpi checks when running multiple TUs per clang-tidy process 2021-03-25 14:38:37 +00:00