Previously clang considered function variants from both sides of
compilation and that sometimes resulted in picking up wrong deallocation function.
Details
Details
Diff Detail
Diff Detail
- Build Status
Buildable 22834 Build 22834: arc lint + arc unit
Event Timeline
clang-tools-extra/clang-tidy/readability/IdentifierNamingCheck.cpp | ||
---|---|---|
551 ↗ | (On Diff #164480) | I believe the isOverloadedOperator check here is redundant. The caller already checked that the name is an identifier. If you want to keep some check of this kind, I'd suggest checking D->getIdentifier() at the start of this function and removing the check here. (Note that CXXMethodDecl is not the only Decl subclass that can have a non-identifier name.) |
clang/lib/AST/DeclCXX.cpp | ||
2067–2077 | I think it would make more sense to put only the 1-parameter functions into Matches, and rename it to PreventedBy or something: then it's the list of single-parameter usual deallocation functions that prevent this one being a usual deallocation function. |
I think it would make more sense to put only the 1-parameter functions into Matches, and rename it to PreventedBy or something: then it's the list of single-parameter usual deallocation functions that prevent this one being a usual deallocation function.