summaryrefslogtreecommitdiff
path: root/test/Parser/cxx1z-nested-namespace-definition.cpp
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2019-08-20 17:59:23 +0000
committerDimitry Andric <dim@FreeBSD.org>2019-08-20 17:59:23 +0000
commit9a83721404652cea39e9f02ae3e3b5c964602a5c (patch)
tree23e9541ce27049a103f6ed046be61592123e02c9 /test/Parser/cxx1z-nested-namespace-definition.cpp
parent676fbe8105eeb6ff4bb2ed261cb212fcfdbe7b63 (diff)
Notes
Diffstat (limited to 'test/Parser/cxx1z-nested-namespace-definition.cpp')
-rw-r--r--test/Parser/cxx1z-nested-namespace-definition.cpp38
1 files changed, 0 insertions, 38 deletions
diff --git a/test/Parser/cxx1z-nested-namespace-definition.cpp b/test/Parser/cxx1z-nested-namespace-definition.cpp
deleted file mode 100644
index e0c5244a37348..0000000000000
--- a/test/Parser/cxx1z-nested-namespace-definition.cpp
+++ /dev/null
@@ -1,38 +0,0 @@
-// RUN: cp %s %t
-// RUN: %clang_cc1 -fsyntax-only -verify %s -std=c++98
-// RUN: not %clang_cc1 -x c++ -fixit %t -Werror -DFIXIT
-// RUN: %clang_cc1 -x c++ %t -DFIXIT
-// RUN: %clang_cc1 -fsyntax-only -verify %s -std=c++17 -Wc++14-compat
-
-namespace foo1::foo2::foo3 {
-#if __cplusplus <= 201400L
-// expected-warning@-2 {{nested namespace definition is a C++17 extension; define each namespace separately}}
-#else
-// expected-warning@-4 {{nested namespace definition is incompatible with C++ standards before C++17}}
-#endif
- int foo(int x) { return x; }
-}
-
-#ifndef FIXIT
-inline namespace goo::bar { // expected-error {{nested namespace definition cannot be 'inline'}} expected-warning 0-1{{C++11 feature}}
- int n;
-}
-
-int m = goo::bar::n;
-#endif
-
-int foo(int x) {
- return foo1::foo2::foo3::foo(x);
-}
-
-namespace bar1 {
- namespace bar2 {
- namespace bar3 {
- int bar(int x) { return x; }
- }
- }
-}
-
-int bar(int x) {
- return bar1::bar2::bar3::bar(x);
-}