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

Bogus warning from code model about __builtin_va_arg_pack

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P1: Critical
    • Qt Creator 4.2.0-rc1
    • Qt Creator 4.2.0-beta1
    • C/C++/Obj-C++ Support
    • None
    • Kubuntu 16.04, x86_64, Clang code model.

    Description

      When Clang code model is used, opening a project that has standard C++ includes results in a code model warning about __builtin_va_arg_pack being undefined (see the attached screenshot, frame_server.cpp:3 includes <string>).

      __builtin_va_arg_pack is a gcc builtin that is supported since version 4.3. As clang docs state (http://llvm.org/releases/3.7.0/tools/clang/docs/UsersManual.html#gcc-extensions-not-implemented-yet) it is indeed not supported by clang, nor it is supposed to be used by libc since clang pretends to be gcc 4.2. I can see that __va_arg_pack is indeed only defined #if __GNUC_PREREQ (4,3), so either clang now pretends to be a later version of gcc, or it is somehow incorrectly used by the code model.

      In any case, I think this warning should not be present. It probably indicates that the code model parses system headers incorrectly.

      Attachments

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

        Activity

          People

            kosjar Nikolai Kosjar
            lastique Andrey Semashev
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes