diff options
author | Sam McCall <sam.mccall@gmail.com> | 2018-02-02 13:34:47 +0000 |
---|---|---|
committer | Sam McCall <sam.mccall@gmail.com> | 2018-02-02 13:34:47 +0000 |
commit | e705029e94d188e30987bf3154b69a8a57aee3f1 (patch) | |
tree | c74abd6a0e9d5a00ae8db5d268663eca05dd41a2 /unittests/AST | |
parent | a2ca4ae98b35d76b14cc936af1ebf13b93199d79 (diff) | |
download | clang-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.cpp | 7 |
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")); +} |