Uploaded image for project: 'Qt Creator'
  1. Qt Creator
  2. QTCREATORBUG-24122

clangbackend crashing every second; affecting arguments passed to libclang

    XMLWordPrintable

Details

    • Bug
    • Resolution: Incomplete
    • Not Evaluated
    • None
    • Qt Creator 4.12.0
    • C/C++/Obj-C++ Support
    • None
    • Qt 5.14.2; clang 10.0.0; gcc 9.3.0
    • Linux/X11

    Description

      I have a cuda/c++ file in a cmake project which consistently crashes the clang backend.  I realize cuda may be unsupported, but I've investigated the issue by launching qtcreator with

       

      QTC_CLANG_NO_DIAGNOSTIC_CHECK=1 QTC_CLANG_ENABLE_STACKTRACES=1 QT_LOGGING_RULES='qtc.clang*=true' qtcreator
      

      and setting the clang code model warnings to "-###".  Which has led me to believe the issue stems from libclang being called with "-m32" despite my being on x86-64 and all my build artifacts being 64-bit.

      So my issue/question is: how do I affect the arguments that get passed to libclang?  In this case:

      Arguments to libclang: -nostdinc -nostdinc++ -fsyntax-only -m32 -std=gnu++2a -fcxx-exceptions -fexceptions -DQ_CREATOR_RUN -D__SSP_STRONG__=3 '-D__DBL_MIN_EXP__=(-1021)'  ...
      

      ... plus >12,000 more characters, mostly defining constants.  My cursory look at src/plugins/clangcodemodel/ gives me the impression that they comes from a ToolChainInfo object, but its unclear to me how that is constructed and how it could get detected as 32-bit.

       

       

       

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            hunger Tobias Hunger
            phollensen Paul Hollensen
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes