summaryrefslogtreecommitdiffstats
path: root/clang/test/AST/Interp/cxx03.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/test/AST/Interp/cxx03.cpp')
-rw-r--r--clang/test/AST/Interp/cxx03.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/clang/test/AST/Interp/cxx03.cpp b/clang/test/AST/Interp/cxx03.cpp
index d30cbb2fd7a2..b6aaf0840cfb 100644
--- a/clang/test/AST/Interp/cxx03.cpp
+++ b/clang/test/AST/Interp/cxx03.cpp
@@ -10,3 +10,17 @@ namespace NonInitializingMemberExpr {
// both-note {{required by}} \
// both-note {{subexpression not valid}}
}
+
+
+namespace NonLValueMemberExpr {
+ struct PODType {
+ int value;
+ };
+
+#define ATTR __attribute__((require_constant_initialization))
+ struct TT1 {
+ ATTR static const int &subobj_init;
+ };
+
+ const int &TT1::subobj_init = PODType().value;
+}