Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion clang/tools/scan-build-py/lib/libscanbuild/analyze.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
import datetime
import shutil
import glob
import platform
from collections import defaultdict

from libscanbuild import (
Expand Down Expand Up @@ -563,7 +564,7 @@ def destination():
handle.write(opts["file"] + os.linesep)
handle.write(error.title().replace("_", " ") + os.linesep)
handle.write(" ".join(cmd) + os.linesep)
handle.write(" ".join(os.uname()) + os.linesep)
handle.write(" ".join(platform.uname()) + os.linesep)
handle.write(get_version(opts["clang"]))
handle.close()
# write the captured output too
Expand Down
2 changes: 1 addition & 1 deletion clang/tools/scan-build-py/lib/libscanbuild/compilation.py
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ def compiler_language(command):
cplusplus = re.compile(r"^(.+)(\+\+)(-.+|)$")

if command:
executable = os.path.basename(command[0])
executable = os.path.basename(command[0]).removesuffix('.exe')
if any(pattern.match(executable) for pattern in COMPILER_PATTERNS):
return "c++" if cplusplus.match(executable) else "c"
return None