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

Clang code model produces half the time no highlighting

    XMLWordPrintable

Details

    • Bug
    • Resolution: Incomplete
    • Not Evaluated
    • Qt Creator 3.1.0
    • Qt Creator 3.1.0-beta
    • C/C++/Obj-C++ Support
    • None
    • Linux Mint 15

    Description

      Hello,

      the clang code model does not work half the time for me.
      The code just stays black except for the parts it does not need a code model for(keywords etc).

      If I use the env var QTC_CLANG_VERBOSE=1 the debug output says:

      *** Highlighting from 1 to 126 of "/home/waechter/projects/testarea/ogdf-test/ogdf-test/main.cpp" 
      ***** Options:  "-x c++ -std=gnu++98 -v -fmessage-length=0 -fdiagnostics-show-note-include-stack -fmacro-backtrace-limit=0 -fretain-comments-from-system-headers -D__DBL_MIN_EXP__=(-1021) -D__UINT_LEAST16_MAX__=65535 -D__ATOMIC_ACQUIRE=2 -D__FLT_MIN__=1.17549435082228750797e-38F -D__UINT_LEAST8_TYPE__=unsigned char -D__INTMAX_C(c)=c ## L -D__CHAR_BIT__=8 -D__UINT8_MAX__=255 -D__WINT_MAX__=4294967295U -D__ORDER_LITTLE_ENDIAN__=1234 -D__SIZE_MAX__=18446744073709551615UL -D__WCHAR_MAX__=2147483647 -D__GCC_HAVE_SYNC_COMPARE_AND_SWAP_1=1 -D__GCC_HAVE_SYNC_COMPARE_AND_SWAP_2=1 -D__GCC_HAVE_SYNC_COMPARE_AND_SWAP_4=1 -D__DBL_DENORM_MIN__=double(4.94065645841246544177e-324L) -D__GCC_HAVE_SYNC_COMPARE_AND_SWAP_8=1 -D__GCC_ATOMIC_CHAR_LOCK_FREE=2 -D__FLT_EVAL_METHOD__=0 -D__unix__=1 -D__GCC_ATOMIC_CHAR32_T_LOCK_FREE=2 -D__x86_64=1 -D__UINT_FAST64_MAX__=18446744073709551615UL -D__SIG_ATOMIC_TYPE__=int -D__DBL_MIN_10_EXP__=(-307) -D__FINITE_MATH_ONLY__=0 -D__GNUC_PATCHLEVEL__=3 -D__UINT_FAST8_MAX__=255 -D__DEC64_MAX_EXP__=385 -D__INT8_C(c)=c -D__UINT_LEAST64_MAX__=18446744073709551615UL -D__SHRT_MAX__=32767 -D__LDBL_MAX__=1.18973149535723176502e+4932L -D__UINT_LEAST8_MAX__=255 -D__GCC_ATOMIC_BOOL_LOCK_FREE=2 -D__UINTMAX_TYPE__=long unsigned int -D__linux=1 -D__DEC32_EPSILON__=1E-6DF -D__unix=1 -D__UINT32_MAX__=4294967295U -D__LDBL_MAX_EXP__=16384 -D__WINT_MIN__=0U -D__linux__=1 -D__SCHAR_MAX__=127 -D__WCHAR_MIN__=(-__WCHAR_MAX__ - 1) -D__INT64_C(c)=c ## L -D__DBL_DIG__=15 -D__GCC_ATOMIC_POINTER_LOCK_FREE=2 -D__SIZEOF_INT__=4 -D__SIZEOF_POINTER__=8 -D__GCC_ATOMIC_CHAR16_T_LOCK_FREE=2 -D__USER_LABEL_PREFIX__= -D__STDC_HOSTED__=1 -D__LDBL_HAS_INFINITY__=1 -D__FLT_EPSILON__=1.19209289550781250000e-7F -D__GXX_WEAK__=1 -D__LDBL_MIN__=3.36210314311209350626e-4932L -D__DEC32_MAX__=9.999999E96DF -D__INT32_MAX__=2147483647 -D__SIZEOF_LONG__=8 -D__UINT16_C(c)=c -D__DECIMAL_DIG__=21 -D__gnu_linux__=1 -D__LDBL_HAS_QUIET_NAN__=1 -D_REENTRANT=1 -D__GNUC__=4 -D__GXX_RTTI=1 -D__MMX__=1 -D__FLT_HAS_DENORM__=1 -D__SIZEOF_LONG_DOUBLE__=16 -D__BIGGEST_ALIGNMENT__=16 -D__DBL_MAX__=double(1.79769313486231570815e+308L) -D__INT_FAST32_MAX__=9223372036854775807L -D__DBL_HAS_INFINITY__=1 -D__INT64_MAX__=9223372036854775807L -D__DEC32_MIN_EXP__=(-94) -D__INT_FAST16_TYPE__=long int -D__LDBL_HAS_DENORM__=1 -D__cplusplus=199711L -D__DEC128_MAX__=9.999999999999999999999999999999999E6144DL -D__INT_LEAST32_MAX__=2147483647 -D__DEC32_MIN__=1E-95DF -D__DEPRECATED=1 -D__DBL_MAX_EXP__=1024 -D__DEC128_EPSILON__=1E-33DL -D__SSE2_MATH__=1 -D__PTRDIFF_MAX__=9223372036854775807L -D__amd64=1 -D__GNUG__=4 -D__LONG_LONG_MAX__=9223372036854775807LL -D__SIZEOF_SIZE_T__=8 -D__SIZEOF_WINT_T__=4 -D__GCC_HAVE_DWARF2_CFI_ASM=1 -D__GXX_ABI_VERSION=1002 -D__FLT_MIN_EXP__=(-125) -D__INT_FAST64_TYPE__=long int -D__DBL_MIN__=double(2.22507385850720138309e-308L) -D__LP64__=1 -D__DECIMAL_BID_FORMAT__=1 -D__DEC128_MIN__=1E-6143DL -D__REGISTER_PREFIX__= -D__UINT16_MAX__=65535 -D__DBL_HAS_DENORM__=1 -D__UINT8_TYPE__=unsigned char -D__NO_INLINE__=1 -D__FLT_MANT_DIG__=24 -D__VERSION__=4.7.3 -D__UINT64_C(c)=c ## UL -D__GCC_ATOMIC_INT_LOCK_FREE=2 -D__FLOAT_WORD_ORDER__=__ORDER_LITTLE_ENDIAN__ -D__INT32_C(c)=c -D__DEC64_EPSILON__=1E-15DD -D__ORDER_PDP_ENDIAN__=3412 -D__DEC128_MIN_EXP__=(-6142) -D__INT_FAST32_TYPE__=long int -D__UINT_LEAST16_TYPE__=short unsigned int -Dunix=1 -D__INT16_MAX__=32767 -D__SIZE_TYPE__=long unsigned int -D__UINT64_MAX__=18446744073709551615UL -D__INT8_TYPE__=signed char -D__ELF__=1 -D__FLT_RADIX__=2 -D__INT_LEAST16_TYPE__=short int -D__LDBL_EPSILON__=1.08420217248550443401e-19L -D__UINTMAX_C(c)=c ## UL -D__k8=1 -D__SIG_ATOMIC_MAX__=2147483647 -D__GCC_ATOMIC_WCHAR_T_LOCK_FREE=2 -D__SIZEOF_PTRDIFF_T__=8 -D__x86_64__=1 -D__DEC32_SUBNORMAL_MIN__=0.000001E-95DF -D__INT_FAST16_MAX__=9223372036854775807L -D__UINT_FAST32_MAX__=18446744073709551615UL -D__UINT_LEAST64_TYPE__=long unsigned int -D__FLT_HAS_QUIET_NAN__=1 -D__FLT_MAX_10_EXP__=38 -D__LONG_MAX__=9223372036854775807L -D__DEC128_SUBNORMAL_MIN__=0.000000000000000000000000000000001E-6143DL -D__FLT_HAS_INFINITY__=1 -D__UINT_FAST16_TYPE__=long unsigned int -D__DEC64_MAX__=9.999999999999999E384DD -D__CHAR16_TYPE__=short unsigned int -D__PRAGMA_REDEFINE_EXTNAME=1 -D__INT_LEAST16_MAX__=32767 -D__DEC64_MANT_DIG__=16 -D__UINT_LEAST32_MAX__=4294967295U -D__GCC_ATOMIC_LONG_LOCK_FREE=2 -D__INT_LEAST64_TYPE__=long int -D__INT16_TYPE__=short int -D__INT_LEAST8_TYPE__=signed char -D__DEC32_MAX_EXP__=97 -D__INT_FAST8_MAX__=127 -D__INTPTR_MAX__=9223372036854775807L -Dlinux=1 -D__SSE2__=1 -D__EXCEPTIONS=1 -D__LDBL_MANT_DIG__=64 -D__DBL_HAS_QUIET_NAN__=1 -D__SIG_ATOMIC_MIN__=(-__SIG_ATOMIC_MAX__ - 1) -D__code_model_small__=1 -D__k8__=1 -D__INTPTR_TYPE__=long int -D__UINT16_TYPE__=short unsigned int -D__WCHAR_TYPE__=int -D__SIZEOF_FLOAT__=4 -D__UINTPTR_MAX__=18446744073709551615UL -D__DEC64_MIN_EXP__=(-382) -D__INT_FAST64_MAX__=9223372036854775807L -D__GCC_ATOMIC_TEST_AND_SET_TRUEVAL=1 -D__FLT_DIG__=6 -D__UINT_FAST64_TYPE__=long unsigned int -D__INT_MAX__=2147483647 -D__amd64__=1 -D__INT64_TYPE__=long int -D__FLT_MAX_EXP__=128 -D__ORDER_BIG_ENDIAN__=4321 -D__DBL_MANT_DIG__=53 -D__INT_LEAST64_MAX__=9223372036854775807L -D__DEC64_MIN__=1E-383DD -D__WINT_TYPE__=unsigned int -D__UINT_LEAST32_TYPE__=unsigned int -D__SIZEOF_SHORT__=2 -D__SSE__=1 -D__LDBL_MIN_EXP__=(-16381) -D__INT_LEAST8_MAX__=127 -D__SSP__=1 -D__SIZEOF_INT128__=16 -D__LDBL_MAX_10_EXP__=4932 -D__ATOMIC_RELAXED=0 -D__DBL_EPSILON__=double(2.22044604925031308085e-16L) -D_LP64=1 -D__UINT8_C(c)=c -D__INT_LEAST32_TYPE__=int -D__SIZEOF_WCHAR_T__=4 -D__UINT64_TYPE__=long unsigned int -D__INT_FAST8_TYPE__=signed char -D__DBL_DECIMAL_DIG__=17 -D__DEC_EVAL_METHOD__=2 -D__UINT32_C(c)=c ## U -D__INTMAX_MAX__=9223372036854775807L -D__BYTE_ORDER__=__ORDER_LITTLE_ENDIAN__ -D__FLT_DENORM_MIN__=1.40129846432481707092e-45F -D__INT8_MAX__=127 -D__UINT_FAST32_TYPE__=long unsigned int -D__CHAR32_TYPE__=unsigned int -D__FLT_MAX__=3.40282346638528859812e+38F -D__INT32_TYPE__=int -D__SIZEOF_DOUBLE__=8 -D__INTMAX_TYPE__=long int -D__DEC128_MAX_EXP__=6145 -D__ATOMIC_CONSUME=1 -D__GNUC_MINOR__=7 -D__UINTMAX_MAX__=18446744073709551615UL -D__DEC32_MANT_DIG__=7 -D__DBL_MAX_10_EXP__=308 -D__LDBL_DENORM_MIN__=3.64519953188247460253e-4951L -D__INT16_C(c)=c -D__STDC__=1 -D__PTRDIFF_TYPE__=long int -D__ATOMIC_SEQ_CST=5 -D__UINT32_TYPE__=unsigned int -D__UINTPTR_TYPE__=long unsigned int -D__DEC64_SUBNORMAL_MIN__=0.000000000000001E-383DD -D__DEC128_MANT_DIG__=34 -D__LDBL_MIN_10_EXP__=(-4931) -D__SSE_MATH__=1 -D__SIZEOF_LONG_LONG__=8 -D__GCC_ATOMIC_LLONG_LOCK_FREE=2 -D__LDBL_DIG__=18 -D__FLT_DECIMAL_DIG__=9 -D__UINT_FAST16_MAX__=18446744073709551615UL -D__GNUC_GNU_INLINE__=1 -D__FLT_MIN_10_EXP__=(-37) -D__GCC_ATOMIC_SHORT_LOCK_FREE=2 -D__UINT_FAST8_TYPE__=unsigned char -D_GNU_SOURCE=1 -D__ATOMIC_ACQ_REL=4 -D__ATOMIC_RELEASE=3 -DQT_CORE_LIB=1 -I/usr/include/c++/4.7 -I/usr/include/x86_64-linux-gnu/c++/4.7/. -I/usr/include/c++/4.7/backward -I/usr/lib/gcc/x86_64-linux-gnu/4.7/include -I/usr/local/include -I/usr/lib/gcc/x86_64-linux-gnu/4.7/include-fixed -I/usr/include/x86_64-linux-gnu -I/usr/include -I/usr/include/qt4/QtCore -I/usr/include/qt4 -I/home/waechter/libs/OGDF -I/home/waechter/projects/testarea/ogdf-test/build-ogdf-test-Qt_4_8_4_System-Debug -I/home/waechter/projects/testarea/ogdf-test/ogdf-test -I/usr/share/qt4/mkspecs/linux-g++-64 -I/usr/share/qt4/mkspecs/linux-g++ -fspell-checking" 
      clang version 3.4 (http://llvm.org/git/clang.git a335ba031b18e2736120b5b82bfee08c50ec522c) (http://llvm.org/git/llvm.git dbb832b83351cec97b025b61c26536ef50c3181c)
      Target: x86_64-unknown-linux-gnu
      Thread model: posix
      Found candidate GCC installation: /usr/lib/gcc/i686-linux-gnu/4.7
      Found candidate GCC installation: /usr/lib/gcc/i686-linux-gnu/4.7.3
      Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/4.4
      Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/4.4.7
      Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/4.7
      Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/4.7.3
      Selected GCC installation: /usr/lib/gcc/x86_64-linux-gnu/4.7
      ignoring nonexistent directory "/usr/lib/gcc/x86_64-linux-gnu/4.7/../../../../include/c++/4.7/x86_64-linux-gnu"
      ignoring nonexistent directory "../lib/clang/3.4/include"
      ignoring nonexistent directory "/include"
      ignoring duplicate directory "/usr/include/c++/4.7"
        as it is a non-system directory that duplicates a system directory
      ignoring duplicate directory "/usr/include/c++/4.7/backward"
        as it is a non-system directory that duplicates a system directory
      ignoring duplicate directory "/usr/include/x86_64-linux-gnu/c++/4.7/."
        as it is a non-system directory that duplicates a system directory
      ignoring duplicate directory "/usr/local/include"
        as it is a non-system directory that duplicates a system directory
      ignoring duplicate directory "/usr/include/x86_64-linux-gnu"
        as it is a non-system directory that duplicates a system directory
      ignoring duplicate directory "/usr/include"
        as it is a non-system directory that duplicates a system directory
      #include "..." search starts here:
      #include <...> search starts here:
       /usr/lib/gcc/x86_64-linux-gnu/4.7/include
       /usr/lib/gcc/x86_64-linux-gnu/4.7/include-fixed
       /usr/include/qt4/QtCore
       /usr/include/qt4
       /home/waechter/libs/OGDF
       /home/waechter/projects/testarea/ogdf-test/build-ogdf-test-Qt_4_8_4_System-Debug
       /home/waechter/projects/testarea/ogdf-test/ogdf-test
       /usr/share/qt4/mkspecs/linux-g++-64
       /usr/share/qt4/mkspecs/linux-g++
       /usr/include/c++/4.7
       /usr/include/c++/4.7/backward
       /usr/include/x86_64-linux-gnu/c++/4.7/.
       /usr/local/include
       /usr/include/x86_64-linux-gnu
       /usr/include
      End of search list.
      *** Reparse for highlighting took 682 ms. 
      "warning" "" [172:9(5508)] "'__FLT_MIN__' macro redefined
        previous definition is here" 
      "warning" "" [184:9(5959)] "'__DBL_DENORM_MIN__' macro redefined
        previous definition is here" 
      "warning" "" [195:9(6364)] "'__GNUC_PATCHLEVEL__' macro redefined
        previous definition is here" 
      "warning" "" [223:9(7244)] "'__FLT_EPSILON__' macro redefined
        previous definition is here" 
      "warning" "" [240:9(7747)] "'__DBL_MAX__' macro redefined
        previous definition is here" 
      "warning" "" [265:9(8620)] "'__DBL_MIN__' macro redefined
        previous definition is here" 
      "warning" "" [275:9(8938)] "'__VERSION__' macro redefined
        previous definition is here" 
      "warning" "" [289:9(9425)] "'__INT8_TYPE__' macro redefined
        previous definition is here" 
      "warning" "" [311:9(10269)] "'__CHAR16_TYPE__' macro redefined
        previous definition is here" 
      "warning" "" [318:9(10529)] "'__INT16_TYPE__' macro redefined
        previous definition is here" 
      "warning" "" [359:9(11844)] "'__DBL_EPSILON__' macro redefined
        previous definition is here" 
      "warning" "" [371:9(12267)] "'__FLT_DENORM_MIN__' macro redefined
        previous definition is here" 
      "warning" "" [375:9(12431)] "'__FLT_MAX__' macro redefined
        previous definition is here" 
      "warning" "" [381:9(12626)] "'__GNUC_MINOR__' macro redefined
        previous definition is here" 
      

      If the highlighting is successfull it ends with something like:

      ...
        previous definition is here" 
      "warning" "" [386:9(12837)] "'__FLT_MAX__' macro redefined
        previous definition is here" 
      "warning" "" [392:9(13032)] "'__GNUC_MINOR__' macro redefined
        previous definition is here" 
      "fatal" "/home/waechter/libs/OGDF/src/augmentation/DfsMakeBiconnected.cpp" [45:10(1417)] "'ogdf/augmentation/DfsMakeBiconnected.h' file not found" 
      *** Highlighting took 122 ms in total. 
      *** Fast re-indexing took 0 ms in total. 
      
      *** Highlighting took 122 ms in total. 
      *** Fast re-indexing took 0 ms in total. 
      

      It seems that it does not finish.

      Attachments

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

        Activity

          People

            kosjar Nikolai Kosjar
            veiovis MirWa
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes