@@ -0,0 +1,16 @@
+// RUN: %clang_analyze_cc1 -fno-builtin
-analyzer-checker=core,alpha.unix.Stream -verify %s
+// expected-no-diagnostics
+
+typedef struct _FILE FILE;
+
+// These functions are not standard C library functions.
+FILE *tmpfile(const char *restrict path);
+FILE
@@ -0,0 +1,16 @@
+// RUN: %clang_analyze_cc1 -fno-builtin
-analyzer-checker=core,alpha.unix.Stream -verify %s
+// expected-no-diagnostics
+
+typedef struct _FILE FILE;
+
+// These functions are not standard C library functions.
+FILE *tmpfile(const char *restrict path);
+FILE
https://github.com/benshi001 updated
https://github.com/llvm/llvm-project/pull/70540
>From e7f49e4c01de58c61337c577854b33793da46e8a Mon Sep 17 00:00:00 2001
From: Ben Shi
Date: Tue, 31 Oct 2023 13:05:19 +0800
Subject: [PATCH] [clang][analyzer] Restrict 'fopen' & 'tmpfile' modeling to
POSIX
@@ -0,0 +1,16 @@
+// RUN: %clang_analyze_cc1 -fno-builtin
-analyzer-checker=core,alpha.unix.Stream -verify %s
+// expected-no-diagnostics
+
+typedef struct _FILE FILE;
+
+// These functions are not standard C library functions.
+FILE *tmpfile(const char *restrict path);
+FILE
https://github.com/steakhal requested changes to this pull request.
Still looks good to me.
I recommended a couple comments here and there to clarify the intent of the
test, and to raise awareness.
I'd suggest to reword the PR title (and the commit title ofc) to something like
`[analyzer]
@@ -0,0 +1,16 @@
+// RUN: %clang_analyze_cc1 -fno-builtin
-analyzer-checker=core,alpha.unix.Stream -verify %s
+// expected-no-diagnostics
+
+typedef struct _FILE FILE;
+
+// These functions are not standard C library functions.
+FILE *tmpfile(const char *restrict path);
+FILE
https://github.com/steakhal edited
https://github.com/llvm/llvm-project/pull/70540
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/benshi001 edited
https://github.com/llvm/llvm-project/pull/70540
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits