diff options
author | Douglas Gregor <dgregor@apple.com> | 2010-05-22 16:25:05 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2010-05-22 16:25:05 +0000 |
commit | 0c6f5395644a3cb838b63e48a1df00f4648cbf20 (patch) | |
tree | f41bca0b36cd6c9a5f42e5c3779e82df161f8270 /clang/test/SemaCXX/class.cpp | |
parent | 959d5a0cbd78f8e658a8ec203e675ddb164ee879 (diff) | |
download | bcm5719-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.cpp | 12 |
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) }; + } + }; +} |