[PATCH] D53299: [Fixed Point Arithmetic] Fix for clang-tools-extra warning
Leonard Chan via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Oct 15 13:02:10 PDT 2018
This revision was automatically updated to reflect the committed changes.
Closed by commit rCTE344549: [Fixed Point Arithmetic] Fix for clang-tools-extra warning (authored by leonardchan, committed by ).
Changed prior to commit:
https://reviews.llvm.org/D53299?vs=169741&id=169745#toc
Repository:
rCTE Clang Tools Extra
https://reviews.llvm.org/D53299
Files:
clang-tidy/modernize/UseDefaultMemberInitCheck.cpp
Index: clang-tidy/modernize/UseDefaultMemberInitCheck.cpp
===================================================================
--- clang-tidy/modernize/UseDefaultMemberInitCheck.cpp
+++ clang-tidy/modernize/UseDefaultMemberInitCheck.cpp
@@ -60,46 +60,47 @@
case Type::STK_IntegralComplex:
return getValueOfValueInit(
InitType->getAs<ComplexType>()->getElementType());
+
case Type::STK_FixedPoint:
switch (InitType->getAs<BuiltinType>()->getKind()) {
- case BuiltinType::ShortAccum:
- case BuiltinType::SatShortAccum:
- return "0.0hk";
- case BuiltinType::Accum:
- case BuiltinType::SatAccum:
- return "0.0k";
- case BuiltinType::LongAccum:
- case BuiltinType::SatLongAccum:
- return "0.0lk";
- case BuiltinType::UShortAccum:
- case BuiltinType::SatUShortAccum:
- return "0.0uhk";
- case BuiltinType::UAccum:
- case BuiltinType::SatUAccum:
- return "0.0uk";
- case BuiltinType::ULongAccum:
- case BuiltinType::SatULongAccum:
- return "0.0ulk";
- case BuiltinType::ShortFract:
- case BuiltinType::SatShortFract:
- return "0.0hr";
- case BuiltinType::Fract:
- case BuiltinType::SatFract:
- return "0.0r";
- case BuiltinType::LongFract:
- case BuiltinType::SatLongFract:
- return "0.0lr";
- case BuiltinType::UShortFract:
- case BuiltinType::SatUShortFract:
- return "0.0uhr";
- case BuiltinType::UFract:
- case BuiltinType::SatUFract:
- return "0.0ur";
- case BuiltinType::ULongFract:
- case BuiltinType::SatULongFract:
- return "0.0ulr";
- default:
- llvm_unreachable("Unhandled fixed point BuiltinType");
+ case BuiltinType::ShortAccum:
+ case BuiltinType::SatShortAccum:
+ return "0.0hk";
+ case BuiltinType::Accum:
+ case BuiltinType::SatAccum:
+ return "0.0k";
+ case BuiltinType::LongAccum:
+ case BuiltinType::SatLongAccum:
+ return "0.0lk";
+ case BuiltinType::UShortAccum:
+ case BuiltinType::SatUShortAccum:
+ return "0.0uhk";
+ case BuiltinType::UAccum:
+ case BuiltinType::SatUAccum:
+ return "0.0uk";
+ case BuiltinType::ULongAccum:
+ case BuiltinType::SatULongAccum:
+ return "0.0ulk";
+ case BuiltinType::ShortFract:
+ case BuiltinType::SatShortFract:
+ return "0.0hr";
+ case BuiltinType::Fract:
+ case BuiltinType::SatFract:
+ return "0.0r";
+ case BuiltinType::LongFract:
+ case BuiltinType::SatLongFract:
+ return "0.0lr";
+ case BuiltinType::UShortFract:
+ case BuiltinType::SatUShortFract:
+ return "0.0uhr";
+ case BuiltinType::UFract:
+ case BuiltinType::SatUFract:
+ return "0.0ur";
+ case BuiltinType::ULongFract:
+ case BuiltinType::SatULongFract:
+ return "0.0ulr";
+ default:
+ llvm_unreachable("Unhandled fixed point BuiltinType");
}
}
llvm_unreachable("Invalid scalar type kind");
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D53299.169745.patch
Type: text/x-patch
Size: 2999 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20181015/ecfc7048/attachment.bin>
More information about the cfe-commits
mailing list