summaryrefslogtreecommitdiffstats
path: root/clang
diff options
context:
space:
mode:
Diffstat (limited to 'clang')
-rw-r--r--clang/include/clang/Basic/DiagnosticSemaKinds.td5
-rw-r--r--clang/lib/Sema/SemaExprObjC.cpp4
-rw-r--r--clang/test/SemaObjC/selector-1.m2
3 files changed, 6 insertions, 5 deletions
diff --git a/clang/include/clang/Basic/DiagnosticSemaKinds.td b/clang/include/clang/Basic/DiagnosticSemaKinds.td
index 9094e9b323f..f7efbbd2efc 100644
--- a/clang/include/clang/Basic/DiagnosticSemaKinds.td
+++ b/clang/include/clang/Basic/DiagnosticSemaKinds.td
@@ -905,8 +905,9 @@ def warn_unimplemented_selector: Warning<
def warn_unimplemented_protocol_method : Warning<
"method %0 in protocol %1 not implemented">, InGroup<Protocol>;
def warning_multiple_selectors: Warning<
- "several methods with selector %0 of mismatched types are found for the @selector expression">,
- InGroup<SelectorTypeMismatch>;
+ "several methods with selector %0 of mismatched types are found "
+ "for the @selector expression">,
+ InGroup<SelectorTypeMismatch>, DefaultIgnore;
// C++ declarations
def err_static_assert_expression_is_not_constant : Error<
"static_assert expression is not an integral constant expression">;
diff --git a/clang/lib/Sema/SemaExprObjC.cpp b/clang/lib/Sema/SemaExprObjC.cpp
index d878179d781..5bffdd1573a 100644
--- a/clang/lib/Sema/SemaExprObjC.cpp
+++ b/clang/lib/Sema/SemaExprObjC.cpp
@@ -1003,8 +1003,8 @@ static bool HelperToDiagnoseMismatchedMethodsInGlobalPool(Sema &S,
static void DiagnoseMismatchedSelectors(Sema &S, SourceLocation AtLoc,
ObjCMethodDecl *Method) {
- unsigned DIAG = diag::warning_multiple_selectors;
- if (S.Diags.getDiagnosticLevel(DIAG, SourceLocation())
+ if (S.Diags.getDiagnosticLevel(diag::warning_multiple_selectors,
+ SourceLocation())
== DiagnosticsEngine::Ignored)
return;
bool Warned = false;
diff --git a/clang/test/SemaObjC/selector-1.m b/clang/test/SemaObjC/selector-1.m
index faa742616d5..8dedcdb5ea4 100644
--- a/clang/test/SemaObjC/selector-1.m
+++ b/clang/test/SemaObjC/selector-1.m
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -verify %s
+// RUN: %clang_cc1 -Wselector-type-mismatch -verify %s
@interface I
- (id) compare: (char) arg1; // expected-note {{method 'compare:' declared here}}
OpenPOWER on IntegriCloud