diff options
author | Artem Dergachev <artem.dergachev@gmail.com> | 2016-11-02 19:35:20 +0000 |
---|---|---|
committer | Artem Dergachev <artem.dergachev@gmail.com> | 2016-11-02 19:35:20 +0000 |
commit | 47fec16cd11d6d8b64295ece07df00ed46604412 (patch) | |
tree | 5411b8107ac50606c9ebedaaeb3618045970f049 /clang/test/Analysis/std-c-library-functions.c | |
parent | e288eef32256baf32968b7540c6ca29e51749f5c (diff) | |
download | bcm5719-llvm-47fec16cd11d6d8b64295ece07df00ed46604412.tar.gz bcm5719-llvm-47fec16cd11d6d8b64295ece07df00ed46604412.zip |
[analyzer] StdLibraryFunctions: provide platform-specific function summaries.
Because standard functions can be defined differently on different platforms,
this commit introduces a method for constructing summaries with multiple
variants, whichever matches better. It is also useful for supporting overloads.
Differential Revision: https://reviews.llvm.org/D25940
llvm-svn: 285852
Diffstat (limited to 'clang/test/Analysis/std-c-library-functions.c')
-rw-r--r-- | clang/test/Analysis/std-c-library-functions.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/clang/test/Analysis/std-c-library-functions.c b/clang/test/Analysis/std-c-library-functions.c index c7c47c3c3da..6b78a26d44b 100644 --- a/clang/test/Analysis/std-c-library-functions.c +++ b/clang/test/Analysis/std-c-library-functions.c @@ -1,4 +1,8 @@ +// RUN: %clang_cc1 -analyze -analyzer-checker=unix.StdCLibraryFunctions,debug.ExprInspection -verify %s +// RUN: %clang_cc1 -triple i686-unknown-linux -analyze -analyzer-checker=unix.StdCLibraryFunctions,debug.ExprInspection -verify %s // RUN: %clang_cc1 -triple x86_64-unknown-linux -analyze -analyzer-checker=unix.StdCLibraryFunctions,debug.ExprInspection -verify %s +// RUN: %clang_cc1 -triple armv7-a15-linux -analyze -analyzer-checker=unix.StdCLibraryFunctions,debug.ExprInspection -verify %s +// RUN: %clang_cc1 -triple thumbv7-a15-linux -analyze -analyzer-checker=unix.StdCLibraryFunctions,debug.ExprInspection -verify %s void clang_analyzer_eval(int); @@ -23,7 +27,7 @@ void test_fgets(FILE *fp) { } -typedef unsigned long size_t; +typedef typeof(sizeof(int)) size_t; typedef signed long ssize_t; ssize_t read(int, void *, size_t); ssize_t write(int, const void *, size_t); |