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

MSVC2017: Error when parsing yvals_code.h

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Not Evaluated Not Evaluated
    • Qt Creator 4.9.0
    • Qt Creator 4.8.0-beta1
    • C/C++/Obj-C++ Support
    • None
    • MSVC2017
    • Windows

      QT creator with clang code model shows the warning "The code model could not parse an included file, which might lead to incorrect code completion and highlighting, for example."

      The problem is an error preprocessor directive in yvals_core.h in the following lines

      #ifndef _ALLOW_COMPILER_AND_STL_VERSION_MISMATCH
       #ifdef __EDG__
        // not attempting to detect __EDG_VERSION__ being less than expected
       #elif defined(__clang__)
        #if __clang_major__ < 6	// Coarse-grained, not inspecting __clang_minor__ and __clang_patchlevel__
         #error STL1000: Unexpected compiler version, expected Clang 6 or newer.
        #endif /* ^^^ old Clang ^^^ */
       #elif defined(_MSC_VER)
        #if _MSC_VER < 1915	// Coarse-grained, not inspecting _MSC_FULL_VER
         #error STL1001: Unexpected compiler version, expected MSVC 19.15 or newer. // <-- This is triggered
        #endif /* ^^^ old MSVC ^^^ */
       #else /* vvv other compilers vvv */
        // not attempting to detect other compilers
       #endif /* ^^^ other compilers ^^^ */
      #endif /* _ALLOW_COMPILER_AND_STL_VERSION_MISMATCH */
      

      Problem seems to be, that the code model does not set _MSC_VER correctly to 1915. When compiling, the value is 1915.

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

            yvvan Ivan Donchevskii
            jvehlow jvehlow
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes