Sysprogs forums › Forums › VisualGDB › Clang intellisense bug unix
- This topic has 5 replies, 2 voices, and was last updated 7 years, 12 months ago by
support.
-
AuthorPosts
-
November 2, 2017 at 13:28 #12830
b.timofte
ParticipantDear 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 ?
November 2, 2017 at 16:56 #12831support
KeymasterHi,
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.November 3, 2017 at 12:43 #12847b.timofte
ParticipantI 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
November 3, 2017 at 18:20 #12849support
KeymasterHi,
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:
- The exact steps to create the project (project type/toolchain/etc)
- The steps to reproduce the problem, including the expected outcome and the observed outcome
- 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 8 years ago by
support.
Attachments:
You must be logged in to view attached files.November 6, 2017 at 14:09 #12864b.timofte
ParticipantYeah , 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
November 6, 2017 at 18:30 #12866support
KeymasterHi,
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
-
AuthorPosts
- You must be logged in to reply to this topic.