This revision was automatically updated to reflect the committed changes. Closed by commit rG00a71cb47c36: [clang-tidy] readability-identifier-naming.HungarianNotation: rename⦠(authored by amurzeau, committed by carlosgalvezp).
Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D144790/new/ https://reviews.llvm.org/D144790 Files: clang-tools-extra/clang-tidy/readability/IdentifierNamingCheck.cpp clang-tools-extra/docs/ReleaseNotes.rst clang-tools-extra/docs/clang-tidy/checks/readability/identifier-naming.rst clang-tools-extra/test/clang-tidy/checkers/readability/Inputs/identifier-naming/hungarian-notation2/.clang-tidy
Index: clang-tools-extra/test/clang-tidy/checkers/readability/Inputs/identifier-naming/hungarian-notation2/.clang-tidy =================================================================== --- clang-tools-extra/test/clang-tidy/checkers/readability/Inputs/identifier-naming/hungarian-notation2/.clang-tidy +++ clang-tools-extra/test/clang-tidy/checkers/readability/Inputs/identifier-naming/hungarian-notation2/.clang-tidy @@ -120,11 +120,11 @@ value: custp - key: readability-identifier-naming.HungarianNotation.DerivedType.FunctionPointer value: custfn - - key: readability-identifier-naming.HungarianNotation.CString.CharPrinter + - key: readability-identifier-naming.HungarianNotation.CString.CharPointer value: custsz - key: readability-identifier-naming.HungarianNotation.CString.CharArray value: custsz - - key: readability-identifier-naming.HungarianNotation.CString.WideCharPrinter + - key: readability-identifier-naming.HungarianNotation.CString.WideCharPointer value: custwsz - key: readability-identifier-naming.HungarianNotation.CString.WideCharArray value: custwsz Index: clang-tools-extra/docs/clang-tidy/checks/readability/identifier-naming.rst =================================================================== --- clang-tools-extra/docs/clang-tidy/checks/readability/identifier-naming.rst +++ clang-tools-extra/docs/clang-tidy/checks/readability/identifier-naming.rst @@ -2584,9 +2584,9 @@ - :option:`HungarianNotation.DerivedType.Pointer` - :option:`HungarianNotation.DerivedType.FunctionPointer` -- :option:`HungarianNotation.CString.CharPrinter` +- :option:`HungarianNotation.CString.CharPointer` - :option:`HungarianNotation.CString.CharArray` -- :option:`HungarianNotation.CString.WideCharPrinter` +- :option:`HungarianNotation.CString.WideCharPointer` - :option:`HungarianNotation.CString.WideCharArray` - :option:`HungarianNotation.PrimitiveType.*` @@ -2642,7 +2642,7 @@ FUNC_PTR fnFuncPtr = NULL; -.. option:: HungarianNotation.CString.CharPrinter +.. option:: HungarianNotation.CString.CharPointer When defined, the check will ensure variable name will add the prefix with the given string. The default prefix is `sz`. @@ -2652,7 +2652,7 @@ When defined, the check will ensure variable name will add the prefix with the given string. The default prefix is `sz`. -.. option:: HungarianNotation.CString.WideCharPrinter +.. option:: HungarianNotation.CString.WideCharPointer When defined, the check will ensure variable name will add the prefix with the given string. The default prefix is `wsz`. @@ -2667,13 +2667,13 @@ .. code-block:: c++ - // CharPrinter + // CharPointer const char *NamePtr = "Name"; // CharArray const char NameArray[] = "Name"; - // WideCharPrinter + // WideCharPointer const wchar_t *WideNamePtr = L"Name"; // WideCharArray @@ -2683,13 +2683,13 @@ .. code-block:: c++ - // CharPrinter + // CharPointer const char *szNamePtr = "Name"; // CharArray const char szNameArray[] = "Name"; - // WideCharPrinter + // WideCharPointer const wchar_t *wszWideNamePtr = L"Name"; // WideCharArray Index: clang-tools-extra/docs/ReleaseNotes.rst =================================================================== --- clang-tools-extra/docs/ReleaseNotes.rst +++ clang-tools-extra/docs/ReleaseNotes.rst @@ -173,6 +173,11 @@ :doc:`readability-identifier-naming <clang-tidy/checks/readability/identifier-naming>` check. +- Renamed `HungarianNotation.CString` options `CharPrinter` and + `WideCharPrinter` to `CharPointer` and `WideCharPointer` respectively in + :doc:`readability-identifier-naming + <clang-tidy/checks/readability/identifier-naming>` check. + - Fixed a false positive in :doc:`readability-container-size-empty <clang-tidy/checks/readability/container-size-empty>` check when comparing ``std::array`` objects to default constructed ones. The behavior for this and Index: clang-tools-extra/clang-tidy/readability/IdentifierNamingCheck.cpp =================================================================== --- clang-tools-extra/clang-tidy/readability/IdentifierNamingCheck.cpp +++ clang-tools-extra/clang-tidy/readability/IdentifierNamingCheck.cpp @@ -460,9 +460,9 @@ } static constexpr std::pair<StringRef, StringRef> HNCStrings[] = { - {"CharPrinter", "char*"}, + {"CharPointer", "char*"}, {"CharArray", "char[]"}, - {"WideCharPrinter", "wchar_t*"}, + {"WideCharPointer", "wchar_t*"}, {"WideCharArray", "wchar_t[]"}}; Buffer = {Section, "CString."};
_______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits