diff options
author | Alexis Hunt <alercah@gmail.com> | 2011-05-17 00:19:05 +0000 |
---|---|---|
committer | Alexis Hunt <alercah@gmail.com> | 2011-05-17 00:19:05 +0000 |
commit | 8b4551844c1b5114c855b672dd69f61da15f4028 (patch) | |
tree | b03d35141bf3824250b90b576b98bff93776b030 /clang/test/SemaCXX/default-constructor-initializers.cpp | |
parent | 54459240e3967bf05aeee38e6559c3a7fd724d48 (diff) | |
download | bcm5719-llvm-8b4551844c1b5114c855b672dd69f61da15f4028.tar.gz bcm5719-llvm-8b4551844c1b5114c855b672dd69f61da15f4028.zip |
Implement some tests for defaulted constructors. To do this I had to
suppress an error we were previously emitting on valid union code.
llvm-svn: 131440
Diffstat (limited to 'clang/test/SemaCXX/default-constructor-initializers.cpp')
-rw-r--r-- | clang/test/SemaCXX/default-constructor-initializers.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/clang/test/SemaCXX/default-constructor-initializers.cpp b/clang/test/SemaCXX/default-constructor-initializers.cpp index 9da85567bed..e783f498260 100644 --- a/clang/test/SemaCXX/default-constructor-initializers.cpp +++ b/clang/test/SemaCXX/default-constructor-initializers.cpp @@ -59,3 +59,10 @@ namespace PR7948 { struct S { const int x; ~S(); }; const S arr[2] = { { 42 } }; } + +// This is valid +union U { + const int i; + float f; +}; +U u; |