aboutsummaryrefslogtreecommitdiffstats
path: root/test/Sema/diagnose_if.c
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2017-02-01 21:35:00 +0000
committerDimitry Andric <dim@FreeBSD.org>2017-02-01 21:35:00 +0000
commit123063377428540752bad91c7fbd536a762e31bd (patch)
treef131a156bf0b3912bc02dd7adaf4898c01c8a119 /test/Sema/diagnose_if.c
parentd1b6c770bea9b3da66c6c1eb9a7c483ed7e55c1e (diff)
downloadsrc-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.c9
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"