Fixes issue reported in https://bugs.llvm.org/show_bug.cgi?id=33219
Details
Diff Detail
- Repository
- rL LLVM
Event Timeline
clang-tidy/readability/NonConstParameterCheck.cpp | ||
---|---|---|
146 | Please do not use auto here, as the type is not spelled out in the initialization. | |
147 | What if the parent is an ObjCMethodDecl instead? | |
148–152 | Don't we need the fixit for *all* declarations of the function? e.g., char f(char *c); // Need it here char f(char *c); // And here char f(char *c) { // And here return *c; } |
clang-tidy/readability/NonConstParameterCheck.cpp | ||
---|---|---|
147 | I don't think this checker handles objective-c |
clang-tidy/readability/NonConstParameterCheck.cpp | ||
---|---|---|
143 | You should remove the quotes around %0 and drop the getName() -- the diagnostics engine automatically handled NamedDecl subclasses and properly quotes them. | |
147 | I think it does -- it has a matcher for ParmVarDecl, which can be contained by an ObjCMethodDecl. | |
149 | const auto * | |
151 | You can drop the getName() call here as well. |
You should remove the quotes around %0 and drop the getName() -- the diagnostics engine automatically handled NamedDecl subclasses and properly quotes them.