[clang] [clang-format] Correctly annotate static overloaded operator calls (PR #161944)
Björn Schäpers via cfe-commits
cfe-commits at lists.llvm.org
Sat Oct 11 11:52:19 PDT 2025
================
@@ -3802,7 +3802,7 @@ static bool isFunctionDeclarationName(const LangOptions &LangOpts,
const auto *Prev = Current.getPreviousNonComment();
assert(Prev);
- if (Prev->is(tok::coloncolon))
+ if (Prev->is(tok::coloncolon) && Prev->hasWhitespaceBefore())
----------------
HazardyKnusperkeks wrote:
Yes it can be, that was never the point of any discussion (on my side). But isn't this PR not about to not mark a function call to `::operator` as declaration? And I just show, that the same code, just with a space before `::` is annotated differently.
https://github.com/llvm/llvm-project/pull/161944
More information about the cfe-commits
mailing list