diff options
Diffstat (limited to 'test/SemaCXX/conversion.cpp')
-rw-r--r-- | test/SemaCXX/conversion.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
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 @@ namespace test1 { 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}} + }; +} |