codebrowser icon indicating copy to clipboard operation
codebrowser copied to clipboard

Declarations

Open Bestie123 opened this issue 1 year ago • 3 comments

source - llvm-project-14.0.6. the definition is not displayed CodeGenOptions.cpp and so with many files

CodeGenOptions.h image

CodeGenOptions.cpp image

for example, in the vs code program, using the c/c++ extension (adds intellisense navigation), the definiton is displayed from CodegenOptions.cpp image

visual studio also displays CodeGenOptions.cpp image

in my case, the problem manifests itself in the documentation in the version llvmpoject-14.0.6, but the problem also occurs in the old version in the official example https://blog.weghos.com/llvm/llvm/clang/lib/Frontend/CodeGenOptions.cpp.html

Bestie123 avatar Sep 02 '22 18:09 Bestie123

The definition here in your screenshot is on the same line.

For .cpp file, it is not there because it is actually a different macro, and since it is defined in a .cpp file, it is considered as private to that file. So no need to add it in the index.

ogoffart avatar Sep 02 '22 19:09 ogoffart

@ogoffart, thank you, indeed, definitions for files.cpps are private. Probably vs code and visual studio just show all the definitions.

Bestie123 avatar Sep 02 '22 21:09 Bestie123

This function is a bit inconvenient (when it is not added to indexing) because you will have to mark a link to the .cpp file somewhere if you need to navigate to the file.h, in the file .h the backlink to .cpp will no longer be displayed. This will probably make more sense when exploring a large unknown project with a lot of files and directories. Perhaps it would be possible to add indexing with a note that these are private areas.

Bestie123 avatar Sep 02 '22 21:09 Bestie123