[clang] [Clang] prevent recovery call expression from proceeding with explicit attributes and undeclared templates (PR #107786)

Aaron Ballman via cfe-commits cfe-commits at lists.llvm.org
Fri Sep 20 09:15:48 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}}
----------------
AaronBallman wrote:

These diagnostics make me think there's a different bug that we're glossing over. 1) `a` is not being used before it's declaration; the declaration is right on line 6. 2) Why does this not get an "'a' is not a template" kind of diagnostic?

https://github.com/llvm/llvm-project/pull/107786


More information about the cfe-commits mailing list