Details
-
Bug
-
Resolution: Fixed
-
P2: Important
-
6.3.1
-
None
-
e816f9154 (dev), f8c481e7e (6.5)
Description
Trying to enable and fix clang-tidy's bugprone-reserved-identifier on my codebase I found that the generated names for some type and variables in the moc output contains double underscores which are reserved names in the language.
Quickly looking at the moc code generation (here: https://github.com/qt/qtbase/blob/dev/src/tools/moc/generator.cpp#L254) this comes from the scope columns being transformed into underscores.
I'm not sure what the proper fix is:
- replacing both "::" by a single underscore will still be wrong for "ns_::Class"
- simply removing "::" will still be wrong for "ns_::_class"
- using a placeholder like "x_qt_x" may work