[PATCH] D129068: [AST] Accept identical TypeConstraint referring to other template parameters.
Ilya Biryukov via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Jul 11 09:45:43 PDT 2022
ilya-biryukov added a comment.
A few NITs from my side, hopefully they can improve things a bit.
================
Comment at: clang/include/clang/AST/ASTContext.h:2676
+ /// Determine whether two 'requires' expressions are similar enough.
+ /// Use of 'requires' isn't mandatory, works with constraints expressed in
----------------
NIT: maybe be more specific here?
It's not clear what "similar enough" means without context, other comments follow the pattern.
================
Comment at: clang/lib/AST/ASTContext.cpp:6254
return false;
if (TXTC->hasExplicitTemplateArgs() != TYTC->hasExplicitTemplateArgs())
return false;
----------------
Do we even want to compare the template argument sizes here?
Would comparing only `getImmediatelyDeclaredConstraint` produce the same results?
If that's a performance optimization, we are probably better off moving it inside `isSameConstraintExpr`.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D129068/new/
https://reviews.llvm.org/D129068
More information about the cfe-commits
mailing list