[clang] 643dee9 - [analyzer] Move fuchsia.Lock checker to alpha
Gabor Horvath via cfe-commits
cfe-commits at lists.llvm.org
Wed Feb 5 16:11:20 PST 2020
Author: Gabor Horvath
Date: 2020-02-05T16:11:06-08:00
New Revision: 643dee903cebdfc5e0101d305add6a5235211465
URL: https://github.com/llvm/llvm-project/commit/643dee903cebdfc5e0101d305add6a5235211465
DIFF: https://github.com/llvm/llvm-project/commit/643dee903cebdfc5e0101d305add6a5235211465.diff
LOG: [analyzer] Move fuchsia.Lock checker to alpha
Differential Revision: https://reviews.llvm.org/D74004
Added:
Modified:
clang/include/clang/StaticAnalyzer/Checkers/Checkers.td
clang/lib/StaticAnalyzer/Checkers/PthreadLockChecker.cpp
clang/test/Analysis/fuchsia_lock.c
clang/test/Analysis/fuchsia_lock_impl.c
Removed:
################################################################################
diff --git a/clang/include/clang/StaticAnalyzer/Checkers/Checkers.td b/clang/include/clang/StaticAnalyzer/Checkers/Checkers.td
index 50610de6843e..76cf92af9113 100644
--- a/clang/include/clang/StaticAnalyzer/Checkers/Checkers.td
+++ b/clang/include/clang/StaticAnalyzer/Checkers/Checkers.td
@@ -109,6 +109,7 @@ def CloneDetectionAlpha : Package<"clone">, ParentPackage<Alpha>;
def NonDeterminismAlpha : Package<"nondeterminism">, ParentPackage<Alpha>;
def Fuchsia : Package<"fuchsia">;
+def FuchsiaAlpha : Package<"fuchsia">, ParentPackage<Alpha>;
//===----------------------------------------------------------------------===//
// Core Checkers.
@@ -1477,6 +1478,10 @@ def FuchsiaHandleChecker : Checker<"HandleChecker">,
HelpText<"A Checker that detect leaks related to Fuchsia handles">,
Documentation<HasDocumentation>;
+}
+
+let ParentPackage = FuchsiaAlpha in {
+
def FuchsiaLockChecker : Checker<"Lock">,
HelpText<"Check for the correct usage of locking APIs.">,
Dependencies<[PthreadLockBase]>,
diff --git a/clang/lib/StaticAnalyzer/Checkers/PthreadLockChecker.cpp b/clang/lib/StaticAnalyzer/Checkers/PthreadLockChecker.cpp
index 0bfe3b890e94..b89e1671cfad 100644
--- a/clang/lib/StaticAnalyzer/Checkers/PthreadLockChecker.cpp
+++ b/clang/lib/StaticAnalyzer/Checkers/PthreadLockChecker.cpp
@@ -13,6 +13,8 @@
// * FuchsiaLocksChecker, which is also rather similar.
// * C11LockChecker which also closely follows Pthread semantics.
//
+// TODO: Path notes.
+//
//===----------------------------------------------------------------------===//
#include "clang/StaticAnalyzer/Checkers/BuiltinCheckerRegistration.h"
diff --git a/clang/test/Analysis/fuchsia_lock.c b/clang/test/Analysis/fuchsia_lock.c
index 9f2a7ec09fa3..944220f89f2b 100644
--- a/clang/test/Analysis/fuchsia_lock.c
+++ b/clang/test/Analysis/fuchsia_lock.c
@@ -1,4 +1,4 @@
-// RUN: %clang_analyze_cc1 -analyzer-checker=fuchsia.Lock -verify %s
+// RUN: %clang_analyze_cc1 -analyzer-checker=alpha.fuchsia.Lock -verify %s
typedef int spin_lock_t;
typedef int zx_status_t;
diff --git a/clang/test/Analysis/fuchsia_lock_impl.c b/clang/test/Analysis/fuchsia_lock_impl.c
index e4c5ea501c3a..03b4a6390a69 100644
--- a/clang/test/Analysis/fuchsia_lock_impl.c
+++ b/clang/test/Analysis/fuchsia_lock_impl.c
@@ -1,4 +1,4 @@
-// RUN: %clang_analyze_cc1 -analyzer-checker=fuchsia.Lock -verify %s
+// RUN: %clang_analyze_cc1 -analyzer-checker=alpha.fuchsia.Lock -verify %s
// expected-no-diagnostics
typedef int spin_lock_t;
More information about the cfe-commits
mailing list