llvm-project/clang-tools-extra
Peter Collingbourne 35c3f61d74 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
2014-03-18 04:46:45 +00:00
..
clang-apply-replacements [C++11] Replace OwningPtr with std::unique_ptr. 2014-03-09 09:24:40 +00:00
clang-modernize [C++11] Replace OwningPtr with std::unique_ptr. 2014-03-09 09:24:40 +00:00
clang-query [C++11] Replace OwningPtr with std::unique_ptr. 2014-03-09 09:24:40 +00:00
clang-tidy Add an argument comment checker to clang-tidy. 2014-03-18 04:46:45 +00:00
docs Normalized the usage of override in the doc. 2014-03-03 13:36:30 +00:00
modularize [C++11] Replace OwningPtr with std::unique_ptr. 2014-03-09 09:24:40 +00:00
module-map-checker [C++11] Replace OwningPtr with std::unique_ptr. 2014-03-09 09:24:40 +00:00
pp-trace [C++11] Replace OwningPtr with std::unique_ptr. 2014-03-09 09:24:40 +00:00
remove-cstr-calls [C++11] Replace OwningPtr with std::unique_ptr. 2014-03-09 09:24:40 +00:00
test Add an argument comment checker to clang-tidy. 2014-03-18 04:46:45 +00:00
tool-template [C++11] Replace OwningPtr with std::unique_ptr. 2014-03-09 09:24:40 +00:00
unittests Add an argument comment checker to clang-tidy. 2014-03-18 04:46:45 +00:00
.arcconfig Add .arcconfig for Arcanist support for Phabricator 2013-01-10 04:12:08 +00:00
.gitignore .gitignore: ignore docs/_build 2013-03-03 15:15:12 +00:00
CMakeLists.txt Switch clang-query to use the lineeditor library. 2014-02-01 01:42:42 +00:00
CODE_OWNERS.TXT Switching code owner email address. 2013-10-08 16:28:05 +00:00
LICENSE.TXT Update the copyright credits -- Happy new year 2014! 2014-01-01 08:27:31 +00:00
Makefile Initial checkin of new module-map-checker tool. 2014-01-07 15:22:08 +00:00
README.txt Reverted Test commit; added new line to the end of README.txt 2013-10-12 20:43:36 +00:00

README.txt

//===----------------------------------------------------------------------===//
// Clang Tools repository
//===----------------------------------------------------------------------===//

Welcome to the repository of extra Clang Tools.  This repository holds tools
that are developed as part of the LLVM compiler infrastructure project and the
Clang frontend.  These tools are kept in a separate "extra" repository to
allow lighter weight checkouts of the core Clang codebase.

This repository is only intended to be checked out inside of a full LLVM+Clang
tree, and in the 'tools/extra' subdirectory of the Clang checkout.

All discussion regarding Clang, Clang-based tools, and code in this repository
should be held using the standard Clang mailing lists:
  http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev

Code review for this tree should take place on the standard Clang patch and
commit lists:
  http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

If you find a bug in these tools, please file it in the LLVM bug tracker:
  http://llvm.org/bugs/