xiongji90 marked an inline comment as done.
xiongji90 added inline comments.


================
Comment at: clang/test/CodeGen/builtin_set_flt_rounds.c:5-7
+void test_builtin_set_flt_rounds() {
+  __builtin_set_flt_rounds(1);
+  // CHECK: call void @llvm.set.rounding(i32 1)
----------------
aaron.ballman wrote:
> I think you should also add some Sema tests for correct and misuse of the 
> builtin:
> ```
> __builtin_set_flt_rounds(1); // OK
> 
> struct S { int a; } s;
> __builtin_set_flt_rounds(s); // This should diagnose, right?
> 
> __builtin_set_flt_rounds(1.0f); // Should this implicitly convert or is this 
> an error?
> ```
> and that sema test can additionally test what happens when you call the 
> builtin on an unsupported architecture.
Hi, @aaron.ballman 
I added a new test in test/Sema to check the builtin on platforms unsupported.
Thanks very much.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D145765/new/

https://reviews.llvm.org/D145765

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to