diff --git a/clang/lib/Analysis/LifetimeSafety/FactsGenerator.cpp b/clang/lib/Analysis/LifetimeSafety/FactsGenerator.cpp index ccedd0522cbb..d5990597e161 100644 --- a/clang/lib/Analysis/LifetimeSafety/FactsGenerator.cpp +++ b/clang/lib/Analysis/LifetimeSafety/FactsGenerator.cpp @@ -402,9 +402,9 @@ void FactsGenerator::VisitMaterializeTemporaryExpr( if (!MTEList) return; OriginList *SubExprList = getOriginsList(*MTE->getSubExpr()); - assert(!SubExprList || - MTEList->getLength() == SubExprList->getLength() + 1 && - "MTE top level origin should contain a loan to the MTE itself"); + assert((!SubExprList || + MTEList->getLength() == (SubExprList->getLength() + 1)) && + "MTE top level origin should contain a loan to the MTE itself"); MTEList = getRValueOrigins(MTE, MTEList); if (getChildBinding(MTE)) { // Issue a loan to MTE for the storage location represented by MTE. diff --git a/clang/lib/Sema/SemaOpenMP.cpp b/clang/lib/Sema/SemaOpenMP.cpp index 084abaf487bb..456e94a009d2 100644 --- a/clang/lib/Sema/SemaOpenMP.cpp +++ b/clang/lib/Sema/SemaOpenMP.cpp @@ -24816,9 +24816,8 @@ SemaOpenMP::ActOnOpenMPUseDeviceAddrClause(ArrayRef VarList, // Get the declaration from the components ValueDecl *CurDeclaration = CurComponents.back().getAssociatedDeclaration(); - assert(isa(BE) || - CurDeclaration && - "Unexpected null decl for use_device_addr clause."); + assert((isa(BE) || CurDeclaration) && + "Unexpected null decl for use_device_addr clause."); MVLI.VarBaseDeclarations.push_back(CurDeclaration); MVLI.VarComponents.resize(MVLI.VarComponents.size() + 1);