diff options
| author | Leonard Chan <leonardchan@google.com> | 2018-10-15 19:59:52 +0000 |
|---|---|---|
| committer | Leonard Chan <leonardchan@google.com> | 2018-10-15 19:59:52 +0000 |
| commit | 88ccbd75431c4dc9e3e7bb48fba86a264d6ddfa1 (patch) | |
| tree | 1b2983c9973ef85bbab618e03387d6396edf31e9 /clang-tools-extra/clang-tidy/modernize/UseDefaultMemberInitCheck.cpp | |
| parent | 7a8865cea819bda4f3b292e33cc16b7b093bd378 (diff) | |
| download | bcm5719-llvm-88ccbd75431c4dc9e3e7bb48fba86a264d6ddfa1.tar.gz bcm5719-llvm-88ccbd75431c4dc9e3e7bb48fba86a264d6ddfa1.zip | |
added fix
llvm-svn: 344548
Diffstat (limited to 'clang-tools-extra/clang-tidy/modernize/UseDefaultMemberInitCheck.cpp')
| -rw-r--r-- | clang-tools-extra/clang-tidy/modernize/UseDefaultMemberInitCheck.cpp | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/clang-tools-extra/clang-tidy/modernize/UseDefaultMemberInitCheck.cpp b/clang-tools-extra/clang-tidy/modernize/UseDefaultMemberInitCheck.cpp index 374fcb34da6..0e0bd36a307 100644 --- a/clang-tools-extra/clang-tidy/modernize/UseDefaultMemberInitCheck.cpp +++ b/clang-tools-extra/clang-tidy/modernize/UseDefaultMemberInitCheck.cpp @@ -60,6 +60,47 @@ static StringRef getValueOfValueInit(const QualType InitType) { 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"); + } } llvm_unreachable("Invalid scalar type kind"); } |

