llvm-capstone/clang-tools-extra
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
..
clang-apply-replacements [clang-apply-replacements] Correctly handle relative paths 2021-11-11 18:28:43 +00:00
clang-change-namespace Reapply "Support Attr in DynTypedNode and ASTMatchers." 2021-08-06 22:30:32 +02:00
clang-doc fix typos in comments 2021-11-29 14:06:33 +01:00
clang-include-fixer Cleanup identifier parsing; NFC 2021-09-14 09:12:22 -04:00
clang-move [SystemZ][z/OS][Windows] Add new OF_TextWithCRLF flag and use this flag instead of OF_Text 2021-04-06 07:23:31 -04:00
clang-query [clang-query] Add check to prevent setting srcloc when no introspection is available. 2021-04-28 11:21:35 +01:00
clang-reorder-fields [clang-tooling] Prevent llvm::fatal_error on invalid CLI option 2021-01-29 10:15:06 +01:00
clang-tidy [clang-tidy] Warn on functional C-style casts 2021-11-30 07:31:17 +00:00
clangd [clangd] IncludeCleaner: Attribute symbols from non self-contained headers to their parents 2021-11-26 16:20:48 +01:00
docs [clang-tidy] Warn on functional C-style casts 2021-11-30 07:31:17 +00:00
modularize Use StringRef::contains (NFC) 2021-10-23 20:41:46 -07:00
pp-trace [clang] Let PPCallbacks::PragmaWarning() pass specifier as enum instead of string 2021-09-28 19:47:27 -04:00
test [clang-tidy] Warn on functional C-style casts 2021-11-30 07:31:17 +00:00
tool-template [OpenMP] "UnFix" layering problem with FrontendOpenMP 2020-04-07 14:41:18 -05:00
unittests [clang-tidy] Fix pr48613: "llvm-header-guard uses a reserved identifier" 2021-11-30 12:43:35 +13:00
.gitignore
CMakeLists.txt Add an explicit toggle for the static analyzer in clang-tidy 2020-09-10 10:48:17 -04:00
CODE_OWNERS.TXT
LICENSE.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/