Skip to content

Commit 898f531

Browse files
authored
gh-106212: Raise when using c-analyzer with clang on darwin (#110757)
1 parent b7f9661 commit 898f531

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

Tools/c-analyzer/c_parser/preprocessor/__init__.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
import logging
33
import os
44
import os.path
5+
import platform
56
import re
67
import sys
78

@@ -242,6 +243,8 @@ def _get_default_compiler():
242243
return 'unix'
243244
if os.name == 'nt':
244245
return 'msvc'
246+
if sys.platform == 'darwin' and 'clang' in platform.python_compiler():
247+
return 'clang'
245248
return 'unix'
246249

247250

0 commit comments

Comments
 (0)