Fix <rdar://problem/6261178> clang-on-xcode: [sema] multiple method warning is over enthusiastic.
Fix <rdar://problem/6265257> warnings for ambiguous message send swamp other warnings.

Reworked Sema::MatchTwoMethodDeclarations() to optionally match based on method size and alignment (the default in GCC). Changed Sema::LookupInstanceMethodInGlobalPool() to use this feature.

Added -Wno-struct-selector-match to driver, however didn't hook it up yet. Added a FIXME that says this.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57898 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/Driver/clang.cpp b/Driver/clang.cpp
index fcd4d5a..c2afe5b 100644
--- a/Driver/clang.cpp
+++ b/Driver/clang.cpp
@@ -595,6 +595,11 @@
 WarnImplicitFunctionDeclaration("Wimplicit-function-declaration",
    llvm::cl::desc("Warn about uses of implicitly defined functions"));
 
+static llvm::cl::opt<bool>
+WarnNoStrictSelectorMatch("Wno-strict-selector-match",
+   llvm::cl::desc("Do not warn about duplicate methods that have the same size and alignment"),
+   llvm::cl::init(true));
+
 /// InitializeDiagnostics - Initialize the diagnostic object, based on the
 /// current command line option settings.
 static void InitializeDiagnostics(Diagnostic &Diags) {