diff options
author | Hans Wennborg <hans@hanshq.net> | 2017-02-01 17:10:26 +0000 |
---|---|---|
committer | Hans Wennborg <hans@hanshq.net> | 2017-02-01 17:10:26 +0000 |
commit | 5eb0ba0f845af0eb3cc9d2b594385435c368994a (patch) | |
tree | bb51198281588ffc0451ab73bd82f741b9fc220b /test/Sema/diagnose_if.c | |
parent | dff88e090e4672426dfdb219b0a6f804d7768c7a (diff) |
Merging r291963:
------------------------------------------------------------------------
r291963 | ericwf | 2017-01-13 14:11:40 -0800 (Fri, 13 Jan 2017) | 9 lines
[clang] Emit `diagnose_if` warnings from system headers
Summary: In order for libc++ to meaningfully use `diagnose_if` warnings they need to be emitted from system headers by default. This patch changes the `diagnose_if` warning diagnostic to be shown in system headers.
Reviewers: george.burgess.iv, rsmith, aaron.ballman
Subscribers: cfe-commits
Differential Revision: https://reviews.llvm.org/D28703
------------------------------------------------------------------------
git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_40@293783 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Sema/diagnose_if.c')
-rw-r--r-- | test/Sema/diagnose_if.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/test/Sema/diagnose_if.c b/test/Sema/diagnose_if.c index 219e393bc0..6dd8bafe8b 100644 --- a/test/Sema/diagnose_if.c +++ b/test/Sema/diagnose_if.c @@ -150,3 +150,6 @@ void alwaysWarnWithArg(int a) _diagnose_if(1 || a, "alwaysWarn", "warning"); // void runAlwaysWarnWithArg(int a) { alwaysWarnWithArg(a); // expected-warning{{alwaysWarn}} } + +// Test that diagnose_if warnings generated in system headers are not ignored. +#include "Inputs/diagnose-if-warn-system-header.h" |