clang-tidy - misc-misleading-bidirectional — Extra Clang Tools 15.0.7 documentation

# Extra Clang Tools 15.0.7 documentation

## clang-tidy - misc-misleading-bidirectional

# misc-misleading-bidirectional

Warn about unterminated bidirectional unicode sequence, detecting potential attack as described in the Trojan Source attack.

Example:

    #include <iostream>

    int main() {
        bool isAdmin = false;
        /*‮ } ⁦if (isAdmin)⁩ ⁦ begin admins only */
            std::cout << "You are an admin.\n";
        /* end admins only ‮ { ⁦*/
        return 0;
    }