[clang] [clang] Add `__bf16` Type Support Macros With Literal Suffix Support (PR #134214)
via cfe-commits
cfe-commits at lists.llvm.org
Thu Apr 3 06:52:44 PDT 2025
================
@@ -1022,7 +1035,11 @@ NumericLiteralParser::NumericLiteralParser(StringRef TokSpelling,
(LangOpts.OpenMPIsTargetDevice && Target.getTriple().isNVPTX())) &&
s + 2 < ThisTokEnd && s[1] == '1' && s[2] == '6') {
s += 2; // success, eat up 2 characters.
- isFloat16 = true;
+ if (isBF16) {
+ isBFloat16 = true;
+ } else {
+ isFloat16 = true;
+ }
----------------
overmighty wrote:
Nit: https://llvm.org/docs/CodingStandards.html#don-t-use-braces-on-simple-single-statement-bodies-of-if-else-loop-statements.
```suggestion
if (isBF16)
isBFloat16 = true;
else
isFloat16 = true;
```
https://github.com/llvm/llvm-project/pull/134214
More information about the cfe-commits
mailing list