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

André Pönitz andre.poenitz at nokia.com
Wed Feb 1 19:58:53 CET 2012

On Wednesday 01 February 2012 19:31:15 ext Flex Ferrum wrote:
> >> 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 am not the clang expert here, but I'd expect it to flag a hard error
when it sees a member function pointer for a class that it never 
heard of before.


More information about the Qt-creator mailing list