//===- unittests/AST/TemplateNameTest.cpp --- Tests for TemplateName ------===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===----------------------------------------------------------------------===// #include "ASTPrint.h" #include "clang/AST/ASTContext.h" #include "clang/ASTMatchers/ASTMatchers.h" #include "llvm/Support/raw_ostream.h" #include "gtest/gtest.h" namespace clang { namespace { using namespace ast_matchers; std::string printTemplateName(TemplateName TN, const PrintingPolicy &Policy, TemplateName::Qualified Qual) { std::string Result; llvm::raw_string_ostream Out(Result); TN.print(Out, Policy, Qual); return Out.str(); } TEST(TemplateName, PrintUsingTemplate) { std::string Code = R"cpp( namespace std { template struct vector {}; } namespace absl { using std::vector; } template