Skip to content

Conversation

sarnex
Copy link
Member

@sarnex sarnex commented Jun 13, 2025

Right now when using ARM intrinsics without including arm_acle.h, we throw a warning saying to include it or provide a declaration for the function.
MSVC doesn't have any ARM-intrinsic specific header, so include Clang's ARM intrinsic header (arm_acle.h) in intrin.h so we don't get a warning that tells the user to include a header that doesn't exist. Ideally we could change the header based on the platform, but we don't have the infra for that at the moment.

See #140910 for more info.

@sarnex sarnex marked this pull request as ready for review June 17, 2025 15:40
@llvmbot llvmbot added clang Clang issues not falling into any other category backend:ARM backend:AArch64 backend:X86 clang:frontend Language frontend issues, e.g. anything involving "Sema" clang:headers Headers provided by Clang, e.g. for intrinsics labels Jun 17, 2025
@llvmbot
Copy link
Member

llvmbot commented Jun 17, 2025

@llvm/pr-subscribers-backend-arm
@llvm/pr-subscribers-backend-aarch64

@llvm/pr-subscribers-backend-x86

Author: Nick Sarnie (sarnex)

Changes

Warnings should suggest changes that are valid on both MSVC and Clang where possible.
Right now when using ARM intrinsics without including arm_acle.h, we throw a warning saying to include it or provide a declaration for the function.
MSVC doesn't have any ARM-intrinsic specific header, so include Clang's ARM intrinsic header (arm_acle.h) in intrin.h, and update the intrinsic usage warnings to suggest intrin.h.

See #140910 for more info.


Full diff: https://github.com/llvm/llvm-project/pull/144172.diff

7 Files Affected:

  • (modified) clang/include/clang/Basic/BuiltinHeaders.def (-1)
  • (modified) clang/include/clang/Basic/BuiltinsAArch64.def (+8-8)
  • (modified) clang/include/clang/Basic/BuiltinsARM.def (+8-8)
  • (modified) clang/lib/Headers/intrin.h (+4)
  • (modified) clang/test/CodeGen/arm-former-microsoft-intrinsics-header-warning.c (+8-8)
  • (modified) clang/test/CodeGen/arm64-former-microsoft-intrinsics-header-warning.c (+8-8)
  • (added) clang/test/Headers/arm-acle-no-direct-include.c (+7)
diff --git a/clang/include/clang/Basic/BuiltinHeaders.def b/clang/include/clang/Basic/BuiltinHeaders.def
index 22668ec7a3396..8e4a2f9bee9aa 100644
--- a/clang/include/clang/Basic/BuiltinHeaders.def
+++ b/clang/include/clang/Basic/BuiltinHeaders.def
@@ -12,7 +12,6 @@
 //===----------------------------------------------------------------------===//
 
 HEADER(NO_HEADER, nullptr)
-HEADER(ARMACLE_H, "arm_acle.h")
 HEADER(BLOCKS_H, "Blocks.h")
 HEADER(COMPLEX_H, "complex.h")
 HEADER(CTYPE_H, "ctype.h")
diff --git a/clang/include/clang/Basic/BuiltinsAArch64.def b/clang/include/clang/Basic/BuiltinsAArch64.def
index 8867a9fe09fb9..4a1db34b9b30f 100644
--- a/clang/include/clang/Basic/BuiltinsAArch64.def
+++ b/clang/include/clang/Basic/BuiltinsAArch64.def
@@ -50,11 +50,11 @@ BUILTIN(__builtin_arm_wfi, "v", "")
 BUILTIN(__builtin_arm_sev, "v", "")
 BUILTIN(__builtin_arm_sevl, "v", "")
 BUILTIN(__builtin_arm_chkfeat, "WUiWUi", "")
-TARGET_HEADER_BUILTIN(__yield, "v", "h", ARMACLE_H, ALL_LANGUAGES, "")
-TARGET_HEADER_BUILTIN(__wfe,   "v", "h", ARMACLE_H, ALL_LANGUAGES, "")
-TARGET_HEADER_BUILTIN(__wfi,   "v", "h", ARMACLE_H, ALL_LANGUAGES, "")
-TARGET_HEADER_BUILTIN(__sev,   "v", "h", ARMACLE_H, ALL_LANGUAGES, "")
-TARGET_HEADER_BUILTIN(__sevl,  "v", "h", ARMACLE_H, ALL_LANGUAGES, "")
+TARGET_HEADER_BUILTIN(__yield, "v", "h", INTRIN_H, ALL_LANGUAGES, "")
+TARGET_HEADER_BUILTIN(__wfe,   "v", "h", INTRIN_H, ALL_LANGUAGES, "")
+TARGET_HEADER_BUILTIN(__wfi,   "v", "h", INTRIN_H, ALL_LANGUAGES, "")
+TARGET_HEADER_BUILTIN(__sev,   "v", "h", INTRIN_H, ALL_LANGUAGES, "")
+TARGET_HEADER_BUILTIN(__sevl,  "v", "h", INTRIN_H, ALL_LANGUAGES, "")
 
 // Like __builtin_trap but provide an 16-bit immediate reason code (which goes into `brk #N`).
 BUILTIN(__builtin_arm_trap, "vUIs", "nr")
@@ -87,9 +87,9 @@ TARGET_BUILTIN(__builtin_arm_mops_memset_tag, "v*v*iz", "", "mte,mops")
 BUILTIN(__builtin_arm_dmb, "vUi", "nc")
 BUILTIN(__builtin_arm_dsb, "vUi", "nc")
 BUILTIN(__builtin_arm_isb, "vUi", "nc")
-TARGET_HEADER_BUILTIN(__dmb, "vUi", "nch", ARMACLE_H, ALL_LANGUAGES, "")
-TARGET_HEADER_BUILTIN(__dsb, "vUi", "nch", ARMACLE_H, ALL_LANGUAGES, "")
-TARGET_HEADER_BUILTIN(__isb, "vUi", "nch", ARMACLE_H, ALL_LANGUAGES, "")
+TARGET_HEADER_BUILTIN(__dmb, "vUi", "nch", INTRIN_H, ALL_LANGUAGES, "")
+TARGET_HEADER_BUILTIN(__dsb, "vUi", "nch", INTRIN_H, ALL_LANGUAGES, "")
+TARGET_HEADER_BUILTIN(__isb, "vUi", "nch", INTRIN_H, ALL_LANGUAGES, "")
 
 TARGET_BUILTIN(__builtin_arm_jcvt, "Zid", "nc", "v8.3a")
 
diff --git a/clang/include/clang/Basic/BuiltinsARM.def b/clang/include/clang/Basic/BuiltinsARM.def
index 2592e25e95c37..20a41dc248859 100644
--- a/clang/include/clang/Basic/BuiltinsARM.def
+++ b/clang/include/clang/Basic/BuiltinsARM.def
@@ -186,19 +186,19 @@ BUILTIN(__builtin_arm_wfi, "v", "")
 BUILTIN(__builtin_arm_sev, "v", "")
 BUILTIN(__builtin_arm_sevl, "v", "")
 BUILTIN(__builtin_arm_dbg, "vUi", "")
-TARGET_HEADER_BUILTIN(__yield, "v", "h", ARMACLE_H, ALL_LANGUAGES, "")
-TARGET_HEADER_BUILTIN(__wfe, "v", "h", ARMACLE_H, ALL_LANGUAGES, "")
-TARGET_HEADER_BUILTIN(__wfi, "v", "h", ARMACLE_H, ALL_LANGUAGES, "")
-TARGET_HEADER_BUILTIN(__sev, "v", "h", ARMACLE_H, ALL_LANGUAGES, "")
-TARGET_HEADER_BUILTIN(__sevl, "v", "h", ARMACLE_H, ALL_LANGUAGES, "")
+TARGET_HEADER_BUILTIN(__yield, "v", "h", INTRIN_H, ALL_LANGUAGES, "")
+TARGET_HEADER_BUILTIN(__wfe, "v", "h", INTRIN_H, ALL_LANGUAGES, "")
+TARGET_HEADER_BUILTIN(__wfi, "v", "h", INTRIN_H, ALL_LANGUAGES, "")
+TARGET_HEADER_BUILTIN(__sev, "v", "h", INTRIN_H, ALL_LANGUAGES, "")
+TARGET_HEADER_BUILTIN(__sevl, "v", "h", INTRIN_H, ALL_LANGUAGES, "")
 
 // Data barrier
 BUILTIN(__builtin_arm_dmb, "vUi", "nc")
 BUILTIN(__builtin_arm_dsb, "vUi", "nc")
 BUILTIN(__builtin_arm_isb, "vUi", "nc")
-TARGET_HEADER_BUILTIN(__dmb, "vUi", "nch", ARMACLE_H, ALL_LANGUAGES, "")
-TARGET_HEADER_BUILTIN(__dsb, "vUi", "nch", ARMACLE_H, ALL_LANGUAGES, "")
-TARGET_HEADER_BUILTIN(__isb, "vUi", "nch", ARMACLE_H, ALL_LANGUAGES, "")
+TARGET_HEADER_BUILTIN(__dmb, "vUi", "nch", INTRIN_H, ALL_LANGUAGES, "")
+TARGET_HEADER_BUILTIN(__dsb, "vUi", "nch", INTRIN_H, ALL_LANGUAGES, "")
+TARGET_HEADER_BUILTIN(__isb, "vUi", "nch", INTRIN_H, ALL_LANGUAGES, "")
 
 // Prefetch
 BUILTIN(__builtin_arm_prefetch, "vvC*UiUi", "nc")
diff --git a/clang/lib/Headers/intrin.h b/clang/lib/Headers/intrin.h
index 3dd1eb45817d4..969a5bb4aa81f 100644
--- a/clang/lib/Headers/intrin.h
+++ b/clang/lib/Headers/intrin.h
@@ -30,6 +30,10 @@
 #include <arm64intr.h>
 #endif
 
+#if defined(__ARM_ACLE)
+#include <arm_acle.h>
+#endif
+
 /* For the definition of jmp_buf. */
 #if __STDC_HOSTED__
 #include <setjmp.h>
diff --git a/clang/test/CodeGen/arm-former-microsoft-intrinsics-header-warning.c b/clang/test/CodeGen/arm-former-microsoft-intrinsics-header-warning.c
index 8edcbbeb0375d..19216629373ef 100644
--- a/clang/test/CodeGen/arm-former-microsoft-intrinsics-header-warning.c
+++ b/clang/test/CodeGen/arm-former-microsoft-intrinsics-header-warning.c
@@ -3,48 +3,48 @@
 
 void check__dmb(void) {
   // expected-warning@+2{{call to undeclared library function}}
-  // expected-note@+1{{include the header <arm_acle.h> or explicitly provide a declaration for}}
+  // expected-note@+1{{include the header <intrin.h> or explicitly provide a declaration for}}
   __dmb(0);
 }
 
 void check__dsb(void) {
   // expected-warning@+2{{call to undeclared library function}}
-  // expected-note@+1{{include the header <arm_acle.h> or explicitly provide a declaration for}}
+  // expected-note@+1{{include the header <intrin.h> or explicitly provide a declaration for}}
   __dsb(0);
 }
 
 void check__isb(void) {
   // expected-warning@+2{{call to undeclared library function}}
-  // expected-note@+1{{include the header <arm_acle.h> or explicitly provide a declaration for}}
+  // expected-note@+1{{include the header <intrin.h> or explicitly provide a declaration for}}
   __isb(0);
 }
 
 void check__yield(void) {
   // expected-warning@+2{{call to undeclared library function}}
-  // expected-note@+1{{include the header <arm_acle.h> or explicitly provide a declaration for}}
+  // expected-note@+1{{include the header <intrin.h> or explicitly provide a declaration for}}
   __yield();
 }
 
 void check__wfe(void) {
   // expected-warning@+2{{call to undeclared library function}}
-  // expected-note@+1{{include the header <arm_acle.h> or explicitly provide a declaration for}}
+  // expected-note@+1{{include the header <intrin.h> or explicitly provide a declaration for}}
   __wfe();
 }
 
 void check__wfi(void) {
   // expected-warning@+2{{call to undeclared library function}}
-  // expected-note@+1{{include the header <arm_acle.h> or explicitly provide a declaration for}}
+  // expected-note@+1{{include the header <intrin.h> or explicitly provide a declaration for}}
   __wfi();
 }
 
 void check__sev(void) {
   // expected-warning@+2{{call to undeclared library function}}
-  // expected-note@+1{{include the header <arm_acle.h> or explicitly provide a declaration for}}
+  // expected-note@+1{{include the header <intrin.h> or explicitly provide a declaration for}}
   __sev();
 }
 
 void check__sevl(void) {
   // expected-warning@+2{{call to undeclared library function}}
-  // expected-note@+1{{include the header <arm_acle.h> or explicitly provide a declaration for}}
+  // expected-note@+1{{include the header <intrin.h> or explicitly provide a declaration for}}
   __sevl();
 }
diff --git a/clang/test/CodeGen/arm64-former-microsoft-intrinsics-header-warning.c b/clang/test/CodeGen/arm64-former-microsoft-intrinsics-header-warning.c
index 52fed49db4dd2..3f829d39b413b 100644
--- a/clang/test/CodeGen/arm64-former-microsoft-intrinsics-header-warning.c
+++ b/clang/test/CodeGen/arm64-former-microsoft-intrinsics-header-warning.c
@@ -6,48 +6,48 @@
 
 void check__dmb(void) {
   // expected-warning@+2{{call to undeclared library function}}
-  // expected-note@+1{{include the header <arm_acle.h> or explicitly provide a declaration for}}
+  // expected-note@+1{{include the header <intrin.h> or explicitly provide a declaration for}}
   __dmb(0);
 }
 
 void check__dsb(void) {
   // expected-warning@+2{{call to undeclared library function}}
-  // expected-note@+1{{include the header <arm_acle.h> or explicitly provide a declaration for}}
+  // expected-note@+1{{include the header <intrin.h> or explicitly provide a declaration for}}
   __dsb(0);
 }
 
 void check__isb(void) {
   // expected-warning@+2{{call to undeclared library function}}
-  // expected-note@+1{{include the header <arm_acle.h> or explicitly provide a declaration for}}
+  // expected-note@+1{{include the header <intrin.h> or explicitly provide a declaration for}}
   __isb(0);
 }
 
 void check__yield(void) {
   // expected-warning@+2{{call to undeclared library function}}
-  // expected-note@+1{{include the header <arm_acle.h> or explicitly provide a declaration for}}
+  // expected-note@+1{{include the header <intrin.h> or explicitly provide a declaration for}}
   __yield();
 }
 
 void check__wfe(void) {
   // expected-warning@+2{{call to undeclared library function}}
-  // expected-note@+1{{include the header <arm_acle.h> or explicitly provide a declaration for}}
+  // expected-note@+1{{include the header <intrin.h> or explicitly provide a declaration for}}
   __wfe();
 }
 
 void check__wfi(void) {
   // expected-warning@+2{{call to undeclared library function}}
-  // expected-note@+1{{include the header <arm_acle.h> or explicitly provide a declaration for}}
+  // expected-note@+1{{include the header <intrin.h> or explicitly provide a declaration for}}
   __wfi();
 }
 
 void check__sev(void) {
   // expected-warning@+2{{call to undeclared library function}}
-  // expected-note@+1{{include the header <arm_acle.h> or explicitly provide a declaration for}}
+  // expected-note@+1{{include the header <intrin.h> or explicitly provide a declaration for}}
   __sev();
 }
 
 void check__sevl(void) {
   // expected-warning@+2{{call to undeclared library function}}
-  // expected-note@+1{{include the header <arm_acle.h> or explicitly provide a declaration for}}
+  // expected-note@+1{{include the header <intrin.h> or explicitly provide a declaration for}}
   __sevl();
 }
diff --git a/clang/test/Headers/arm-acle-no-direct-include.c b/clang/test/Headers/arm-acle-no-direct-include.c
new file mode 100644
index 0000000000000..26e7c914ce833
--- /dev/null
+++ b/clang/test/Headers/arm-acle-no-direct-include.c
@@ -0,0 +1,7 @@
+// RUN: %clang_cl --target=aarch64-windows-msvc -Xclang -verify /E -U__STDC_HOSTED__ -Wno-builtin-macro-redefined %s 2>&1 | FileCheck %s
+
+// expected-no-diagnostics
+
+// CHECK: void __yield(void);
+#include <intrin.h>
+void f() { __yield(); }

@sarnex sarnex requested review from nico, rnk and zmodem June 17, 2025 15:41
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

intrin.h only exists on Windows; what's supposed to happen on non-Windows targets? (These functions are defined in the ACLE: see https://arm-software.github.io/acle/main/acle.html .)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch, I missed that. I guess the best solution is to have a different warning for Linux/Windows.

@rnk Opinions?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@rnk Ping on this one, thx!

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@rnk Ping x2 when you get a chance, thanks!

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@rnk Ping x3 on this one,

Forgot about this for a sec and 5 months passed :)

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Having a different warning on different targets seems fine with me. I don't think we have the infrastructure for that, though.

If you want to land the change to intrin.h separately, I'd be fine with that. (Including arm_acle.h with clang-cl should work; it just won't work with MSVC.)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry for the delay, I just changed this PR to only include the intrin.h change, please take a look when you get a sec

Copy link
Collaborator

@rnk rnk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, looks good to me.

Sorry for the delay, I've had various conferences. In general, it makes me think we need to grow more maintainers and delegate more approval power. That's clearly a long-term project, but any one maintainer can only be so available. :)

@sarnex
Copy link
Member Author

sarnex commented Sep 12, 2025

No problem, thanks for the review!

@sarnex sarnex merged commit 959c3b6 into llvm:main Sep 15, 2025
11 checks passed
@llvm-ci
Copy link
Collaborator

llvm-ci commented Sep 15, 2025

LLVM Buildbot has detected a new failure on builder lldb-x86_64-debian running on lldb-x86_64-debian while building clang at step 6 "test".

Full details are available at: https://lab.llvm.org/buildbot/#/builders/162/builds/31122

Here is the relevant piece of the build log for the reference
Step 6 (test) failure: build (failure)
...
PASS: lldb-api :: lang/cpp/offsetof/TestOffsetofCpp.py (845 of 3191)
PASS: lldb-shell :: Commands/command-thread-backtrace.test (846 of 3191)
PASS: lldb-shell :: Settings/TestSettingsWrite.test (847 of 3191)
PASS: lldb-api :: python_api/interpreter_callback/TestCommandInterepterPrintCallback.py (848 of 3191)
PASS: lldb-api :: python_api/sbplatform/TestSBPlatform.py (849 of 3191)
PASS: lldb-api :: linux/sepdebugsymlink/TestTargetSymbolsSepDebugSymlink.py (850 of 3191)
PASS: lldb-api :: commands/frame/var-dil/basics/PointerDereference/TestFrameVarDILPointerDereference.py (851 of 3191)
PASS: lldb-api :: python_api/findvalue_duplist/TestSBFrameFindValue.py (852 of 3191)
PASS: lldb-api :: python_api/process/read-mem-cstring/TestReadMemCString.py (853 of 3191)
UNRESOLVED: lldb-api :: functionalities/postmortem/netbsd-core/TestNetBSDCore.py (854 of 3191)
******************** TEST 'lldb-api :: functionalities/postmortem/netbsd-core/TestNetBSDCore.py' FAILED ********************
Script:
--
/usr/bin/python3 /home/worker/2.0.1/lldb-x86_64-debian/llvm-project/lldb/test/API/dotest.py -u CXXFLAGS -u CFLAGS --env LLVM_LIBS_DIR=/home/worker/2.0.1/lldb-x86_64-debian/build/./lib --env LLVM_INCLUDE_DIR=/home/worker/2.0.1/lldb-x86_64-debian/build/include --env LLVM_TOOLS_DIR=/home/worker/2.0.1/lldb-x86_64-debian/build/./bin --arch x86_64 --build-dir /home/worker/2.0.1/lldb-x86_64-debian/build/lldb-test-build.noindex --lldb-module-cache-dir /home/worker/2.0.1/lldb-x86_64-debian/build/lldb-test-build.noindex/module-cache-lldb/lldb-api --clang-module-cache-dir /home/worker/2.0.1/lldb-x86_64-debian/build/lldb-test-build.noindex/module-cache-clang/lldb-api --executable /home/worker/2.0.1/lldb-x86_64-debian/build/./bin/lldb --compiler /home/worker/2.0.1/lldb-x86_64-debian/build/./bin/clang --dsymutil /home/worker/2.0.1/lldb-x86_64-debian/build/./bin/dsymutil --make /usr/bin/gmake --llvm-tools-dir /home/worker/2.0.1/lldb-x86_64-debian/build/./bin --lldb-obj-root /home/worker/2.0.1/lldb-x86_64-debian/build/tools/lldb --lldb-libs-dir /home/worker/2.0.1/lldb-x86_64-debian/build/./lib --cmake-build-type Release -t /home/worker/2.0.1/lldb-x86_64-debian/llvm-project/lldb/test/API/functionalities/postmortem/netbsd-core -p TestNetBSDCore.py
--
Exit Code: -11

Command Output (stdout):
--
lldb version 22.0.0git (https://github.com/llvm/llvm-project.git revision 959c3b627fd4084ae583c80703b88b91f63f9a0e)
  clang revision 959c3b627fd4084ae583c80703b88b91f63f9a0e
  llvm revision 959c3b627fd4084ae583c80703b88b91f63f9a0e
Skipping the following test categories: ['libc++', 'msvcstl', 'dsym', 'gmodules', 'debugserver', 'objc']

--
Command Output (stderr):
--
Change dir to: /home/worker/2.0.1/lldb-x86_64-debian/llvm-project/lldb/test/API/functionalities/postmortem/netbsd-core
runCmd: settings clear --all

output: 

runCmd: settings set symbols.enable-external-lookup false

output: 

runCmd: settings set target.inherit-tcc true

output: 

runCmd: settings set target.disable-aslr false

output: 

runCmd: settings set target.detach-on-error false

output: 

runCmd: settings set target.auto-apply-fixits false

@dyung
Copy link
Collaborator

dyung commented Sep 15, 2025

Hi @sarnex, not sure if you were notified, but the test you added is failing on MacOS:

https://lab.llvm.org/buildbot/#/builders/190/builds/27443

******************** TEST 'Clang :: Headers/arm-acle-no-direct-include.c' FAILED ********************
Exit Code: 1
Command Output (stderr):
--
/Volumes/RAMDisk/buildbot-root/aarch64-darwin/build/bin/clang --driver-mode=cl --target=aarch64-windows-msvc -Xclang -verify /E -U__STDC_HOSTED__ -Wno-builtin-macro-redefined /Users/buildbot/buildbot-root/llvm-project/clang/test/Headers/arm-acle-no-direct-include.c 2>&1 | /Volumes/RAMDisk/buildbot-root/aarch64-darwin/build/bin/FileCheck /Users/buildbot/buildbot-root/llvm-project/clang/test/Headers/arm-acle-no-direct-include.c # RUN: at line 1
+ /Volumes/RAMDisk/buildbot-root/aarch64-darwin/build/bin/clang --driver-mode=cl --target=aarch64-windows-msvc -Xclang -verify /E -U__STDC_HOSTED__ -Wno-builtin-macro-redefined /Users/buildbot/buildbot-root/llvm-project/clang/test/Headers/arm-acle-no-direct-include.c
+ /Volumes/RAMDisk/buildbot-root/aarch64-darwin/build/bin/FileCheck /Users/buildbot/buildbot-root/llvm-project/clang/test/Headers/arm-acle-no-direct-include.c
/Users/buildbot/buildbot-root/llvm-project/clang/test/Headers/arm-acle-no-direct-include.c:5:11: error: CHECK: expected string not found in input
// CHECK: void __yield(void);
          ^
<stdin>:1:1: note: scanning from here
clang: warning: '/Users/buildbot/buildbot-root/llvm-project/clang/test/Headers/arm-acle-no-direct-include.c' treated as the '/U' option [-Wslash-u-filename]
^
<stdin>:3:10: note: possible intended match here
clang: error: no input files
         ^
Input file: <stdin>
Check file: /Users/buildbot/buildbot-root/llvm-project/clang/test/Headers/arm-acle-no-direct-include.c
-dump-input=help explains the following input dump.
Input was:
<<<<<<
           1: clang: warning: '/Users/buildbot/buildbot-root/llvm-project/clang/test/Headers/arm-acle-no-direct-include.c' treated as the '/U' option [-Wslash-u-filename] 
check:5'0     X~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ error: no match found
           2: clang: note: use '--' to treat subsequent arguments as filenames 
check:5'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           3: clang: error: no input files 
check:5'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
check:5'1              ?                    possible intended match
>>>>>>
--
********************

Should be a simple fix I think, but can you take a look?

@sarnex
Copy link
Member Author

sarnex commented Sep 15, 2025

Ah sorry, investigating now.

@sarnex
Copy link
Member Author

sarnex commented Sep 15, 2025

#158677

sarnex added a commit that referenced this pull request Sep 15, 2025
…158677)

See
[here](#144172 (comment)),
need to add `--` to filename parsing on Mac because the path starts with
`/U` which `clang-cl` treats as the flag `/U`.

Signed-off-by: Sarnie, Nick <[email protected]>
llvm-sync bot pushed a commit to arm/arm-toolchain that referenced this pull request Sep 16, 2025
…c on Mac (#158677)

See
[here](llvm/llvm-project#144172 (comment)),
need to add `--` to filename parsing on Mac because the path starts with
`/U` which `clang-cl` treats as the flag `/U`.

Signed-off-by: Sarnie, Nick <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backend:AArch64 backend:ARM backend:X86 clang:frontend Language frontend issues, e.g. anything involving "Sema" clang:headers Headers provided by Clang, e.g. for intrinsics clang Clang issues not falling into any other category
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants