summaryrefslogtreecommitdiffstats
path: root/test/SemaCXX/crashes.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'test/SemaCXX/crashes.cpp')
-rw-r--r--test/SemaCXX/crashes.cpp35
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;
+ }
+}
OpenPOWER on IntegriCloud