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

2023-08-09 Thread Vassil Vassilev via Phabricator via cfe-commits
v.g.vassilev added a comment.

If you have not merged this patch please consider my comment.




Comment at: clang/test/Interpreter/namespace-template-disambiguate.cpp:7
+namespace NS2 { struct A { public: using S = int; }; }
+namespace NS2 { A::S f(A::S a); }
+

It might be a good idea to add this test to `disambiguate-decl-stmt.cpp` where 
we track these things.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D157477/new/

https://reviews.llvm.org/D157477

___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


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

2023-08-09 Thread Vassil Vassilev via Phabricator via cfe-commits
v.g.vassilev accepted this revision.
v.g.vassilev added a comment.
This revision is now accepted and ready to land.

Thanks, @Hahnfeld!


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D157477/new/

https://reviews.llvm.org/D157477

___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


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

2023-08-09 Thread Jonas Hahnfeld via Phabricator via cfe-commits
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 
 
("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  struct S {}; }
+namespace NS2 { struct A { public: using S = int; }; }
+namespace NS2 { A::S f(A::S a); }
+
+// CHECK-NOT: error


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  struct S {}; }
+namespace NS2 { struct A { public: using S = int; }; }
+namespace NS2 { A::S f(A::S a); }
+
+// CHECK-NOT: error
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits