[clang] [clang] Add `__bf16` Type Support Macros With Literal Suffix Support (PR #134214)
via cfe-commits
cfe-commits at lists.llvm.org
Fri Apr 4 02:37:58 PDT 2025
================
----------------
overmighty wrote:
You could have multiple `// RUN:` lines with different targets and macro definitions. For example:
```cpp
// RUN: %clang_cc1 -fsyntax-only -verify -pedantic -triple x86_64 -DSUPPORTED %s
// RUN: %clang_cc1 -fsyntax-only -verify -pedantic -triple armv7 %s
// RUN: %clang_cc1 -fsyntax-only -verify -pedantic -triple armv7 -target-feature +bf16 -DSUPPORTED %s
```
Then you can guard the test cases with `#ifdef SUPPORTED`/`#ifndef SUPPORTED`.
Also, the test will currently fail if testing a Clang build with a default target triple that doesn't support bfloat16.
https://github.com/llvm/llvm-project/pull/134214
More information about the cfe-commits
mailing list