[clang] [Clang][AST] Let DeclPrinter print trailing requires expressions for template parameters (PR #96864)
Haojian Wu via cfe-commits
cfe-commits at lists.llvm.org
Thu Jun 27 01:36:13 PDT 2024
================
@@ -1189,6 +1189,16 @@ void DeclPrinter::printTemplateParameters(const TemplateParameterList *Params,
Out << '>';
if (!OmitTemplateKW)
Out << ' ';
+
+ if (const Expr *RequiresClause = Params->getRequiresClause()) {
----------------
hokein wrote:
If I read the code correctly, looks like we can move this code to Line 1190 (just immediately before the above `if (!OmitTemplateKW)`)? Then we can get rid of all the `OmitTemplateKw` logic inside this if branch.
https://github.com/llvm/llvm-project/pull/96864
More information about the cfe-commits
mailing list