summaryrefslogtreecommitdiff
path: root/unittests/AST
diff options
context:
space:
mode:
authorSam McCall <sam.mccall@gmail.com>2018-02-02 13:34:47 +0000
committerSam McCall <sam.mccall@gmail.com>2018-02-02 13:34:47 +0000
commite705029e94d188e30987bf3154b69a8a57aee3f1 (patch)
treec74abd6a0e9d5a00ae8db5d268663eca05dd41a2 /unittests/AST
parenta2ca4ae98b35d76b14cc936af1ebf13b93199d79 (diff)
downloadclang-e705029e94d188e30987bf3154b69a8a57aee3f1.tar.gz
[AST] namespace ns { extern "C" { int X; }} prints as "ns::X", not as "X"
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@324081 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'unittests/AST')
-rw-r--r--unittests/AST/NamedDeclPrinterTest.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/unittests/AST/NamedDeclPrinterTest.cpp b/unittests/AST/NamedDeclPrinterTest.cpp
index 002bb28f37..5715a341d8 100644
--- a/unittests/AST/NamedDeclPrinterTest.cpp
+++ b/unittests/AST/NamedDeclPrinterTest.cpp
@@ -173,3 +173,10 @@ TEST(NamedDeclPrinter, TestClassWithScopedNamedEnum) {
"A",
"X::Y::A"));
}
+
+TEST(NamedDeclPrinter, TestLinkageInNamespace) {
+ ASSERT_TRUE(PrintedWrittenNamedDeclCXX11Matches(
+ "namespace X { extern \"C\" { int A; } }",
+ "A",
+ "X::A"));
+}