[clang] [Clang] prevent recovery call expression from proceeding with explicit attributes and undeclared templates (PR #107786)
Erich Keane via cfe-commits
cfe-commits at lists.llvm.org
Mon Sep 23 13:00:54 PDT 2024
================
@@ -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}}
----------------
erichkeane wrote:
It sounds like we just need to 'try harder' to recover. A fallback that treats it as a 'non template' would probably be better. As far as the 'dependent member lookup', perhaps that needs to check for a recoveryexpr better and come up with a better recovery.
https://github.com/llvm/llvm-project/pull/107786
More information about the cfe-commits
mailing list