Kristof Umann | 30f0865 | 2018-06-18 11:50:17 +0000 | [diff] [blame] | 1 | // Like the compiler, the static analyzer treats some functions differently if |
| 2 | // they come from a system header -- for example, it is assumed that system |
| 3 | // functions do not arbitrarily free() their parameters, and that some bugs |
| 4 | // found in system headers cannot be fixed by the user and should be |
| 5 | // suppressed. |
| 6 | |
| 7 | #pragma clang system_header |
| 8 | |
| 9 | struct RecordInSystemHeader { |
| 10 | int a; |
| 11 | int b; |
| 12 | }; |
| 13 | |
| 14 | template <class T> |
| 15 | struct ContainerInSystemHeader { |
| 16 | T &t; |
| 17 | ContainerInSystemHeader(T& t) : t(t) {} |
| 18 | }; |