QtCreator - Clang Code Model Version

  • Hello there,
    Is there a way to know which clang version within QtCreator is compiling the code?

    When compiling with clang there are usually the macros clang, clang_major, clang_minor and clang_patchlevel.

    But when compiling withing QtCreator using the Clang Code Model for showing the Annotations, then those macros aren't defined.
    I'm using the Q_CREATOR_RUN macro instead of clang as commented here https://bugreports.qt.io/browse/QTCREATORBUG-16847, but is this reliable enough on the long term?
    What if in the future QtCreator will user another code model instead of clang while still defining the Q_CREATOR_RUN macro?
    And which version has the clang code model version used by the QtCreator Clang plugin?

    About the use case, think about a library maintainer that needs to deactivate certain warnings within specific code sections, especially macros that are then used by the client application of the library showing unwanted Annotations.

    Thank you,

Log in to reply

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.