[clang] Force an ICE when reentrantly reading a concept decl (PR #224677)

Ian Petersen via cfe-commits cfe-commits at lists.llvm.org
Sun Sep 20 20:14:11 PDT 2026


================
@@ -3249,7 +3249,14 @@ class ImplicitConceptSpecializationDecl final
     : public Decl,
       private llvm::TrailingObjects<ImplicitConceptSpecializationDecl,
                                     TemplateArgument> {
-  unsigned NumTemplateArgs;
+  unsigned NumTemplateArgs : 31;
----------------
ispeters wrote:

Oh, I thought that might be it, but I feel like that'd be kind of brittle because `ArgsPopulated` would only exist when `!defined(NDEBUG)`. I suppose it could be initialized at the point of declaration and the assignment could also be guarded by `#ifndef DEBUG`, but it just feels messy.

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


More information about the cfe-commits mailing list