testsuite: Add C++ plugin to check for libstdc++ header uglification
A new GCC plugin checks for proper name uglification in libstdc++ headers, improving code obfuscation.
This commit introduces a new plugin to the GCC testsuite that checks for proper name uglification (obfuscation) in libstdc++ headers. The plugin identifies non-obfuscated function parameter names, automatic variable names, template arguments, and requires arguments, while making exceptions for names that appear as function/template names in the std namespace. A set of test cases is also added to verify the plugin’s functionality across different C++ standards. This change enhances code obfuscation.
In Details
The commit adds g++.dg/plugin/uglification_plugin.cc to the GCC testsuite. This plugin checks for non-uglified names in libstdc++ headers, specifically function parameters, automatic variables, template arguments, and requires arguments. The plugin allows non-uglified names that are function/template names in the std namespace. The uglification.C test verifies the plugin's diagnostics.
For Context
This commit adds a new tool to GCC's testing framework that improves the ability to hide the inner workings of the C++ standard library (libstdc++). The tool, called a plugin, checks that the names of variables and functions within the library are properly scrambled (uglified) to make it harder for someone to reverse engineer the code. This helps protect any proprietary algorithms or techniques used in the library.