Open AlanKing95 opened 1 year ago
by the way,i modify the compile_commands.json because the following errors will occur with the default compile_commands.json generate by chromium
Attempting to get defaults from C++ compiler in compile_commands.json file: '/home/jinbiao/work/google_chromium-102.0.5005.200/chromium/src/out_x86/default/../../third_party/llvm-build/Release+Asserts/bin/clang++' Compiler query command line: /home/jinbiao/work/google_chromium-102.0.5005.200/chromium/src/out_x86/default/../../third_party/llvm-build/Release+Asserts/bin/clang++ -Wall -Wextra -Wimplicit-fallthrough -Wunreachable-code-aggressive -Wthread-safety -Wno-missing-field-initializers -Wno-unused-parameter -Wloop-analysis -Wno-unneeded-internal-declaration -Wenum-compare-conditional -Wno-psabi -Wno-ignored-pragma-optimize -Wno-unqualified-std-cast-call -Wno-deprecated-non-prototype -Wshadow -fno-delete-null-pointer-checks -fno-ident -fno-strict-aliasing --param=ssp-buffer-size=4 -fstack-protector -fno-unwind-tables -fno-asynchronous-unwind-tables -fPIC -pthread -fcolor-diagnostics -fmerge-all-constants -fcrash-diagnostics-dir=../../tools/clang/crashreports -mllvm -instcombine-lower-dbg-declare=0 -ffp-contract=off -flto=thin -fsplit-lto-unit -fwhole-program-vtables -fcomplete-member-pointers -m64 -msse3 -ffile-compilation-dir=. -no-canonical-prefixes -fno-omit-frame-pointer -g0 -fprofile-use=../../chrome/build/pgo_profiles/chrome-linux-5005-1653490340-736db1732ea5f3959ee14f875a1211fdb84a54af.profdata -Wno-profile-instr-unprofiled -Wno-profile-instr-out-of-date -Wno-backend-plugin -fsanitize=cfi-vcall -fsanitize-ignorelist=../../tools/cfi/ignores.txt -fsanitize=cfi-icall -fvisibility=hidden -Wheader-hygiene -Wstring-conversion -Wtautological-overlap-compare -Wmissing-field-initializers -Wno-shadow -Wunreachable-code -Wshorten-64-to-32 -O3 -fdata-sections -ffunction-sections -fno-unique-section-names -Wno-string-concatenation -std=c++17 -Wno-trigraphs -fno-aligned-new -fno-exceptions -fno-rtti -nostdinc++ --sysroot=../../build/linux/debian_bullseye_amd64-sysroot -fvisibility-inlines-hidden -Wp,-v -fno-blocks -E -dM -x c++ /dev/null clang++: �[0;1;31merror: �[0m�[1mno such file or directory: '../../tools/cfi/ignores.txt'�[0m
i remove all the compile flags with '../../tools/cfi/ignores.txt'
this is also an issue, because the file exist
here is a file in the default compile_commands.json { "directory": "/home/jinbiao/work/google_chromium-102.0.5005.200/chromium/src/out_x86/default", "command": "ccache ../../third_party/llvm-build/Release+Asserts/bin/clang++ -MMD -MF obj/base/base/allocator_check.o.d -DUSE_SYMBOLIZE -DDCHECK_ALWAYS_ON=1 -DUSE_UDEV -DUSE_AURA=1 -DUSE_GLIB=1 -DUSE_OZONE=1 -DOFFICIAL_BUILD -DSTDC_CONSTANT_MACROS -DSTDC_FORMAT_MACROS -D_FORTIFY_SOURCE=2 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -DNO_UNWIND_TABLES -D_GNU_SOURCE -DCR_CLANG_REVISION=\\"llvmorg-15-init-7570-gba4537b2-1\\" -D_LIBCPP_ABI_UNSTABLE -D_LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS -D_LIBCXXABI_DISABLE_VISIBILITY_ANNOTATIONS -D_LIBCPP_ENABLE_NODISCARD -D_LIBCPP_DEBUG=0 -DCR_LIBCXX_REVISION=79a2e924d96e2fc1e4b937c42efd08898fa472d7 -DCR_SYSROOT_HASH=60354520bb7001d8d0288a2ab82cec7efec9fa3d -DNDEBUG -DNVALGRIND -DDYNAMIC_ANNOTATIONS_ENABLED=0 -DBASE_IMPLEMENTATION -DGLIB_VERSION_MAX_ALLOWED=GLIB_VERSION_2_40 -DGLIB_VERSION_MIN_REQUIRED=GLIB_VERSION_2_40 -DU_USING_ICU_NAMESPACE=0 -DU_ENABLE_DYLOAD=0 -DUSE_CHROMIUM_ICU=1 -DU_ENABLE_TRACING=1 -DU_ENABLE_RESOURCE_TRACING=0 -DU_STATIC_IMPLEMENTATION -DICU_UTIL_DATA_IMPL=ICU_UTIL_DATA_FILE -I../.. -Igen -I../../buildtools/third_party/libc++ -I../../third_party/perfetto/include -Igen/third_party/perfetto/build_config -Igen/third_party/perfetto -I../../third_party/abseil-cpp -I../../third_party/boringssl/src/include -I../../third_party/protobuf/src -Igen/protoc_out -I../../third_party/icu/source/common -I../../third_party/icu/source/i18n -Wall -Werror -Wextra -Wimplicit-fallthrough -Wunreachable-code-aggressive -Wthread-safety -Wno-missing-field-initializers -Wno-unused-parameter -Wloop-analysis -Wno-unneeded-internal-declaration -Wenum-compare-conditional -Wno-psabi -Wno-ignored-pragma-optimize -Wno-unqualified-std-cast-call -Wno-deprecated-non-prototype -Wshadow -fno-delete-null-pointer-checks -fno-ident -fno-strict-aliasing --param=ssp-buffer-size=4 -fstack-protector -fno-unwind-tables -fno-asynchronous-unwind-tables -fPIC -pthread -fcolor-diagnostics -fmerge-all-constants -fcrash-diagnostics-dir=../../tools/clang/crashreports -mllvm -instcombine-lower-dbg-declare=0 -ffp-contract=off -flto=thin -fsplit-lto-unit -fwhole-program-vtables -fcomplete-member-pointers -m64 -msse3 -ffile-compilation-dir=. -no-canonical-prefixes -ftrivial-auto-var-init=pattern -fno-omit-frame-pointer -g0 -fprofile-use=../../chrome/build/pgo_profiles/chrome-linux-5005-1653490340-736db1732ea5f3959ee14f875a1211fdb84a54af.profdata -Wno-profile-instr-unprofiled -Wno-profile-instr-out-of-date -Wno-backend-plugin -fsanitize=cfi-vcall -fsanitize-ignorelist=../../tools/cfi/ignores.txt -fsanitize=cfi-icall -fvisibility=hidden -Wheader-hygiene -Wstring-conversion -Wtautological-overlap-compare -Wexit-time-destructors -Wglobal-constructors -isystem../../build/linux/debian_bullseye_amd64-sysroot/usr/include/glib-2.0 -isystem../../build/linux/debian_bullseye_amd64-sysroot/usr/lib/x86_64-linux-gnu/glib-2.0/include -Wexit-time-destructors -O2 -fdata-sections -ffunction-sections -fno-unique-section-names -DPROTOBUF_ALLOW_DEPRECATED=1 -std=c++17 -Wno-trigraphs -fno-aligned-new -fno-exceptions -fno-rtti -nostdinc++ -isystem../../buildtools/third_party/libc++/trunk/include -isystem../../buildtools/third_party/libc++abi/trunk/include --sysroot=../../build/linux/debian_bullseye_amd64-sysroot -fvisibility-inlines-hidden -c ../../base/allocator/allocator_check.cc -o obj/base/base/allocator_check.o", "file": "../../base/allocator/allocator_check.cc" },
the "../../tools/cfi/ignores.txt" can be find in "/home/jinbiao/work/google_chromium-102.0.5005.200/chromium/src/out_x86/default/../../tools/cfi/ignores.txt"
hi @sean-mcmanus, will it be fixed in the comimng version?
@AlanKing95 I don't think it'll be fixed for 1.19.2, but we'll try to look into it after that.
I believe I've addressed the crash and several issues with clang-cl
querying in 1.19.3 (which should be available very soon). It looks like there is still an issue parsing something in the codebase, preventing good IntellISense results. Once 1.19.3 is out, we might set to this help wanted
, to try to uncover the specific code that is leading to the IntellISense issue.
Environment
Bug Summary and Steps to Reproduce
Bug Summary: while parsing some simple projects, c_cpp works well while parsing chromium, the language server always crash
Steps to reproduce:
Expected behavior:
Configuration and Logs
Other Extensions
No response
Additional context
No response