llvm-project/clang-tools-extra
Jonas Toth cf48101200 [clang-tidy] implement utility-function to add 'const' to variables
Summary:
This patch extends the already existing facility to add 'const' to variables
to be more flexible and correct. The previous version did not consider pointers
as value AND pointee. For future automatic introduction for const-correctness
this shortcoming needs to be fixed.
It always allows configuration where the 'const' token is inserted, either on
the left side (if possible) or the right side.
It adds many unit-tests to the utility-function that did not exist before, as
the function was implicitly tested through clang-tidy checks. These
tests were not changed, as the API is still compatible.

Reviewers: aaron.ballman, hokein, alexfh, shuaiwang, lebedev.ri

Reviewed By: aaron.ballman

Subscribers: jdoerfert, mgorny, xazax.hun, cfe-commits

Tags: #clang

Differential Revision: https://reviews.llvm.org/D54395
2020-01-03 20:37:47 +01:00
..
clang-apply-replacements [clang-tools-extra] [cmake] Link against libclang-cpp whenever possible 2019-10-04 20:30:02 +00:00
clang-change-namespace Revert "Use InitLLVM to setup a pretty stack printer" 2019-11-25 21:06:56 -05:00
clang-doc [NFC] Fixes -Wrange-loop-analysis warnings 2020-01-01 20:01:37 +01:00
clang-include-fixer Fix compatibility with python3 of clang-include-fixer.py 2019-12-03 12:55:13 +01:00
clang-move Revert "Use InitLLVM to setup a pretty stack printer" 2019-11-25 21:06:56 -05:00
clang-query Fix newline handling in clang-query parser 2019-12-29 14:58:56 +00:00
clang-reorder-fields [clang-tools-extra] [cmake] Link against libclang-cpp whenever possible 2019-10-04 20:30:02 +00:00
clang-tidy [clang-tidy] implement utility-function to add 'const' to variables 2020-01-03 20:37:47 +01:00
clangd [clangd] targetDecl() returns only NamedDecls. 2020-01-03 18:18:40 +01:00
docs Fix trivial typos in comments; NFC 2020-01-02 13:41:43 -05:00
modularize [DeclCXX] Remove unknown external linkage specifications 2019-11-21 15:23:05 +02:00
pp-trace [clang-tools-extra] [cmake] Link against libclang-cpp whenever possible 2019-10-04 20:30:02 +00:00
test Handle init statements in readability-else-after-return 2020-01-02 13:39:27 -05:00
tool-template Revert "Use InitLLVM to setup a pretty stack printer" 2019-11-25 21:06:56 -05:00
unittests [clang-tidy] implement utility-function to add 'const' to variables 2020-01-03 20:37:47 +01:00
.arcconfig [clang-tools-extra] Set up .arcconfig to point to new Diffusion CTE repository 2017-11-27 15:58:25 +00:00
.gitignore
CMakeLists.txt Remove clang-tidy-vs from clang-tools-extra (PR41791) 2019-08-27 18:36:08 +00:00
CODE_OWNERS.TXT Update CODE_OWNERS.txt for clang-doc 2019-06-28 17:32:26 +00:00
LICENSE.TXT Fix typos throughout the license files that somehow I and my reviewers 2019-01-21 09:52:34 +00:00
README.txt

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.llvm.org/mailman/listinfo/cfe-dev

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

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