diff options
author | Jordan Rose <jordan_rose@apple.com> | 2013-02-01 19:50:01 +0000 |
---|---|---|
committer | Jordan Rose <jordan_rose@apple.com> | 2013-02-01 19:50:01 +0000 |
commit | 8c888b10fdd2846885e8582b131fa076ce1b77b1 (patch) | |
tree | 50278de391cbaad21652e9967f247f5aaabe5951 | |
parent | 5500fc193af4b786bbbbee6ece743f523448e90b (diff) |
[analyzer] Explain why we have system-header-simulator*.h files.
Suggested by Csaba. Text based on an e-mail of mine on cfe-dev.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@174213 91177308-0d34-0410-b5e6-96231b3b80d8
4 files changed, 20 insertions, 1 deletions
diff --git a/test/Analysis/Inputs/system-header-simulator-cxx.h b/test/Analysis/Inputs/system-header-simulator-cxx.h index e762d0a1bd..faca0b41aa 100644 --- a/test/Analysis/Inputs/system-header-simulator-cxx.h +++ b/test/Analysis/Inputs/system-header-simulator-cxx.h @@ -1,3 +1,8 @@ +// Like the compiler, the static analyzer treats some functions differently if +// they come from a system header -- for example, it is assumed that system +// functions do not arbitrarily free() their parameters, and that some bugs +// found in system headers cannot be fixed by the user and should be +// suppressed. #pragma clang system_header namespace std { diff --git a/test/Analysis/Inputs/system-header-simulator-for-simple-stream.h b/test/Analysis/Inputs/system-header-simulator-for-simple-stream.h index 99986f4549..f08f3f6e3a 100644 --- a/test/Analysis/Inputs/system-header-simulator-for-simple-stream.h +++ b/test/Analysis/Inputs/system-header-simulator-for-simple-stream.h @@ -1,4 +1,8 @@ - +// Like the compiler, the static analyzer treats some functions differently if +// they come from a system header -- for example, it is assumed that system +// functions do not arbitrarily free() their parameters, and that some bugs +// found in system headers cannot be fixed by the user and should be +// suppressed. #pragma clang system_header typedef struct __sFILE { diff --git a/test/Analysis/Inputs/system-header-simulator-objc.h b/test/Analysis/Inputs/system-header-simulator-objc.h index a647b37404..ecc99e17c4 100644 --- a/test/Analysis/Inputs/system-header-simulator-objc.h +++ b/test/Analysis/Inputs/system-header-simulator-objc.h @@ -1,3 +1,8 @@ +// Like the compiler, the static analyzer treats some functions differently if +// they come from a system header -- for example, it is assumed that system +// functions do not arbitrarily free() their parameters, and that some bugs +// found in system headers cannot be fixed by the user and should be +// suppressed. #pragma clang system_header typedef unsigned int UInt32; diff --git a/test/Analysis/Inputs/system-header-simulator.h b/test/Analysis/Inputs/system-header-simulator.h index e28b890603..4c12131645 100644 --- a/test/Analysis/Inputs/system-header-simulator.h +++ b/test/Analysis/Inputs/system-header-simulator.h @@ -1,3 +1,8 @@ +// Like the compiler, the static analyzer treats some functions differently if +// they come from a system header -- for example, it is assumed that system +// functions do not arbitrarily free() their parameters, and that some bugs +// found in system headers cannot be fixed by the user and should be +// suppressed. #pragma clang system_header typedef struct _FILE FILE; |