History log of /llvm-project/clang-tools-extra/clang-tidy/misc/MiscTidyModule.cpp (Results 101 – 102 of 102)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
# 35c3f61d 18-Mar-2014 Peter Collingbourne <peter@pcc.me.uk>

Add an argument comment checker to clang-tidy.

This checks that parameters named in comments that appear before arguments in
function and constructor calls match the parameter name used in the calle

Add an argument comment checker to clang-tidy.

This checks that parameters named in comments that appear before arguments in
function and constructor calls match the parameter name used in the callee's
declaration. For example:

void f(int x, int y);

void g() {
f(/*y=*/0, /*z=*/0);
}

contains two violations of the policy, as the names 'x' and 'y' used in the
declaration do not match names 'y' and 'z' used at the call site.

I think there is significant value in being able to check/enforce this policy
as a way of guarding against accidental API misuse and silent breakages
caused by API changes.

Although this pattern appears somewhat frequently in the LLVM codebase,
this policy is not prescribed by the LLVM coding standards at the moment,
so it lives under 'misc'.

Differential Revision: http://llvm-reviews.chandlerc.com/D2914

llvm-svn: 204113

show more ...


# 16ac6ceb 05-Mar-2014 Alexander Kornienko <alexfh@google.com>

Added a module for checks not related to LLVM or Google coding style.

llvm-svn: 202970


12345