diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2017-01-14 15:38:35 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2017-01-14 15:38:35 +0000 |
commit | d2e0a8dd949ab874c6d66f97106bd5c270e2fa7d (patch) | |
tree | e8a99a0386e8f6bece630700da5915c8a312c2d9 /test/SemaCXX/warn-shadow.cpp | |
parent | fdc82ccb3f2b23a89e7002fe8238e1422b00f96a (diff) |
Diffstat (limited to 'test/SemaCXX/warn-shadow.cpp')
-rw-r--r-- | test/SemaCXX/warn-shadow.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/test/SemaCXX/warn-shadow.cpp b/test/SemaCXX/warn-shadow.cpp index 9d68fe7c47a6..1316b6dd8871 100644 --- a/test/SemaCXX/warn-shadow.cpp +++ b/test/SemaCXX/warn-shadow.cpp @@ -97,3 +97,13 @@ void rdar8883302() { void test8() { int bob; // expected-warning {{declaration shadows a variable in the global namespace}} } + +namespace rdar29067894 { + +void avoidWarningWhenRedefining(int b) { // expected-note {{previous definition is here}} + int a = 0; // expected-note {{previous definition is here}} + int a = 1; // expected-error {{redefinition of 'a'}} + int b = 2; // expected-error {{redefinition of 'b'}} +} + +} |