Commit 643dee90 authored by Gabor Horvath's avatar Gabor Horvath
Browse files

[analyzer] Move fuchsia.Lock checker to alpha

Differential Revision: https://reviews.llvm.org/D74004
parent 014ea933
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -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]>,
+2 −0
Original line number Diff line number Diff line
@@ -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"
+1 −1
Original line number Diff line number Diff line
// 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;
+1 −1
Original line number Diff line number Diff line
// 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;