VisualGDB 5.0 Intellisens Clang suggestions

Sysprogs forums Forums VisualGDB VisualGDB 5.0 Intellisens Clang suggestions

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #6353
    peer23peer
    Participant

    My current configuration is Visual Studio 2015, with VisualGDB 5.0 prev 4 and on my linux computer the compiler is Clang 3.6.0.

    Compiling and running the code works but I got an issue with the intellisense, it doesn’t give any suggestions for members and methods for the class that i’m working in, it only shows the pull down menu when I start typing with this->

    It also give me a lot of errors for files that are in the remotesourcecache, namely the /usr/bin/../lib/clang/3.6.0/include folder:

    Severity Description Project File Line Column
    Error [Clang IntelliSense] Error: too many errors emitted, stopping now 1 1
    Error [Clang IntelliSense] Error: compound literals are a C99-specific feature emmintrin.h 98 10
    Error [Clang IntelliSense] Error: compound literals are a C99-specific feature emmintrin.h 158 10
    Error [Clang IntelliSense] Error: compound literals are a C99-specific feature emmintrin.h 164 10
    Error [Clang IntelliSense] Error: compound literals are a C99-specific feature mmintrin.h 46 12
    Error [Clang IntelliSense] Error: compound literals are a C99-specific feature mmintrin.h 70 12
    Error [Clang IntelliSense] Error: compound literals are a C99-specific feature mmintrin.h 76 12
    Error [Clang IntelliSense] Error: compound literals are a C99-specific feature mmintrin.h 82 12
    Error [Clang IntelliSense] Error: compound literals are a C99-specific feature mmintrin.h 88 12
    Error [Clang IntelliSense] Error: compound literals are a C99-specific feature mmintrin.h 94 12
    Error [Clang IntelliSense] Error: compound literals are a C99-specific feature mmintrin.h 100 12
    Error [Clang IntelliSense] Error: compound literals are a C99-specific feature mmintrin.h 106 12
    Error [Clang IntelliSense] Error: compound literals are a C99-specific feature mmintrin.h 112 12
    Error [Clang IntelliSense] Error: compound literals are a C99-specific feature mmintrin.h 118 12
    Error [Clang IntelliSense] Error: compound literals are a C99-specific feature mmintrin.h 124 12
    Error [Clang IntelliSense] Error: compound literals are a C99-specific feature mmintrin.h 130 12
    Error [Clang IntelliSense] Error: compound literals are a C99-specific feature mmintrin.h 136 12
    Error [Clang IntelliSense] Error: compound literals are a C99-specific feature mmintrin.h 142 12
    Message [Clang IntelliSense] previous declaration is here Miscellaneous Files stdlib.h 503 12

    etc….

    Does anybody has any sugestions

    #6354
    support
    Keymaster

    Hi,

    Can you attach a screenshot of the emmintrin.h file showing the error location and the color of tokens around it?

    Does your project specify -std=xxx explicitly in compiler flags? Can you open View->Clang IntelliSense Status, switch to Project Status and share the value of CFLAGS and CXXFLAGS displayed there?

    Please also confirm whether the problem happens while trying to edit a .c or .cpp file.

    #6366
    peer23peer
    Participant

    Hi Bazis,

    The errors are always present, it doesn’t matter if I’m currently working in *.h or *.cpp file

    I’m compiling with the -std=c++11  flag and use cmake, building is done using make -j4

    below is the CmakeList.txt of my startup project a BOOST unit test for various custom libraries all compiled with the same flag

    —————————————————————————————————

    #Generated by VisualGDB project wizard.
    #Note: VisualGDB will automatically update this file when you add new sources to the project.

    cmake_minimum_required(VERSION 2.7)
    project(VSA_UT)
    ADD_DEFINITIONS(-DBOOST_TEST_DYN_LINK -DDEBUG)
    SET(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)

    set(LIBRARIES_FROM_REFERENCES ${CMAKE_SOURCE_DIR}/../../../../src/VisionSoilAnalyzer/Vision/Debug/libVision.so ${CMAKE_SOURCE_DIR}/../../../../src/VisionSoilAnalyzer/Soil/Debug/libSoil.so ${CMAKE_SOURCE_DIR}/../../../../src/VisionSoilAnalyzer/SoilPlot/Debug/libSoilPlot.so ${CMAKE_SOURCE_DIR}/../../../../src/VisionSoilAnalyzer/SoilMath/Debug/libSoilMath.so)
    add_executable(VSA_UT VSA_UT.cpp)
    target_link_libraries(VSA_UT -L/usr/local/lib -L/usr/lib/x86_64-linux-gnu/ -lopencv_calib3d -lopencv_core -lopencv_features2d -lopencv_imgproc -lopencv_flann -lopencv_highgui -lopencv_imgcodecs -lopencv_ml -lopencv_objdetect -lopencv_photo -lopencv_shape -lopencv_stitching -lopencv_superres -lopencv_ts -lopencv_video -lopencv_videoio -lopencv_videostab “${LIBRARIES_FROM_REFERENCES}” -lboost_serialization -lboost_unit_test_framework)
    include_directories (/usr/local/include /usr/local/include/opencv /usr/include/boost)
    set(CMAKE_C_FLAGS “${CMAKE_C_FLAGS} -std=c++11”)
    set(CMAKE_CXX_FLAGS “${CMAKE_CXX_FLAGS} -std=c++11”)

    —————————————————————————————————–

    Screenshot doesn’t give clear information, they are all red lines at the first “(” after the return keyword. zie table below for specific line and column

    Severity                                  Description                                                                        Project                       File                  Line Column
    Error [Clang IntelliSense] Error: compound literals are a C99-specific feature Miscellaneous Files emmintrin.h 98 10
    Error [Clang IntelliSense] Error: compound literals are a C99-specific feature Miscellaneous Files emmintrin.h 158 10
    Error [Clang IntelliSense] Error: compound literals are a C99-specific feature Miscellaneous Files emmintrin.h 164 10

    —————————————————————————————————————————

    static __inline__ __m128d __attribute__((__always_inline__, __nodebug__))
    _mm_sqrt_sd(__m128d __a, __m128d __b)
    {
    __m128d __c = __builtin_ia32_sqrtsd(__b);
    return (__m128d) { __c[0], __a[1] };
    }

    ————————————————————————————–

    static __inline__ __m128d __attribute__((__always_inline__, __nodebug__))
    _mm_cmpeq_pd(__m128d __a, __m128d __b)
    {
    return (__m128d)__builtin_ia32_cmpeqpd(__a, __b);
    }

    ——————————————————————————————-

    static __inline__ __m128d __attribute__((__always_inline__, __nodebug__))
    _mm_cmplt_pd(__m128d __a, __m128d __b)
    {
    return (__m128d)__builtin_ia32_cmpltpd(__a, __b);
    }

    This is also the cause for most of the errors that I checked in the files: mmintrin.h , xmmintrin.h

     

    #6367
    peer23peer
    Participant

    Sorry forgot to mention the flags of the CLANG intellisense:

    Main project:

    CFlag

    –target=x86_64 -IC:\Users\jelle\AppData\Local\VisualGDB\RemoteSourceCache\192.168.178.10006\4.8 -IC:\Users\jelle\AppData\Local\VisualGDB\RemoteSourceCache\192.168.178.10007\4.8 -IC:\Users\jelle\AppData\Local\VisualGDB\RemoteSourceCache\192.168.178.10006\4.8\backward -IC:\Users\jelle\AppData\Local\VisualGDB\RemoteSourceCache\192.168.178.10003\include -IC:\Users\jelle\AppData\Local\VisualGDB\RemoteSourceCache\192.168.178.10000\include\x86_64-linux-gnu -IC:\Users\jelle\AppData\Local\VisualGDB\RemoteSourceCache\192.168.178.10000\include -IC:\Users\jelle\AppData\Local\VisualGDB\RemoteSourceCache\192.168.178.10004\include -include D:\OneDrive\Opleiding\HTS_HAN\Minor2\CPP\VisionSoilAnalyzer\Tests\UnitTest\VSA_UT\VSA_UT\gcc_Debug.h -include C:\Program Files (x86)\Sysprogs\VisualGDB\gcc_compat.h  -std=c++11 -D__SYSPROGS_CODESENSE__

     

    CXX Flag

    –target=x86_64 -IC:\Users\jelle\AppData\Local\VisualGDB\RemoteSourceCache\192.168.178.10006\4.8 -IC:\Users\jelle\AppData\Local\VisualGDB\RemoteSourceCache\192.168.178.10007\4.8 -IC:\Users\jelle\AppData\Local\VisualGDB\RemoteSourceCache\192.168.178.10006\4.8\backward -IC:\Users\jelle\AppData\Local\VisualGDB\RemoteSourceCache\192.168.178.10003\include -IC:\Users\jelle\AppData\Local\VisualGDB\RemoteSourceCache\192.168.178.10000\include\x86_64-linux-gnu -IC:\Users\jelle\AppData\Local\VisualGDB\RemoteSourceCache\192.168.178.10000\include -IC:\Users\jelle\AppData\Local\VisualGDB\RemoteSourceCache\192.168.178.10004\include -include D:\OneDrive\Opleiding\HTS_HAN\Minor2\CPP\VisionSoilAnalyzer\Tests\UnitTest\VSA_UT\VSA_UT\gcc_Debug.h -include C:\Program Files (x86)\Sysprogs\VisualGDB\gcc_compat.h  -std=c++11 -D__SYSPROGS_CODESENSE__

     

    #6374
    support
    Keymaster

    Hi,

    Can you try replacing -std=c++11 with -std=gnu++11?

Viewing 5 posts - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.