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

Thomas Gahr ml at dadommas.de
Wed Feb 1 20:09:12 CET 2012


On Wednesday 01 February 2012 19:58:53 André Pönitz wrote:
> 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.

I think an ExternalSemaSource can help here, just subclass one and fake a 
successful lookup in ExternalSemaSource::LookupUnqualified
> 
> Andre'
> _______________________________________________
> Qt-creator mailing list
> Qt-creator at qt-project.org
> http://lists.qt-project.org/mailman/listinfo/qt-creator



More information about the Qt-creator mailing list