Biohazrd
Biohazrd copied to clipboard
Investigate extracting parameter names from comments
To avoid unused parameter warnings, C++ developers sometimes leave parameters unnamed and put the name in a comment, for example:
virtual void attachToContext(cudnnContext* /*cudnn*/, cublasContext* /*cublas*/, IGpuAllocator* /*allocator*/) TRTNOEXCEPT {}
It might be nice if we could find the commented name and surface it somehow. Unfortunately Clang's comment-to-declaration association logic does not attach these comments to the ParmVarDecl
declarations, so we can't rely on that.
The newly added AutoNameUnnamedParametersTransformation
makes this situation slightly less obnoxious. I do still want to investigate whether Clang automagically associates these comments with the parameter or not. (Maybe at the same time as https://github.com/InfectedLibraries/Biohazrd/issues/20)