This is an archive of the discontinued LLVM Phabricator instance.

[clangd] Disable backend-releated filelist compiler options.
ClosedPublic

Authored by hokein on Jan 4 2023, 1:44 AM.

Details

Summary

These options doesn't affect the AST generation, and clang will crash
(CreateOrDie in ASTContext) immedidately when the provided file are not existed.

Disable them in clangd to make clangd more robust.

Diff Detail

Event Timeline

hokein created this revision.Jan 4 2023, 1:44 AM
Herald added a project: Restricted Project. · View Herald TranscriptJan 4 2023, 1:44 AM
hokein requested review of this revision.Jan 4 2023, 1:44 AM
Herald added a project: Restricted Project. · View Herald TranscriptJan 4 2023, 1:44 AM
sammccall accepted this revision.Jan 4 2023, 1:54 AM

Thanks!

clang-tools-extra/clangd/Compiler.cpp
84

not sure this is strictly accurate, maybe weaken to "mostly affect codegen, and aren't relevant to clangd"

(e.g. the asan options can affect record layout maybe?)

This revision is now accepted and ready to land.Jan 4 2023, 1:54 AM
hokein updated this revision to Diff 486231.Jan 4 2023, 4:04 AM
hokein marked an inline comment as done.

address comment.

This revision was landed with ongoing or failed builds.Jan 4 2023, 4:04 AM
This revision was automatically updated to reflect the committed changes.