From 3b828aba1d48136d6fd11124866282c68e4824cc Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: Fri, 12 Nov 2021 06:35:09 +0000 Subject: [PATCH] import clang-12.0.1-4.module+el8.5.0+13246+cefb5d4c --- ...ng-unicode-identifier-detection-pass.patch | 20 +++++++++---------- SPECS/clang.spec | 5 ++++- 2 files changed, 14 insertions(+), 11 deletions(-) diff --git a/SOURCES/0003-Misleading-unicode-identifier-detection-pass.patch b/SOURCES/0003-Misleading-unicode-identifier-detection-pass.patch index dd9bbcb..400f9e9 100644 --- a/SOURCES/0003-Misleading-unicode-identifier-detection-pass.patch +++ b/SOURCES/0003-Misleading-unicode-identifier-detection-pass.patch @@ -210,8 +210,8 @@ index 0000000..f9b3075 +void MisleadingIdentifierCheck::check( + const ast_matchers::MatchFinder::MatchResult &Result) { + if (const auto *ND = Result.Nodes.getNodeAs("nameddecl")) { -+ StringRef NDName = ND->getName(); -+ if (hasRTLCharacters(NDName)) ++ IdentifierInfo *II = ND->getIdentifier(); ++ if (II && hasRTLCharacters(II->getName())) + diag(ND->getBeginLoc(), "identifier has right-to-left codepoints"); + } +} @@ -319,16 +319,16 @@ index 0000000..7ccbc94 + +.. code-block:: c + -+ #include ++ #include + -+ short int א = (short int)0; -+ short int ג = (short int)12345; ++ short int א = (short int)0; ++ short int ג = (short int)12345; + -+ int main() { -+ int א = ג; // a local variable, set to zero? -+ printf("ג is %d\n", ג); -+ printf("א is %d\n", א); -+ } ++ int main() { ++ int א = ג; // a local variable, set to zero? ++ printf("ג is %d\n", ג); ++ printf("א is %d\n", א); ++ } diff --git a/clang-tools-extra/test/clang-tidy/checkers/misc-misleading-identifier.cpp b/clang-tools-extra/test/clang-tidy/checkers/misc-misleading-identifier.cpp new file mode 100644 index 0000000..cb036f9 diff --git a/SPECS/clang.spec b/SPECS/clang.spec index 7ec74a7..b05f267 100644 --- a/SPECS/clang.spec +++ b/SPECS/clang.spec @@ -68,7 +68,7 @@ Name: %pkg_name Version: %{maj_ver}.%{min_ver}.%{patch_ver}%{?rc_ver:~rc%{rc_ver}} -Release: 3%{?dist} +Release: 4%{?dist} Summary: A C language family front-end for LLVM License: NCSA @@ -548,6 +548,9 @@ false %endif %changelog +* Wed Nov 10 2021 sguelton@redhat.com - 12.0.1-4 +- Trojan source clang-tidy patchset fix + * Thu Nov 4 2021 sguelton@redhat.com - 12.0.1-3 - Trojan source clang-tidy patchset