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

André Pönitz andre.poenitz at nokia.com
Wed Feb 1 18:51:39 CET 2012


On Wednesday 01 February 2012 16:13:20 ext Thomas Gahr wrote:
> But (I think) the expansion for SLOT(foo(int)) where foo is a member of say 
> struct Bar would need to be something like:
> (void(Bar::*)(int) &Bar::foo)

The expansion _is_ a string literal. 

But one could probably "fake" a pointer-to-member-function, but that
would require the definition of 'Bar' being accessible for further processing
later on, which is, however,  not needed in a Qt context, and e.g. Qt Creator's 
"weak  plugin dependencies" are consciously(!) exploiting this fact.

Of course one could argue that "fringe cases" like that do not have to be
supported by the IDE, but as the IDE itself uses it that's a hard sell ;-}

> [...]
> Another possibility would be to go ahead and have clang understand this kind 
> of "keyword" but that would mean patching clang's sources since keywords need 
> to be known at the time of compiling clang which surely is not an option.

[... or make "upstream clang" accept the use case as "reasonable".
But even that may pose a challenge...]

Andre'



More information about the Qt-creator mailing list