[llvm] r372765 - [TextAPI] Remove redundant checking causing warnings. NFC.
Michael Liao via llvm-commits
llvm-commits at lists.llvm.org
Tue Sep 24 07:52:13 PDT 2019
Author: hliao
Date: Tue Sep 24 07:52:13 2019
New Revision: 372765
URL: http://llvm.org/viewvc/llvm-project?rev=372765&view=rev
Log:
[TextAPI] Remove redundant checking causing warnings. NFC.
- Minor coding format.
Modified:
llvm/trunk/lib/TextAPI/MachO/TextStubCommon.cpp
Modified: llvm/trunk/lib/TextAPI/MachO/TextStubCommon.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/TextAPI/MachO/TextStubCommon.cpp?rev=372765&r1=372764&r2=372765&view=diff
==============================================================================
--- llvm/trunk/lib/TextAPI/MachO/TextStubCommon.cpp (original)
+++ llvm/trunk/lib/TextAPI/MachO/TextStubCommon.cpp Tue Sep 24 07:52:13 2019
@@ -45,11 +45,11 @@ void ScalarTraits<PlatformSet>::output(c
raw_ostream &OS) {
const auto *Ctx = reinterpret_cast<TextAPIContext *>(IO);
- assert((!Ctx || Ctx && Ctx->FileKind != FileType::Invalid) &&
+ assert((!Ctx || Ctx->FileKind != FileType::Invalid) &&
"File type is not set in context");
- if ( Ctx && Ctx->FileKind == TBD_V3 && Values.count(PlatformKind::macOS) &&
- Values.count(PlatformKind::macCatalyst) ) {
+ if (Ctx && Ctx->FileKind == TBD_V3 && Values.count(PlatformKind::macOS) &&
+ Values.count(PlatformKind::macCatalyst)) {
OS << "zippered";
return;
}
@@ -80,7 +80,7 @@ void ScalarTraits<PlatformSet>::output(c
StringRef ScalarTraits<PlatformSet>::input(StringRef Scalar, void *IO,
PlatformSet &Values) {
const auto *Ctx = reinterpret_cast<TextAPIContext *>(IO);
- assert((!Ctx || Ctx && Ctx->FileKind != FileType::Invalid) &&
+ assert((!Ctx || Ctx->FileKind != FileType::Invalid) &&
"File type is not set in context");
if (Scalar == "zippered") {
More information about the llvm-commits
mailing list