diff options
author | Anna Zaks <ganna@apple.com> | 2013-02-07 23:05:43 +0000 |
---|---|---|
committer | Anna Zaks <ganna@apple.com> | 2013-02-07 23:05:43 +0000 |
commit | acdc13cb00591e2ab2b168c7924d7eb57fa4808e (patch) | |
tree | 2bb86597344e1dc645c2501fc028214b3f8bdd17 /clang/test/Analysis/Inputs/system-header-simulator-for-simple-stream.h | |
parent | 7c1f408636d2d2cb2bc5890735d6cac1658dd28e (diff) | |
download | bcm5719-llvm-acdc13cb00591e2ab2b168c7924d7eb57fa4808e.tar.gz bcm5719-llvm-acdc13cb00591e2ab2b168c7924d7eb57fa4808e.zip |
[analyzer] Add pointer escape type param to checkPointerEscape callback
The checkPointerEscape callback previously did not specify how a
pointer escaped. This change includes an enum which describes the
different ways a pointer may escape. This enum is passed to the
checkPointerEscape callback when a pointer escapes. If the escape
is due to a function call, the call is passed. This changes
previous behavior where the call is passed as NULL if the escape
was due to indirectly invalidating the region the pointer referenced.
A patch by Branden Archer!
llvm-svn: 174677
Diffstat (limited to 'clang/test/Analysis/Inputs/system-header-simulator-for-simple-stream.h')
-rw-r--r-- | clang/test/Analysis/Inputs/system-header-simulator-for-simple-stream.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/clang/test/Analysis/Inputs/system-header-simulator-for-simple-stream.h b/clang/test/Analysis/Inputs/system-header-simulator-for-simple-stream.h index f08f3f6e3ab..b65b7a6b0e7 100644 --- a/clang/test/Analysis/Inputs/system-header-simulator-for-simple-stream.h +++ b/clang/test/Analysis/Inputs/system-header-simulator-for-simple-stream.h @@ -13,3 +13,9 @@ int fputc(int, FILE *); int fputs(const char * restrict, FILE * restrict) __asm("_" "fputs" ); int fclose(FILE *); void exit(int); + +// The following is a fake system header function +typedef struct __FileStruct { + FILE * p; +} FileStruct; +void fakeSystemHeaderCall(FileStruct *); |