================
@@ -0,0 +1,16 @@
+// RUN: %clang_cc1 -std=c++23 -emit-llvm %s -triple x86_64-pc-windows-msvc -o 
- | FileCheck %s
+
+[[msvc::forceinline]] void func() {}
+
+void call_func() {
+// CHECK-LABEL: @"?call_func@@YAXXZ"()
+// CHECK-NOT: call void @"?func@@YAXXZ"()
+  func();
+}
+
+void call_lambda() {
+// CHECK-LABEL: @"?call_lambda@@YAXXZ"()
+// CHECK-NOT: call void @"??R<lambda_
----------------
trungnt2910 wrote:

I think you are referring to something like this:

https://github.com/llvm/llvm-project/blob/849ba979bdd5247d2a8428662d9ea05fb68a4d57/clang/test/CodeGen/attr-alwaysinline.cpp#L8-L9

which does not seem to be possible.

Unlike the example, where the call site is decorated with `always_inline` and 
calling a function defined in a different compilation unit, in this case, the 
callee is decorated with `forceinline`.

This is more similar to the case here:

https://github.com/llvm/llvm-project/blob/5ed2f6f46badfd80f464cf98c583c7ee2b4a7820/clang/test/CodeGen/forceinline.c#L6

where the function or the call simply disappears, and therefore, there is no 
attribute to check for.

https://github.com/llvm/llvm-project/pull/185282
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to