[clang] [Clang] Implement the 'counted_by' attribute (PR #76348)
Bill Wendling via cfe-commits
cfe-commits at lists.llvm.org
Mon Jan 8 11:17:32 PST 2024
================
@@ -365,6 +365,10 @@ class DefaultFilterCCC final : public CorrectionCandidateCallback {
template <class C>
class DeclFilterCCC final : public CorrectionCandidateCallback {
public:
+ explicit DeclFilterCCC(const IdentifierInfo *Typo = nullptr,
+ NestedNameSpecifier *TypoNNS = nullptr)
----------------
bwendling wrote:
I was copying off of the other `CCC` classes. Perhaps it's because both arguments have default values?
Segfault seems to agree (https://stackoverflow.com/questions/4467142/why-is-explicit-allowed-for-default-constructors-and-constructors-with-2-or-more):
> One reason where it's needed is, if you have default arguments for the first parameter. The constructor becomes a default constructor, but can still be used as converting constructor
```
struct A {
explicit A(int = 0); // added it to a default constructor
};
```
https://github.com/llvm/llvm-project/pull/76348
More information about the cfe-commits
mailing list