Microsoft has a language extension which allows union members to be
references.  What's more, they use this language extension in their
ATL header files (which come as part of MFC and the Win32 SDK).  This patch implements support for the Microsoft extension, and addresses PR13737.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@182936 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/SemaCXX/MicrosoftExtensions.cpp b/test/SemaCXX/MicrosoftExtensions.cpp
index ab3ff69..93a6d30 100644
--- a/test/SemaCXX/MicrosoftExtensions.cpp
+++ b/test/SemaCXX/MicrosoftExtensions.cpp
@@ -333,3 +333,8 @@
   c3.g(); // Overloaded incdec op operand
   c3.h(); // Overloaded unary op operand
 }
+
+union u {
+  int *i1;
+  int &i2;  // expected-warning {{union member 'i2' has reference type 'int &', which is a Microsoft extension}}
+};