Skip to content

Commit 2104952

Browse files
committed
fix use of optional
1 parent c7c28c9 commit 2104952

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

clang-tools-extra/clang-tidy/portability/AvoidPlatformSpecificFundamentalTypesCheck.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,12 +157,13 @@ void AvoidPlatformSpecificFundamentalTypesCheck::check(
157157
diag(Loc, "avoid using platform-dependent floating point type '%0'; "
158158
"consider using a type alias or fixed-width type instead")
159159
<< TypeName;
160+
return;
160161
}
161162

162163
auto Diag =
163164
diag(Loc, "avoid using platform-dependent floating point type '%0'; "
164165
"consider using '%1' instead")
165-
<< TypeName << Replacement;
166+
<< TypeName << Replacement.value();
166167

167168
if (TypeRange.isValid())
168169
Diag << FixItHint::CreateReplacement(TypeRange, Replacement.value());

0 commit comments

Comments
 (0)