llvm-project/clang-tools-extra/clang-tidy/google
Carlos Galvez 5bbe50148f [clang-tidy] Warn on functional C-style casts
The google-readability-casting check is meant to be on par
with cpplint's readability/casting check, according to the
documentation. However it currently does not diagnose
functional casts, like:

float x = 1.5F;
int y = int(x);

This is detected by cpplint, however, and the guidelines
are clear that such a cast is only allowed when the type
is a class type (constructor call):

> You may use cast formats like `T(x)` only when `T` is a class type.

Therefore, update the clang-tidy check to check this
case.

Differential Revision: https://reviews.llvm.org/D114427
2021-11-30 07:31:17 +00:00
..
AvoidCStyleCastsCheck.cpp [clang-tidy] Warn on functional C-style casts 2021-11-30 07:31:17 +00:00
AvoidCStyleCastsCheck.h [clang-tidy] Add links to check docs in comments 2020-10-22 13:31:21 +02:00
AvoidNSObjectNewCheck.cpp [clang-tidy][NFC] Remove unnecessary includes throughout clang-tidy header files 2020-06-29 16:05:52 +01:00
AvoidNSObjectNewCheck.h [clang-tidy] Change checks to use new isLanguageVersionSupported restriction 2020-03-03 16:43:45 +00:00
AvoidThrowingObjCExceptionCheck.cpp [clang-tidy] Change checks to use new isLanguageVersionSupported restriction 2020-03-03 16:43:45 +00:00
AvoidThrowingObjCExceptionCheck.h [clang-tidy] Change checks to use new isLanguageVersionSupported restriction 2020-03-03 16:43:45 +00:00
AvoidUnderscoreInGoogletestNameCheck.cpp [clang-tidy] Applied clang-tidy fixes. NFC 2021-01-29 01:01:19 +01:00
AvoidUnderscoreInGoogletestNameCheck.h [Branch-Rename] Fix some links 2021-02-01 16:43:21 +05:30
CMakeLists.txt [clang-tidy] Remove obsolete checker google-runtime-references 2020-10-06 14:03:55 +02:00
DefaultArgumentsCheck.cpp
DefaultArgumentsCheck.h [clang-tidy] Add links to check docs in comments 2020-10-22 13:31:21 +02:00
ExplicitConstructorCheck.cpp [clang-tidy] Applied clang-tidy fixes. NFC 2021-01-29 01:01:19 +01:00
ExplicitConstructorCheck.h [clang-tidy] Add links to check docs in comments 2020-10-22 13:31:21 +02:00
ExplicitMakePairCheck.cpp [clang-tidy] Change checks to use new isLanguageVersionSupported restriction 2020-03-03 16:43:45 +00:00
ExplicitMakePairCheck.h [clang-tidy] Add links to check docs in comments 2020-10-22 13:31:21 +02:00
FunctionNamingCheck.cpp [clang-tidy] Applied clang-tidy fixes. NFC 2021-01-29 01:01:19 +01:00
FunctionNamingCheck.h [clang-tidy] Change checks to use new isLanguageVersionSupported restriction 2020-03-03 16:43:45 +00:00
GlobalNamesInHeadersCheck.cpp [clang-tidy] Add support for diagnostics with no location 2020-12-08 20:29:31 +00:00
GlobalNamesInHeadersCheck.h [clang-tidy] Add links to check docs in comments 2020-10-22 13:31:21 +02:00
GlobalVariableDeclarationCheck.cpp Revert "[NFC, Refactor] Modernize StorageClass from Specifiers.h to a scoped enum (II)" 2021-01-04 23:17:45 +01:00
GlobalVariableDeclarationCheck.h [clang-tidy] Change checks to use new isLanguageVersionSupported restriction 2020-03-03 16:43:45 +00:00
GoogleTidyModule.cpp [clang-tidy] Remove obsolete checker google-runtime-references 2020-10-06 14:03:55 +02:00
IntegerTypesCheck.cpp Cleanup identifier parsing; NFC 2021-09-14 09:12:22 -04:00
IntegerTypesCheck.h [clang-tidy] Add links to check docs in comments 2020-10-22 13:31:21 +02:00
OverloadedUnaryAndCheck.cpp [clang-tidy] Change checks to use new isLanguageVersionSupported restriction 2020-03-03 16:43:45 +00:00
OverloadedUnaryAndCheck.h [clang-tidy] Add links to check docs in comments 2020-10-22 13:31:21 +02:00
TodoCommentCheck.cpp
TodoCommentCheck.h [clang-tidy] Add links to check docs in comments 2020-10-22 13:31:21 +02:00
UnnamedNamespaceInHeaderCheck.cpp [clang-tidy] Add support for diagnostics with no location 2020-12-08 20:29:31 +00:00
UnnamedNamespaceInHeaderCheck.h [clang-tidy] Add links to check docs in comments 2020-10-22 13:31:21 +02:00
UpgradeGoogletestCaseCheck.cpp [clang][Basic] Make SourceLocation usable as key in hash maps, NFCI 2020-10-20 15:52:59 +01:00
UpgradeGoogletestCaseCheck.h [clang][Basic] Make SourceLocation usable as key in hash maps, NFCI 2020-10-20 15:52:59 +01:00
UsingNamespaceDirectiveCheck.cpp [clang-tidy] Change checks to use new isLanguageVersionSupported restriction 2020-03-03 16:43:45 +00:00
UsingNamespaceDirectiveCheck.h [clang-tidy] Add links to check docs in comments 2020-10-22 13:31:21 +02:00