[PATCH] D144510: [clang-tidy] improve readability-identifier-naming hungarian options test

Alexis Murzeau via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Feb 21 11:19:06 PST 2023


amurzeau created this revision.
Herald added a subscriber: xazax.hun.
Herald added a project: All.
amurzeau requested review of this revision.
Herald added subscribers: cfe-commits, aheejin.
Herald added a project: clang-tools-extra.

Adjust identifier-naming-hungarian-notation-cfgfile test with
changes for all configs in .clang-tidy to ensure they are really taken
into account.

This is done this way:

- Set all HungarianNotation.* options to `cust` prefix + their default value.
- Set TreatStructAsClass to true as it defaults to false.
- Because of the TreatStructAsClass change, add a test to check that structs are really checked the same way as classes (see `struct StructCase`).

Also, `TreatStructAsClass` was wrongly named in the test's .clang-tidy file
and was fixed (it is in `General`, not in `Options`).

Depends on D144431 <https://reviews.llvm.org/D144431>


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D144510

Files:
  clang-tools-extra/test/clang-tidy/checkers/readability/Inputs/identifier-naming/hungarian-notation2/.clang-tidy
  clang-tools-extra/test/clang-tidy/checkers/readability/identifier-naming-hungarian-notation-cfgfile.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D144510.499246.patch
Type: text/x-patch
Size: 54197 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20230221/68613452/attachment-0001.bin>


More information about the cfe-commits mailing list