diff options
author | Alex Lorenz <arphaman@gmail.com> | 2018-01-03 23:52:42 +0000 |
---|---|---|
committer | Alex Lorenz <arphaman@gmail.com> | 2018-01-03 23:52:42 +0000 |
commit | 26d282fc5f37bef3623d88c14560063b5d68bf7c (patch) | |
tree | 4efadf2e3c077ccdfd9801cd156ab3e95b3e5a39 /clang/test/SemaObjC | |
parent | f2b2169ded69b5e760ed44894c5c5570eb4cc40e (diff) | |
download | bcm5719-llvm-26d282fc5f37bef3623d88c14560063b5d68bf7c.tar.gz bcm5719-llvm-26d282fc5f37bef3623d88c14560063b5d68bf7c.zip |
PR35815: Separate out the ns-consumed diagnostic into an error and
a warning
This commit separates out the warn_nsconsumed_attribute_mismatch and
warn_nsreturns_retained_attribute_mismatch diagnostic into a warning and error.
This is needed to avoid a module import regression introduced by r313717 that
turned these errors into warnings and started promoting them only when needed,
which caused an error when importing a module as it had different warning
settings.
rdar://36265651
llvm-svn: 321775
Diffstat (limited to 'clang/test/SemaObjC')
-rw-r--r-- | clang/test/SemaObjC/Inputs/module.map | 3 | ||||
-rw-r--r-- | clang/test/SemaObjC/ns-consumed-error-not-warning.m | 13 |
2 files changed, 16 insertions, 0 deletions
diff --git a/clang/test/SemaObjC/Inputs/module.map b/clang/test/SemaObjC/Inputs/module.map new file mode 100644 index 00000000000..492d4c368eb --- /dev/null +++ b/clang/test/SemaObjC/Inputs/module.map @@ -0,0 +1,3 @@ +module empty { + header "empty.h" +} diff --git a/clang/test/SemaObjC/ns-consumed-error-not-warning.m b/clang/test/SemaObjC/ns-consumed-error-not-warning.m new file mode 100644 index 00000000000..f44cc8f0f60 --- /dev/null +++ b/clang/test/SemaObjC/ns-consumed-error-not-warning.m @@ -0,0 +1,13 @@ +// RUN: rm -rf %t +// RUN: %clang_cc1 -fsyntax-only -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -I %S/Inputs -fobjc-arc -verify -fblocks -triple x86_64-apple-darwin10.0.0 -DOBJCARC %s +// rdar://36265651 + +@interface A +-(void) m:(id)p; // expected-note {{parameter declared here}} +@end + +@interface B : A +-(void) m:(__attribute__((ns_consumed)) id)p; // expected-error {{overriding method has mismatched ns_consumed attribute on its parameter}} +@end + +@import empty; |