[clang] [Clang][Sema] Disable checking invalid template id in initializer of primary variable template `std::format_kind` with libstdc++ (PR #139560)
Erich Keane via cfe-commits
cfe-commits at lists.llvm.org
Mon May 12 10:06:37 PDT 2025
================
@@ -4383,6 +4383,11 @@ Sema::CheckVarTemplateId(VarTemplateDecl *Template, SourceLocation TemplateLoc,
};
if (VarDecl *Var = Template->getTemplatedDecl();
+ // Skipping std::format_kind in libstdc++ is a hack for
+ // GH139067 / https://gcc.gnu.org/bugzilla/show_bug.cgi?id=120190
+ !(Var->getName() == "format_kind" &&
+ Var->getDeclContext()->isStdNamespace() &&
+ PP.isMacroDefined("__GLIBCXX__")) &&
----------------
erichkeane wrote:
It would be great if we could find some sort of way to check the actual VERSION of the hack once they fix this, but it doesn't look like they have a fix in flight.
https://github.com/llvm/llvm-project/pull/139560
More information about the cfe-commits
mailing list