diff options
author | Douglas Gregor <dgregor@apple.com> | 2010-06-29 17:53:46 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2010-06-29 17:53:46 +0000 |
commit | 6699220f73f11e471b5e5aa42eaf064afeaa079e (patch) | |
tree | 6663c5dc426db19b2be9abbc586ad8799806c94a /test/SemaCXX/using-directive.cpp | |
parent | 6623584c0ec508110d75572eef092bf98fedf3f4 (diff) |
Allow a using directive to refer to the implicitly-defined namespace
"std", with a warning, to improve GCC compatibility. Fixes PR7517.
As a drive-by, add typo correction for using directives.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107172 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/SemaCXX/using-directive.cpp')
-rw-r--r-- | test/SemaCXX/using-directive.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/test/SemaCXX/using-directive.cpp b/test/SemaCXX/using-directive.cpp index 0d5c8400ab..162f7fa07a 100644 --- a/test/SemaCXX/using-directive.cpp +++ b/test/SemaCXX/using-directive.cpp @@ -121,3 +121,8 @@ extern "C++" { } void f4() { f2(1); } + +// PR7517 +using namespace std; // expected-warning{{using directive refers to implicitly-defined namespace 'std'}} +using namespace ::std; // expected-warning{{using directive refers to implicitly-defined namespace 'std'}} + |