================
@@ -0,0 +1,32 @@
+// RUN: %clang_cc1 -fsyntax-only -verify -std=c++20 %s
+
+namespace GH49093 {
+  class B {
+  public:
+    static int a() { return 0; } // expected-note {{member is declared here}}
+    decltype(a< 0 >(0)) test;    // expected-error {{member 'a' used before 
its declaration}}
----------------
a-tarasyuk wrote:

I added the changes and the 
[test](https://github.com/llvm/llvm-project/pull/107786/files#diff-035f4e94708ebca719a751e5e44a5a761610649239bc3cec2593a670929c8d01R27-R32)
 no longer throws the _`used before its declaration`_ error. From my 
understanding, if recovery detects explicit arguments, the checker should try 
looking up candidates with templates. If it finds a match, recovery can 
continue; if not, it should throw an error and attempt typo correction. Does 
that make sense?


https://github.com/llvm/llvm-project/pull/107786
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to