[clang] [Clang] Fix handling of references to variable templates with an empty argument list (PR #191154)
Shafik Yaghmour via cfe-commits
cfe-commits at lists.llvm.org
Fri Apr 17 20:05:22 PDT 2026
================
@@ -3279,14 +3279,10 @@ class OverloadExpr : public Expr {
/// Determines whether this expression had explicit template arguments.
bool hasExplicitTemplateArgs() const {
- if (!hasTemplateKWAndArgsInfo())
- return false;
- // FIXME: deduced function types can have "hidden" args and no <
- // investigate that further, but ultimately maybe we want to model concepts
- // reference with another kind of expression.
- return (isConceptReference() || isVarDeclReference())
- ? getTrailingASTTemplateKWAndArgsInfo()->NumTemplateArgs
- : getLAngleLoc().isValid();
+ if (getLAngleLoc().isValid())
+ return true;
+ return hasTemplateKWAndArgsInfo() &&
----------------
shafik wrote:
So `getLAngleLoc()` starts w/ `!hasTemplateKWAndArgsInfo()` and so it is a bit unclear going through the code paths what this is checking for in totality. It seems like it is worth a more extended comment.
https://github.com/llvm/llvm-project/pull/191154
More information about the cfe-commits
mailing list