summaryrefslogtreecommitdiffstats
path: root/clang/test/SemaCXX/class.cpp
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2010-05-22 16:25:05 +0000
committerDouglas Gregor <dgregor@apple.com>2010-05-22 16:25:05 +0000
commit0c6f5395644a3cb838b63e48a1df00f4648cbf20 (patch)
treef41bca0b36cd6c9a5f42e5c3779e82df161f8270 /clang/test/SemaCXX/class.cpp
parent959d5a0cbd78f8e658a8ec203e675ddb164ee879 (diff)
downloadbcm5719-llvm-0c6f5395644a3cb838b63e48a1df00f4648cbf20.tar.gz
bcm5719-llvm-0c6f5395644a3cb838b63e48a1df00f4648cbf20.zip
When determining whether we can use "this", make sure to look through
enum contexts (along with block contexts, which we already did). Fixes PR7196. llvm-svn: 104444
Diffstat (limited to 'clang/test/SemaCXX/class.cpp')
-rw-r--r--clang/test/SemaCXX/class.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/clang/test/SemaCXX/class.cpp b/clang/test/SemaCXX/class.cpp
index 287f50d63a5..b5cecbcf937 100644
--- a/clang/test/SemaCXX/class.cpp
+++ b/clang/test/SemaCXX/class.cpp
@@ -147,3 +147,15 @@ namespace PR7153 {
ec.member = 0;
}
}
+
+namespace PR7196 {
+ struct A {
+ int a;
+
+ void f() {
+ char i[sizeof(a)];
+ enum { x = sizeof(i) };
+ enum { y = sizeof(a) };
+ }
+ };
+}
OpenPOWER on IntegriCloud