We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a14ad3a commit 616a578Copy full SHA for 616a578
refresh.template.py
@@ -614,6 +614,10 @@ def _get_files(compile_action):
614
"""Gets the ({source files}, {header files}) clangd should be told the command applies to."""
615
616
# Getting the source file is a little trickier than it might seem.
617
+ is_precompiled_header = any([arg == "-xc++-header" for arg in compile_action.arguments])
618
+ if is_precompiled_header:
619
+ header_files = [arg for arg in compile_action.arguments if not arg.startswith('-') and arg.endswith(".h")]
620
+ return set(), set(header_files)
621
622
# First, we do the obvious thing: Filter args to those that look like source files.
623
source_file_candidates = [arg for arg in compile_action.arguments if not arg.startswith('-') and arg.endswith(_get_files.source_extensions)]
0 commit comments