Extend the bitfield-truncation warning to initializations.
rdar://problem/8652606



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118773 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/SemaCXX/conversion.cpp b/test/SemaCXX/conversion.cpp
index f648943..fdda7ac 100644
--- a/test/SemaCXX/conversion.cpp
+++ b/test/SemaCXX/conversion.cpp
@@ -43,3 +43,10 @@
     return p == foo();
   }
 }
+
+namespace test2 {
+  struct A {
+    unsigned int x : 2;
+    A() : x(10) {} // expected-warning {{implicit truncation from 'int' to bitfield changes value from 10 to 2}}
+  };
+}