Commit Graph

4 Commits

Author SHA1 Message Date
Nathan James e40a742a50 [clang-tidy] Change checks to use new isLanguageVersionSupported restriction
Summary: Modifies all checks that are language version dependent to use `isLanguageVersionSupported`

Reviewers: jdoerfert, lebedev.ri, aaron.ballman, gribozavr2, Eugene.Zelenko

Reviewed By: gribozavr2

Subscribers: wuzish, nemanjai, xazax.hun, hiraditya, kbarton, steven_wu, dexonsmith, arphaman, lebedev.ri, cfe-commits

Tags: #clang

Differential Revision: https://reviews.llvm.org/D75340
2020-03-03 16:43:45 +00:00
Nathan James 8a68c40a1b [clang-tidy] Added option for disabling const qualifiers in readability-qualified-auto
Summary: Adds an option called `AddConstToQualified` to readability-qualified-auto to toggle adding const to the auto typed pointers and references. By default its enabled but in the LLVM module its disabled.

Reviewers: aaron.ballman, alexfh, JonasToth, hokein, sammccall

Reviewed By: aaron.ballman

Subscribers: Quuxplusone, merge_guards_bot, lebedev.ri, xazax.hun, cfe-commits

Tags: #clang, #clang-tools-extra

Differential Revision: https://reviews.llvm.org/D73548
2020-02-02 21:27:25 +00:00
Simon Pilgrim 25afe91fd1 Fix Wparentheses warning. NFCI. 2020-01-17 11:26:25 +00:00
Nathan James 36fcbb838c Added readability-qualified-auto check
Adds a check that detects any auto variables that are deduced to a pointer or
a const pointer then adds in the const and asterisk according. Will also
check auto L value references that could be written as const. This relates
to the coding standard
https://llvm.org/docs/CodingStandards.html#beware-unnecessary-copies-with-auto
2020-01-14 14:06:46 -05:00