Merge remote-tracking branch 'origin/swift-4.1-branch' into stable
diff --git a/docs/ReleaseNotes.rst b/docs/ReleaseNotes.rst
index 33a5d9d..6e8b005 100644
--- a/docs/ReleaseNotes.rst
+++ b/docs/ReleaseNotes.rst
@@ -69,15 +69,6 @@
``\returns`` documentation directives in the documentation comments for
declarations with a function or a block pointer type.
-- ``-Wobjc-messaging-id`` is a new, non-default warning that warns about
- message sends to unqualified ``id`` in Objective-C. This warning is useful
- for projects that would like to avoid any potential future compiler
- errors/warnings, as the system frameworks might add a method with the same
- selector which could make the message send to ``id`` ambiguous.
-
-Non-comprehensive list of changes in this release
--------------------------------------------------
-
- The compiler no longer warns about unreachable ``__builtin_unreachable``
statements.
diff --git a/include/clang/Basic/DiagnosticSemaKinds.td b/include/clang/Basic/DiagnosticSemaKinds.td
index 14b6e61..fd992e7 100644
--- a/include/clang/Basic/DiagnosticSemaKinds.td
+++ b/include/clang/Basic/DiagnosticSemaKinds.td
@@ -1201,10 +1201,6 @@
"%0 %select{parameter|return}1 type is unsupported; "
"support for vector types for this target is introduced in %2">;
-def warn_messaging_unqualified_id : Warning<
- "messaging unqualified id">, DefaultIgnore,
- InGroup<DiagGroup<"objc-messaging-id">>;
-
// C++ declarations
def err_static_assert_expression_is_not_constant : Error<
"static_assert expression is not an integral constant expression">;
diff --git a/lib/Sema/SemaExprObjC.cpp b/lib/Sema/SemaExprObjC.cpp
index 83ef799..28581ba 100644
--- a/lib/Sema/SemaExprObjC.cpp
+++ b/lib/Sema/SemaExprObjC.cpp
@@ -2705,9 +2705,6 @@
}
}
- if (ReceiverType->isObjCIdType() && !isImplicit)
- Diag(Receiver->getExprLoc(), diag::warn_messaging_unqualified_id);
-
// There's a somewhat weird interaction here where we assume that we
// won't actually have a method unless we also don't need to do some
// of the more detailed type-checking on the receiver.
diff --git a/test/SemaObjC/warn-messaging-id.mm b/test/SemaObjC/warn-messaging-id.mm
deleted file mode 100644
index 8112cfa..0000000
--- a/test/SemaObjC/warn-messaging-id.mm
+++ /dev/null
@@ -1,21 +0,0 @@
-// RUN: %clang_cc1 -fsyntax-only -verify -Wno-objc-root-class -Wobjc-messaging-id %s
-
-@interface CallMeMaybe
-
-- (void)doThing:(int)intThing;
-
-@property int thing;
-
-@end
-
-template<typename T>
-void instantiate(const T &x) {
- [x setThing: 22]; // expected-warning {{messaging unqualified id}}
-}
-
-void fn() {
- id myObject;
- [myObject doThing: 10]; // expected-warning {{messaging unqualified id}}
- [myObject setThing: 11]; // expected-warning {{messaging unqualified id}}
- instantiate(myObject); // expected-note {{in instantiation}}
-}