diff options
Diffstat (limited to 'test/SemaCXX/crashes.cpp')
-rw-r--r-- | test/SemaCXX/crashes.cpp | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/test/SemaCXX/crashes.cpp b/test/SemaCXX/crashes.cpp index d02704c..f5682bd 100644 --- a/test/SemaCXX/crashes.cpp +++ b/test/SemaCXX/crashes.cpp @@ -136,3 +136,38 @@ cc_YCbCr cc_hsl::YCbCr() } } + +namespace test1 { + int getString(const int*); + template<int a> class ELFObjectFile { + const int* sh; + ELFObjectFile() { + switch (*sh) { + } + int SectionName(getString(sh)); + } + }; +} + +namespace test2 { + struct fltSemantics ; + const fltSemantics &foobar(); + void VisitCastExpr(int x) { + switch (x) { + case 42: + const fltSemantics &Sem = foobar(); + } + } +} + +namespace test3 { + struct nsCSSRect { + }; + static int nsCSSRect::* sides; + nsCSSRect dimenX; + void ParseBoxCornerRadii(int y) { + switch (y) { + } + int& x = dimenX.*sides; + } +} |