Details
-
Bug
-
Resolution: Done
-
P1: Critical
-
Qt Creator 4.2.0-beta1
-
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
For Gerrit Dashboard: QTCREATORBUG-17185 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
175294,5 | Clang: Avoid parsing unknown __builtin_va_arg_pack | 4.2 | qt-creator/qt-creator | Status: MERGED | +2 | 0 |