summaryrefslogtreecommitdiffstats
path: root/clang/test/SemaCXX/cxx0x-nontrivial-union.cpp
Commit message (Collapse)AuthorAgeFilesLines
* [Sema] Fix PR22637 - IndirectFieldDecl's discard qualifiers during template ↵Eric Fiselier2018-04-081-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | instantiation. Summary: Currently Clang fails to propagate qualifiers from the `CXXThisExpr` to the rebuilt `FieldDecl` for IndirectFieldDecls. For example: ``` template <class T> struct Foo { struct { int x; }; int y; void foo() const { static_assert(__is_same(int const&, decltype((y)))); static_assert(__is_same(int const&, decltype((x)))); // assertion fails } }; template struct Foo<int>; ``` The fix is to delegate rebuilding of the MemberExpr to `BuildFieldReferenceExpr` which correctly propagates the qualifiers. Reviewers: rsmith, lebedev.ri, aaron.ballman, bkramer, rjmccall Reviewed By: rjmccall Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D45412 llvm-svn: 329517
* Don't check for triviality on fields of templated records. We can't know theNick Lewycky2013-06-251-0/+22
| | | | | | answer until after instantiation. Fixes PR16061! llvm-svn: 184890
* Add a pile of tests for unrestricted unions, and advertise support for them.Richard Smith2012-03-031-0/+93
| | | | llvm-svn: 151992
* Don't assert when trying to diagnose why a class with a constructor template isRichard Smith2012-02-261-0/+4
| | | | | | non-trivial. llvm-svn: 151486
* C++11 allows unions to have static data members. Remove the correspondingRichard Smith2012-02-161-1/+6
| | | | | | restriction and add some tests. llvm-svn: 150721
* Update all tests other than Driver/std.cpp to use -std=c++11 rather thanRichard Smith2011-10-131-1/+1
| | | | | | -std=c++0x. Patch by Ahmed Charles! llvm-svn: 141900
* Implement the new C++0x rules for non-trivial things in unions so thatAlexis Hunt2011-05-161-0/+22
my defaulted constructor tests stop yelling at me about them. llvm-svn: 131432
OpenPOWER on IntegriCloud