summaryrefslogtreecommitdiff
path: root/scripts/clang-tools/gen_compile_commands.py
diff options
context:
space:
mode:
authorDmitry Torokhov <dmitry.torokhov@gmail.com>2025-06-01 21:41:07 -0700
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2025-06-01 21:41:07 -0700
commit4f9786035f9e519db41375818e1d0b5f20da2f10 (patch)
treeb307ecc9ab55c44ace462e59549c6d7976da5bfd /scripts/clang-tools/gen_compile_commands.py
parentca39500f6af9cfe6823dc5aa8fbaed788d6e35b2 (diff)
parenta95ef0199e80f3384eb992889322957d26c00102 (diff)
Merge branch 'next' into for-linus
Prepare input updates for 6.16 merge window.
Diffstat (limited to 'scripts/clang-tools/gen_compile_commands.py')
-rwxr-xr-xscripts/clang-tools/gen_compile_commands.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/scripts/clang-tools/gen_compile_commands.py b/scripts/clang-tools/gen_compile_commands.py
index e4fb686dfaa9..96e6e46ad1a7 100755
--- a/scripts/clang-tools/gen_compile_commands.py
+++ b/scripts/clang-tools/gen_compile_commands.py
@@ -167,10 +167,10 @@ def process_line(root_directory, command_prefix, file_path):
root_directory or file_directory.
"""
# The .cmd files are intended to be included directly by Make, so they
- # escape the pound sign '#', either as '\#' or '$(pound)' (depending on the
- # kernel version). The compile_commands.json file is not interepreted
- # by Make, so this code replaces the escaped version with '#'.
- prefix = command_prefix.replace(r'\#', '#').replace('$(pound)', '#')
+ # escape the pound sign '#' as '$(pound)'. The compile_commands.json file
+ # is not interepreted by Make, so this code replaces the escaped version
+ # with '#'.
+ prefix = command_prefix.replace('$(pound)', '#')
# Return the canonical path, eliminating any symbolic links encountered in the path.
abs_path = os.path.realpath(os.path.join(root_directory, file_path))