summaryrefslogtreecommitdiffstats
path: root/test/SemaCXX/warn-shadow.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'test/SemaCXX/warn-shadow.cpp')
-rw-r--r--test/SemaCXX/warn-shadow.cpp28
1 files changed, 28 insertions, 0 deletions
diff --git a/test/SemaCXX/warn-shadow.cpp b/test/SemaCXX/warn-shadow.cpp
index 509c344..3bf9af4 100644
--- a/test/SemaCXX/warn-shadow.cpp
+++ b/test/SemaCXX/warn-shadow.cpp
@@ -42,3 +42,31 @@ class B : A {
int data;
static int field;
};
+
+// rdar://8900456
+namespace rdar8900456 {
+struct Foo {
+ static void Baz();
+private:
+ int Bar;
+};
+
+void Foo::Baz() {
+ double Bar = 12; // Don't warn.
+}
+}
+
+// http://llvm.org/PR9160
+namespace PR9160 {
+struct V {
+ V(int);
+};
+struct S {
+ V v;
+ static void m() {
+ if (1) {
+ V v(0);
+ }
+ }
+};
+}
OpenPOWER on IntegriCloud