Clang intellisense bug unix

Sysprogs forums Forums VisualGDB Clang intellisense bug unix

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #12830
    b.timofte
    Participant

    Dear developers

    If i put all my .cpp file inside

    #ifndef  unix

     

    #endif

     

    Clang intellisense doesnt work anymore.

    If i use Microsoft intellisense it work …

     

    Whats going on ?

    #12831
    support
    Keymaster

    Hi,

    Most likely some of your headers defines #unix if it detects GCC/clang being used.
    Please try checking this on a clean project and/or using ‘go to definition’ on the ‘unix’ macro to locate where it is defined.

    #12847
    b.timofte
    Participant

    I made a new project

    and put the code above main.cpp

    #ifdef unix

    #endif

     

    If i select unix macro and go to definition it says in clang that the enrty doesnt refer to a valid c/c++ entity

     

    The same happens if i select my file in the other project where intellisense fails and select go to defintion …. it says it cannot find definition  of it

     

    #12849
    support
    Keymaster

    Hi,

    We understand your frustration with this, however it’s hard to guess what is going on based on the scarce puzzle pieces you provide. The behavior you are describing would be consistent with the ‘unix’ macro simply not being defined (which is the expected behavior for certain types of projects).

    We would love to help you, but in order to do that, we need to understand your scenario and what you are trying to accomplish. So please provide the following information so that we can help you:

    1. The exact steps to create the project (project type/toolchain/etc)
    2. The steps to reproduce the problem, including the expected outcome and the observed outcome
    3. A screenshot of the entire VS window showing the problem (often minor details like file names or the navigation bar provide important clues).

    E.g. in our experiments the #ifdef unix looks like this:

    The macro is not defined (and should not be for this project type), so the code inside #ifdef is grayed out and the code inside #ifndef is working as expected.

    • This reply was modified 7 years ago by support.
    Attachments:
    You must be logged in to view attached files.
    #12864
    b.timofte
    Participant

    Yeah , In my project unix is not defined anywhere , but it destroys any CLANG intellisense if i used #ifdef unix in those files. Have no clue whats going on and why the Visual Studio intellisense works

    #12866
    support
    Keymaster

    Hi,

    Sorry, it is hard to guess what is going on without knowing further details. Please try reproducing this on a smaller project and sending it to us so that we could examine it.

    If the problem only happens on a larger project, please try comparing the settings between the 2 projects:

    • .vgdbsettings files
    • .vcxproj files (e.g. manually defined macros)
    • sets of included headers
Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.