diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2017-02-01 21:35:00 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2017-02-01 21:35:00 +0000 |
commit | 123063377428540752bad91c7fbd536a762e31bd (patch) | |
tree | f131a156bf0b3912bc02dd7adaf4898c01c8a119 /test/Sema/diagnose_if.c | |
parent | d1b6c770bea9b3da66c6c1eb9a7c483ed7e55c1e (diff) | |
download | src-123063377428540752bad91c7fbd536a762e31bd.tar.gz src-123063377428540752bad91c7fbd536a762e31bd.zip |
Vendor import of clang release_40 branch r293807:vendor/clang/clang-release_40-r293807
Notes
Notes:
svn path=/vendor/clang/dist/; revision=313058
svn path=/vendor/clang/clang-release_40-r293807/; revision=313059; tag=vendor/clang/clang-release_40-r293807
Diffstat (limited to 'test/Sema/diagnose_if.c')
-rw-r--r-- | test/Sema/diagnose_if.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/test/Sema/diagnose_if.c b/test/Sema/diagnose_if.c index 219e393bc0cc..27689f49b431 100644 --- a/test/Sema/diagnose_if.c +++ b/test/Sema/diagnose_if.c @@ -70,14 +70,14 @@ void runVariable() { #define _overloadable __attribute__((overloadable)) -int ovl1(const char *n) _overloadable _diagnose_if(n, "oh no", "error"); // expected-note{{oh no}} -int ovl1(void *m) _overloadable; // expected-note{{candidate function}} +int ovl1(const char *n) _overloadable _diagnose_if(n, "oh no", "error"); // expected-note{{from 'diagnose_if'}} +int ovl1(void *m) _overloadable; int ovl2(const char *n) _overloadable _diagnose_if(n, "oh no", "error"); // expected-note{{candidate function}} int ovl2(char *m) _overloadable; // expected-note{{candidate function}} void overloadsYay() { ovl1((void *)0); - ovl1(""); // expected-error{{call to unavailable function}} + ovl1(""); // expected-error{{oh no}} ovl2((void *)0); // expected-error{{ambiguous}} } @@ -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" |