Misleading bidirectional detection
authorserge-sans-paille <sguelton@redhat.com>
Tue, 28 Sep 2021 09:23:22 +0000 (11:23 +0200)
committerserge-sans-paille <sguelton@redhat.com>
Wed, 12 Jan 2022 10:38:36 +0000 (11:38 +0100)
commit35cca45b09b87cc31cda35a66fc93bf4d630f8d2
treeabce11ce5daf781db34c34f71075cba694e670e0
parente3275cfa947b08faf9ef7fc2edadd95e104d3c3e
Misleading bidirectional detection

This patch implements detection of incomplete bidirectional sequence withing
comments and string literals within clang-tidy.

It detects the bidi part of https://www.trojansource.codes/trojan-source.pdf

Differential Revision: https://reviews.llvm.org/D112913
clang-tools-extra/clang-tidy/misc/CMakeLists.txt
clang-tools-extra/clang-tidy/misc/MiscTidyModule.cpp
clang-tools-extra/clang-tidy/misc/MisleadingBidirectional.cpp [new file with mode: 0644]
clang-tools-extra/clang-tidy/misc/MisleadingBidirectional.h [new file with mode: 0644]
clang-tools-extra/docs/ReleaseNotes.rst
clang-tools-extra/docs/clang-tidy/checks/list.rst
clang-tools-extra/docs/clang-tidy/checks/misc-misleading-bidirectional.rst [new file with mode: 0644]
clang-tools-extra/test/clang-tidy/checkers/misc-misleading-bidirectional.cpp [new file with mode: 0644]