llvm-project/clang-tools-extra/test
Alexis Murzeau d4cb6c2082 [clang-tidy] readability-identifier-naming: fix hungarian enum prefix in C
When checking a C file, enum tags are of type `int` instead of the enum
type as in C++.
So the checker was using `i` as the prefix for enum tags instead of main
letters of the enum type name (for example `rt` for `enum REV_TYPE`).

This commit fixes this divergence and makes the behavior the same between
C and C++ files.

For example, `enum REV_TYPE { rtRevValid };` won't be reported as badly
named when in a C file. Previously, it would have proposed a rename to
`iRevValid`.

This commit also add a file to test the hungarian notation checker with C
files.
The test file was made from identifier-naming-hungarian-notation.cpp
with C++-only features removed.

Reviewed By: carlosgalvezp

Differential Revision: https://reviews.llvm.org/D144912
2023-03-19 06:22:16 +00:00
..
clang-apply-replacements [Test] Fix CHECK typo. 2022-11-04 10:18:04 -07:00
clang-change-namespace Update redirected output file. 2020-06-19 23:30:16 -07:00
clang-doc [clang-doc] Add template support. 2022-12-08 08:02:02 -08:00
clang-include-fixer [lit] Fix another test case that r374652 missed 2019-10-16 23:58:58 +00:00
clang-move [clang-tools-extra] NFC: Fix trivial typo in documents and comments 2020-04-05 15:28:40 +09:00
clang-query [clang-tooling] Prevent llvm::fatal_error on invalid CLI option 2021-01-29 10:15:06 +01:00
clang-reorder-fields Use function prototypes when appropriate; NFC 2022-02-25 09:08:27 -05:00
clang-tidy [clang-tidy] readability-identifier-naming: fix hungarian enum prefix in C 2023-03-19 06:22:16 +00:00
modularize Recommit "[Support] change StringMap hash function from djbHash to xxHash" 2023-02-19 16:52:26 -05:00
pp-trace [Lex] Introduce PPCallbacks::LexedFileChanged() preprocessor callback 2022-07-01 14:22:31 -07:00
Unit [clang-tools-extra] [test] Use CLANG_NO_DEFAULT_CONFIG=1 2022-10-04 20:08:56 +02:00
.clang-format Disable clang-format entirely for test directories 2022-07-08 07:34:18 -04:00
.gitattributes Use -text git attribute instead of text eol=... 2022-04-28 14:27:29 +02:00
CMakeLists.txt Fix check-clang-tools target after 7cc8377f2c 2022-05-06 23:08:47 +02:00
lit.cfg.py [clang-tools-extra] [test] Use CLANG_NO_DEFAULT_CONFIG=1 2022-10-04 20:08:56 +02:00
lit.site.cfg.py.in [cmake] Provide CURRENT_TOOLS_DIR centrally, replacing CLANG_TOOLS_DIR 2022-03-25 20:22:01 +01:00