forked from OSchip/llvm-project
Enable security checks for arc4random() on CloudABI as well.
CloudABI also supports the arc4random() function. We can enable compiler warnings for rand(), random() and *rand48() on this system as well. llvm-svn: 231914
This commit is contained in:
parent
2b60d1eee5
commit
e5bdc8516e
|
@ -28,6 +28,7 @@ using namespace ento;
|
|||
static bool isArc4RandomAvailable(const ASTContext &Ctx) {
|
||||
const llvm::Triple &T = Ctx.getTargetInfo().getTriple();
|
||||
return T.getVendor() == llvm::Triple::Apple ||
|
||||
T.getOS() == llvm::Triple::CloudABI ||
|
||||
T.getOS() == llvm::Triple::FreeBSD ||
|
||||
T.getOS() == llvm::Triple::NetBSD ||
|
||||
T.getOS() == llvm::Triple::OpenBSD ||
|
||||
|
|
|
@ -2,6 +2,10 @@
|
|||
// RUN: %clang_cc1 -triple i386-apple-darwin10 -analyze -DUSE_BUILTINS -analyzer-checker=security.insecureAPI,security.FloatLoopCounter %s -verify
|
||||
// RUN: %clang_cc1 -triple i386-apple-darwin10 -analyze -DVARIANT -analyzer-checker=security.insecureAPI,security.FloatLoopCounter %s -verify
|
||||
// RUN: %clang_cc1 -triple i386-apple-darwin10 -analyze -DUSE_BUILTINS -DVARIANT -analyzer-checker=security.insecureAPI,security.FloatLoopCounter %s -verify
|
||||
// RUN: %clang_cc1 -triple x86_64-unknown-cloudabi -analyze -analyzer-checker=security.insecureAPI,security.FloatLoopCounter %s -verify
|
||||
// RUN: %clang_cc1 -triple x86_64-unknown-cloudabi -analyze -DUSE_BUILTINS -analyzer-checker=security.insecureAPI,security.FloatLoopCounter %s -verify
|
||||
// RUN: %clang_cc1 -triple x86_64-unknown-cloudabi -analyze -DVARIANT -analyzer-checker=security.insecureAPI,security.FloatLoopCounter %s -verify
|
||||
// RUN: %clang_cc1 -triple x86_64-unknown-cloudabi -analyze -DUSE_BUILTINS -DVARIANT -analyzer-checker=security.insecureAPI,security.FloatLoopCounter %s -verify
|
||||
|
||||
#ifdef USE_BUILTINS
|
||||
# define BUILTIN(f) __builtin_ ## f
|
||||
|
|
Loading…
Reference in New Issue