[clang] [Clang][Sema] Diagnose invalid 'pure'/'const' attributes on writes (PR #217817)
Oliver Hunt via cfe-commits
cfe-commits at lists.llvm.org
Mon Aug 31 00:59:11 PDT 2026
================
@@ -1,5 +1,5 @@
-// RUN: %clang_cc1 -fsyntax-only -verify %s
-// RUN: %clang_cc1 -fsyntax-only -verify -x c++ %s
+// RUN: %clang_cc1 -fsyntax-only -verify -Winvalid-pure-attribute %s
+// RUN: %clang_cc1 -fsyntax-only -verify -Winvalid-pure-attribute -x c++ %s
----------------
ojhunt wrote:
this needs to have two cases, because you need to ensure nothing happens/crashes/fails if the flag is not set. You can use `-verify=expected,invalidpure` and then use `invalidpure-warn` etc
https://github.com/llvm/llvm-project/pull/217817
More information about the cfe-commits
mailing list