When redefining a macro don't warn twice if it's not used and don't warn for duplicate
definition by command line options. Fixes rdar://8875916.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123767 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/Preprocessor/warn-macro-unused.c b/test/Preprocessor/warn-macro-unused.c
new file mode 100644
index 0000000..8a6d7c2
--- /dev/null
+++ b/test/Preprocessor/warn-macro-unused.c
@@ -0,0 +1,5 @@
+// RUN: %clang_cc1 %s -Wunused-macros -Dfoo -Dfoo -verify
+
+#define unused // expected-warning {{macro is not used}}
+#define unused
+unused