[PATCH] D157477: [clang-repl] Add test for disambiguation of templates

Jonas Hahnfeld via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Aug 8 23:57:23 PDT 2023


Hahnfeld created this revision.
Hahnfeld added a reviewer: v.g.vassilev.
Herald added a project: All.
Hahnfeld requested review of this revision.
Herald added a project: clang.
Herald added a subscriber: cfe-commits.

This test case was fixed in commit rG2c4620c1 <https://reviews.llvm.org/rG2c4620c1dadc032f968ce0aa835a441f268a8cdb> ("Consider the scope spec in template lookups for deduction guides."), but it is worth having a dedicated test case for `clang-repl`.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D157477

Files:
  clang/test/Interpreter/namespace-template-disambiguate.cpp


Index: clang/test/Interpreter/namespace-template-disambiguate.cpp
===================================================================
--- /dev/null
+++ clang/test/Interpreter/namespace-template-disambiguate.cpp
@@ -0,0 +1,9 @@
+// UNSUPPORTED: system-aix
+
+// RUN: cat %s | clang-repl 2>&1 | FileCheck %s
+
+namespace NS1 { template <typename T> struct S {}; }
+namespace NS2 { struct A { public: using S = int; }; }
+namespace NS2 { A::S f(A::S a); }
+
+// CHECK-NOT: error


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D157477.548481.patch
Type: text/x-patch
Size: 476 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20230809/6a676f88/attachment.bin>


More information about the cfe-commits mailing list