summaryrefslogtreecommitdiff
path: root/Tests/CompileFeatures/cxx_relaxed_constexpr.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Tests/CompileFeatures/cxx_relaxed_constexpr.cpp')
-rw-r--r--Tests/CompileFeatures/cxx_relaxed_constexpr.cpp10
1 files changed, 7 insertions, 3 deletions
diff --git a/Tests/CompileFeatures/cxx_relaxed_constexpr.cpp b/Tests/CompileFeatures/cxx_relaxed_constexpr.cpp
index bce82e32ac..7b3602cd5d 100644
--- a/Tests/CompileFeatures/cxx_relaxed_constexpr.cpp
+++ b/Tests/CompileFeatures/cxx_relaxed_constexpr.cpp
@@ -1,12 +1,16 @@
-struct X {
- constexpr X() : n(5) {
+struct X
+{
+ constexpr X()
+ : n(5)
+ {
n *= 2;
}
int n;
};
-constexpr int g(const int (&is)[4]) {
+constexpr int g(const int (&is)[4])
+{
X x;
int r = x.n;
for (int i = 0; i < 5; ++i)