import clang-12.0.1-4.module+el8.5.0+13246+cefb5d4c

This commit is contained in:
CentOS Sources 2021-11-12 06:35:09 +00:00 committed by Stepan Oksanichenko
parent 0a1a5dbb5b
commit 3b828aba1d
2 changed files with 14 additions and 11 deletions

View File

@ -210,8 +210,8 @@ index 0000000..f9b3075
+void MisleadingIdentifierCheck::check(
+ const ast_matchers::MatchFinder::MatchResult &Result) {
+ if (const auto *ND = Result.Nodes.getNodeAs<NamedDecl>("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 <stdio.h>
+ #include <stdio.h>
+
+ 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

View File

@ -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