]> granicus.if.org Git - clang/commitdiff
MPI-Checker: move MPIFunctionClassifier.h
authorAlexander Kornienko <alexfh@google.com>
Mon, 25 Jul 2016 15:27:16 +0000 (15:27 +0000)
committerAlexander Kornienko <alexfh@google.com>
Mon, 25 Jul 2016 15:27:16 +0000 (15:27 +0000)
Summary:
This patch moves the MPIFunctionClassifier header to `clang/include/clang/StaticAnalyzer/Checkers`,
in order to make it accessible in other parts of the architecture.

Reviewers: dcoughlin, zaks.anna

Subscribers: alexfh, cfe-commits

Patch by Alexander Droste!

Differential Revision: https://reviews.llvm.org/D22671

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@276639 91177308-0d34-0410-b5e6-96231b3b80d8

include/clang/StaticAnalyzer/Checkers/MPIFunctionClassifier.h [moved from lib/StaticAnalyzer/Checkers/MPI-Checker/MPIFunctionClassifier.h with 100% similarity]
lib/StaticAnalyzer/Checkers/MPI-Checker/MPIChecker.cpp
lib/StaticAnalyzer/Checkers/MPI-Checker/MPIChecker.h
lib/StaticAnalyzer/Checkers/MPI-Checker/MPIFunctionClassifier.cpp
lib/StaticAnalyzer/Checkers/MPI-Checker/MPITypes.h

index c3d0f8f2a129863a08abe2c4c7faa21f9a2a52ba..c667b9e67d4bf00e057648cdababb8bc598d301f 100644 (file)
@@ -43,7 +43,8 @@ void MPIChecker::checkDoubleNonblocking(const CallEvent &PreCallEvent,
   // double nonblocking detected
   if (Req && Req->CurrentState == Request::State::Nonblocking) {
     ExplodedNode *ErrorNode = Ctx.generateNonFatalErrorNode();
-    BReporter.reportDoubleNonblocking(PreCallEvent, *Req, MR, ErrorNode, Ctx.getBugReporter());
+    BReporter.reportDoubleNonblocking(PreCallEvent, *Req, MR, ErrorNode,
+                                      Ctx.getBugReporter());
     Ctx.addTransition(ErrorNode->getState(), ErrorNode);
   }
   // no error
@@ -85,7 +86,8 @@ void MPIChecker::checkUnmatchedWaits(const CallEvent &PreCallEvent,
         State = ErrorNode->getState();
       }
       // A wait has no matching nonblocking call.
-      BReporter.reportUnmatchedWait(PreCallEvent, ReqRegion, ErrorNode, Ctx.getBugReporter());
+      BReporter.reportUnmatchedWait(PreCallEvent, ReqRegion, ErrorNode,
+                                    Ctx.getBugReporter());
     }
   }
 
@@ -118,7 +120,8 @@ void MPIChecker::checkMissingWaits(SymbolReaper &SymReaper,
           ErrorNode = Ctx.generateNonFatalErrorNode(State, &Tag);
           State = ErrorNode->getState();
         }
-        BReporter.reportMissingWait(Req.second, Req.first, ErrorNode, Ctx.getBugReporter());
+        BReporter.reportMissingWait(Req.second, Req.first, ErrorNode,
+                                    Ctx.getBugReporter());
       }
       State = State->remove<RequestMap>(Req.first);
     }
index 20c60ad076a21422c2f3654c8b0a7b14a07b930a..45bfd3b84bb1063165b3a1448f745f91d2f132b7 100644 (file)
@@ -19,8 +19,8 @@
 #define LLVM_CLANG_LIB_STATICANALYZER_CHECKERS_MPICHECKER_MPICHECKER_H
 
 #include "MPIBugReporter.h"
-#include "MPIFunctionClassifier.h"
 #include "MPITypes.h"
+#include "clang/StaticAnalyzer/Checkers/MPIFunctionClassifier.h"
 #include "clang/StaticAnalyzer/Core/PathSensitive/CallEvent.h"
 #include "clang/StaticAnalyzer/Core/PathSensitive/CheckerContext.h"
 
@@ -30,7 +30,7 @@ namespace mpi {
 
 class MPIChecker : public Checker<check::PreCall, check::DeadSymbols> {
 public:
-  MPIChecker() : BReporter(*this) { }
+  MPIChecker() : BReporter(*this) {}
 
   // path-sensitive callbacks
   void checkPreCall(const CallEvent &CE, CheckerContext &Ctx) const {
@@ -49,7 +49,6 @@ public:
       return;
     const_cast<std::unique_ptr<MPIFunctionClassifier> &>(FuncClassifier)
         .reset(new MPIFunctionClassifier{Ctx.getASTContext()});
-
   }
 
   /// Checks if a request is used by nonblocking calls multiple times
index ad937f683d30ef8a848a8911a350a6a3c9531804..12760abaeeffbd2ae67740b56dbde1d2ebea58c0 100644 (file)
@@ -12,7 +12,7 @@
 ///
 //===----------------------------------------------------------------------===//
 
-#include "MPIFunctionClassifier.h"
+#include "clang/StaticAnalyzer/Checkers/MPIFunctionClassifier.h"
 #include "llvm/ADT/STLExtras.h"
 
 namespace clang {
index 27ec950d31eb9eb55f31fde3a09e6995b5e9aa14..2e7140cd771e49d1b66376aa15c9c8cecf391c2c 100644 (file)
@@ -17,7 +17,7 @@
 #ifndef LLVM_CLANG_LIB_STATICANALYZER_CHECKERS_MPICHECKER_MPITYPES_H
 #define LLVM_CLANG_LIB_STATICANALYZER_CHECKERS_MPICHECKER_MPITYPES_H
 
-#include "MPIFunctionClassifier.h"
+#include "clang/StaticAnalyzer/Checkers/MPIFunctionClassifier.h"
 #include "clang/StaticAnalyzer/Core/PathSensitive/CallEvent.h"
 #include "llvm/ADT/SmallSet.h"
 
@@ -53,7 +53,6 @@ typedef llvm::ImmutableMap<const clang::ento::MemRegion *,
 
 } // end of namespace: mpi
 
-
 template <>
 struct ProgramStateTrait<mpi::RequestMap>
     : public ProgramStatePartialTrait<mpi::RequestMapImpl> {