From 8643639ab4248ce9ecf50490d00026c88b688f77 Mon Sep 17 00:00:00 2001 From: Vassil Vassilev Date: Sat, 20 Aug 2016 14:50:22 +0000 Subject: PR28423: Compare primary declaration contexts. In certain cases (mostly coming from modules), Sema's idea of the StdNamespace does not point to the first declaration of namespace std. Patch by Cristina Cristescu! Reviewed by Richard Smith. llvm-svn: 279371 --- clang/test/SemaCXX/libstdcxx_pair_swap_hack.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'clang/test/SemaCXX/libstdcxx_pair_swap_hack.cpp') diff --git a/clang/test/SemaCXX/libstdcxx_pair_swap_hack.cpp b/clang/test/SemaCXX/libstdcxx_pair_swap_hack.cpp index 02431e02e48..6d783fe5031 100644 --- a/clang/test/SemaCXX/libstdcxx_pair_swap_hack.cpp +++ b/clang/test/SemaCXX/libstdcxx_pair_swap_hack.cpp @@ -8,6 +8,7 @@ // affected are array, pair, priority_queue, stack, and queue. // RUN: %clang_cc1 -fsyntax-only %s -std=c++11 -verify -fexceptions -fcxx-exceptions -DCLASS=array +// RUN: %clang_cc1 -fsyntax-only %s -std=c++11 -verify -fexceptions -fcxx-exceptions -DCLASS=array -DPR28423 // RUN: %clang_cc1 -fsyntax-only %s -std=c++11 -verify -fexceptions -fcxx-exceptions -DCLASS=pair // RUN: %clang_cc1 -fsyntax-only %s -std=c++11 -verify -fexceptions -fcxx-exceptions -DCLASS=priority_queue // RUN: %clang_cc1 -fsyntax-only %s -std=c++11 -verify -fexceptions -fcxx-exceptions -DCLASS=stack @@ -21,6 +22,10 @@ #ifdef BE_THE_HEADER #pragma GCC system_header +#ifdef PR28423 +using namespace std; +#endif + namespace std { template void swap(T &, T &); template void do_swap(T &a, T &b) noexcept(noexcept(swap(a, b))) { -- cgit v1.2.3