================
@@ -415,6 +415,17 @@ class ResultBuilder {
bool IsImpossibleToSatisfy(const NamedDecl *ND) const;
//@}
};
+
+const FunctionDecl *BetterSignature(const FunctionDecl *Function,
+ unsigned Start) {
+ // Note that `redecls()` traverses in a circular order from the current decl,
+ // so for consistency we have to first get the first declaration.
+ for (auto *Redecl : Function->getFirstDecl()->redecls())
----------------
timon-ul wrote:
I am a bit confused why there is `getFirstDecl` and `getCanonicalDecl`, it
seems like the latter resolves to the first for any case I could find so far,
but maybe there is a case where it does not and maybe for that case it makes
more sense to return the canonical one? Idk.
https://github.com/llvm/llvm-project/pull/206716
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits