Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt Creator and other tools
  4. QtCreator - Clang Code Model Version
QtWS25 Last Chance

QtCreator - Clang Code Model Version

Scheduled Pinned Locked Moved Unsolved Qt Creator and other tools
qtcreatorclangversionmacro
1 Posts 1 Posters 589 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    andreaplanet
    wrote on 15 Feb 2019, 15:13 last edited by
    #1

    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,

    1 Reply Last reply
    0

    1/1

    15 Feb 2019, 15:13

    • Login

    • Login or register to search.
    1 out of 1
    • First post
      1/1
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Get Qt Extensions
    • Unsolved