aboutsummaryrefslogtreecommitdiff
path: root/test/SemaCXX/implicit-member-functions.cpp
diff options
context:
space:
mode:
authorSebastian Redl <sebastian.redl@getdesigned.at>2010-07-08 23:07:34 +0000
committerSebastian Redl <sebastian.redl@getdesigned.at>2010-07-08 23:07:34 +0000
commitcddc69fc3fe17b043a287a41e3706766c3d09a79 (patch)
treed2d4db14b83a62da469ed5e29e5fee1810b7d045 /test/SemaCXX/implicit-member-functions.cpp
parenta93e3b5bde9f0a7b59215f19f176f7d69881b81c (diff)
When looking for an entity's Scope, don't consider scopes that can't contain declarations. Fixes PR7594.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107927 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/SemaCXX/implicit-member-functions.cpp')
-rw-r--r--test/SemaCXX/implicit-member-functions.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/test/SemaCXX/implicit-member-functions.cpp b/test/SemaCXX/implicit-member-functions.cpp
index 79cc3679f4..5333094d53 100644
--- a/test/SemaCXX/implicit-member-functions.cpp
+++ b/test/SemaCXX/implicit-member-functions.cpp
@@ -39,3 +39,14 @@ namespace PR6570 {
};
}
+
+namespace PR7594 {
+ // If the lazy declaration of special member functions is triggered
+ // in an out-of-line initializer, make sure the functions aren't in
+ // the initializer scope. This used to crash Clang:
+ struct C {
+ C();
+ static C *c;
+ };
+ C *C::c = new C();
+}