summaryrefslogtreecommitdiffstats
path: root/clang-tools-extra/clang-tidy/utils/FixItHintUtils.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Fix MSVC "not all control paths return a value" warning. NFCI.Simon Pilgrim2020-01-061-0/+1
|
* [clang-tidy] implement utility-function to add 'const' to variablesJonas Toth2020-01-031-2/+194
| | | | | | | | | | | | | | | | | | | | | | | 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
* Update the file headers across all of the LLVM projects in the monorepoChandler Carruth2019-01-191-4/+3
| | | | | | | | | | | | | | | | | to reflect the new license. We understand that people may be surprised that we're moving the header entirely to discuss the new license. We checked this carefully with the Foundation's lawyer and we believe this is the correct approach. Essentially, all code in the project is now made available by the LLVM project under our new license, so you will see that the license headers include that license only. Some of our contributors have contributed code under our old license, and accordingly, we have retained a copy of our old license notice in the top-level files in each project and repository. llvm-svn: 351636
* [clang-tidy] NFC refactor lexer-utils to be usable without ASTContextJonas Toth2018-10-051-1/+2
| | | | | | | | | | | | | | | | | | | Summary: This patch is a small refactoring necessary for 'readability-isolate-declaration' and does not introduce functional changes. It allows to use the utility functions without a full `ASTContext` and requires only the `SourceManager` and the `LangOpts`. Reviewers: alexfh, aaron.ballman, hokein Reviewed By: alexfh Subscribers: nemanjai, xazax.hun, kbarton, cfe-commits Tags: #clang-tools-extra Differential Revision: https://reviews.llvm.org/D52684 llvm-svn: 343850
* [clang-tidy] getPreviousNonCommentToken -> getPreviousTokenAlexander Kornienko2017-02-061-1/+1
| | | | llvm-svn: 294192
* [clang-tidy] Cleanup namespace in utils folder.Etienne Bergeron2016-05-031-3/+3
| | | | | | | | | | | | | | Summary: This is a step forward cleaning up the namespaces in clang-tidy/utils. There is no behavior change. Reviewers: alexfh Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D19819 llvm-svn: 268356
* [clang-tidy] Extend UnnecessaryCopyInitialization check to trigger on ↵Felix Berger2016-03-051-0/+36
non-const copies that can be safely converted to const references. Summary: Move code shared between UnnecessaryCopyInitialization and ForRangeCopyCheck into utilities files. Add more test cases for UnnecessaryCopyInitialization and disable fixes inside of macros. Reviewers: alexfh Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D17488 llvm-svn: 262781
OpenPOWER on IntegriCloud