aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2011-06-14 05:46:29 +0000
committerChris Lattner <sabre@nondot.org>2011-06-14 05:46:29 +0000
commit24c38e1ff057ce49c866294bf486444255e18f31 (patch)
treee010dddc279842f364f17d054ac906c223c2f1eb /test
parent0adde128d96a73864569516e684faa570e3c0333 (diff)
fix rdar://9204520 - Accept int(0.85 * 10) as an initializer in a class member
as an extension. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@132980 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test')
-rw-r--r--test/SemaCXX/i-c-e-cxx.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/test/SemaCXX/i-c-e-cxx.cpp b/test/SemaCXX/i-c-e-cxx.cpp
index 2d08ea9a42..186e32126a 100644
--- a/test/SemaCXX/i-c-e-cxx.cpp
+++ b/test/SemaCXX/i-c-e-cxx.cpp
@@ -42,3 +42,16 @@ namespace pr6206 {
void pr6373(const unsigned x = 0) {
unsigned max = 80 / x;
}
+
+
+// rdar://9204520
+namespace rdar9204520 {
+
+struct A {
+ static const int B = int(0.75 * 1000 * 1000);
+};
+
+int foo() { return A::B; }
+}
+
+