aboutsummaryrefslogtreecommitdiff
path: root/test/CodeGenCXX/conditional-gnu-ext.cpp
diff options
context:
space:
mode:
authorEli Friedman <eli.friedman@gmail.com>2012-01-25 05:04:17 +0000
committerEli Friedman <eli.friedman@gmail.com>2012-01-25 05:04:17 +0000
commit2c0c745709c9f258f4c968bcf3e891faa9acbca6 (patch)
tree7c54366efda7a625a932f7a6b5695b4a765347c7 /test/CodeGenCXX/conditional-gnu-ext.cpp
parent8c9fe200890663e1026be25d66f0929caa87a0ca (diff)
Fix a crash for an edge case of the GNU ?: extension.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148923 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGenCXX/conditional-gnu-ext.cpp')
-rw-r--r--test/CodeGenCXX/conditional-gnu-ext.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/test/CodeGenCXX/conditional-gnu-ext.cpp b/test/CodeGenCXX/conditional-gnu-ext.cpp
index 46c5e7fab6..104a91d273 100644
--- a/test/CodeGenCXX/conditional-gnu-ext.cpp
+++ b/test/CodeGenCXX/conditional-gnu-ext.cpp
@@ -140,3 +140,11 @@ namespace test3 {
}
}
+
+namespace test4 {
+ // Make sure this doesn't crash.
+ void f() {
+ const int a = 10, b = 20;
+ const int *c = &(a ?: b);
+ }
+}