[PATCH] D112916: Confusable identifiers detection

serge via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Nov 1 02:24:57 PDT 2021


serge-sans-paille created this revision.
Herald added subscribers: carlosgalvezp, mgrang, mgorny.
serge-sans-paille requested review of this revision.
Herald added a project: clang-tools-extra.
Herald added a subscriber: cfe-commits.

This patch implements detection of confusable identifiers within clang-tidy. It only considers identifiers whose declaration scope may conflict with.

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


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D112916

Files:
  clang-tools-extra/clang-tidy/misc/CMakeLists.txt
  clang-tools-extra/clang-tidy/misc/ConfusableTable/CMakeLists.txt
  clang-tools-extra/clang-tidy/misc/ConfusableTable/build_confusable_table.cpp
  clang-tools-extra/clang-tidy/misc/ConfusableTable/confusables.txt
  clang-tools-extra/clang-tidy/misc/Homoglyph.cpp
  clang-tools-extra/clang-tidy/misc/Homoglyph.h
  clang-tools-extra/clang-tidy/misc/MiscTidyModule.cpp
  clang-tools-extra/test/clang-tidy/check_clang_tidy.py
  clang-tools-extra/test/clang-tidy/checkers/misc-homoglyph.cpp



More information about the cfe-commits mailing list