[clang] [Clang][Sema] Fix crash in CheckUsingDeclQualifier due to diagnostic missing an argument (PR #161277)

Erich Keane via cfe-commits cfe-commits at lists.llvm.org
Tue Sep 30 13:50:54 PDT 2025


================
@@ -430,3 +434,15 @@ void ctad_test() {
   CTAD t = s; // expected-warning {{class template argument deduction is incompatible with C++ standards before C++17}}
 }
 #endif
+
+namespace GH161702 {
+struct S {
+  enum E { A };
+  using E::A; // expected-warning {{enumeration type in nested name specifier is incompatible with C++98}}
+#ifndef CXX20COMPAT 
----------------
erichkeane wrote:

At least stop making it worse, remove the ifdef/ifndef from the new patch and add -verify=cpp20,expected for thenew line, and add notcpp20,expected to the rest.

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


More information about the cfe-commits mailing list