Skip to content

Commit

Permalink
[clang-repl] Additional test for disambiguation of templates
Browse files Browse the repository at this point in the history
This test case was fixed in commit 2c4620c ("Consider the scope spec
in template lookups for deduction guides."), but it is worth having a
dedicated test case with a templated struct and a using declaration.

Differential Revision: https://reviews.llvm.org/D157477
  • Loading branch information
hahnjo committed Aug 9, 2023
1 parent 99475f5 commit da555f7
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions clang/test/Interpreter/disambiguate-decl-stmt.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ extern "C" int printf(const char*,...);
namespace ns1 { template<typename T> void tmplt(T &) {}}
int arg_tmplt = 12; ns1::tmplt(arg_tmplt);

namespace ns2 { template <typename T> struct S {}; }
namespace ns3 { struct A { public: using S = int; }; }
namespace ns3 { A::S f(A::S a); }

// ParseStatementOrDeclaration returns multiple statements.
#ifdef MS
int g_bFlag = 1;
Expand Down

0 comments on commit da555f7

Please sign in to comment.