[clang] [Clang] Fixed Assertion Checking For Destructor On 'annot_cxxscope' Token (PR #221209)

Oliver Hunt via cfe-commits cfe-commits at lists.llvm.org
Mon Sep 7 20:51:09 PDT 2026


================
@@ -0,0 +1,10 @@
+// RUN: %clang_cc1 -std=c++23 -fsyntax-only -verify %s
+
+void foo1() { (auto()->bar::); }
+// expected-error at -1 {{use of undeclared identifier 'bar'}}
+// expected-error at -2 {{initializer for functional-style cast to 'auto' is empty}}
+// expected-error at -3 {{expected unqualified-id}}
----------------
ojhunt wrote:

I was wondering why the test would be correct with this change, but it's actually not - `bar` is not an undeclared identifier here, the actual error should be saying we expect an unqualified id I think.

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


More information about the cfe-commits mailing list