[Qt-creator] QtCreator C++ code parser and clang integration status

Flex Ferrum flexferrum at gmail.com
Wed Feb 1 19:31:15 CET 2012

>> Just imagine what during clang processing "SLOT(foo(int))" is
>> expanding into something like this:
>> __qtcreator_this_class_method_ref_as_slot(foo(int))
> It doesn't get expanded as that.
> After clang (or any "real" preprocessor for that matter) had its go, it's
> essentially 'some_function("some_string_literal")'.

But if we manage to predefine macros SLOT as
#define SLOT(smth) __qtcreator_this_class_method_ref_as_slot(smth)
_before_ clang preprocessing then clang _does_ it. Also it reports
warning about SLOT redefinition in the qt headers but we can ignore
it. Right?

I have to notice what this is one of the possible ways. I'm not sure
what clang allows such trick. But if it can...

Best Regards,
Flex Ferrum.

More information about the Qt-creator mailing list