schittir updated this revision to Diff 532528. schittir added a comment. Fix typo
CHANGES SINCE LAST ACTION https://reviews.llvm.org/D153236/new/ https://reviews.llvm.org/D153236 Files: clang/lib/Parse/ParseStmt.cpp clang/lib/Sema/SemaExprObjC.cpp clang/lib/Sema/SemaObjCProperty.cpp clang/lib/Sema/SemaType.cpp Index: clang/lib/Sema/SemaType.cpp =================================================================== --- clang/lib/Sema/SemaType.cpp +++ clang/lib/Sema/SemaType.cpp @@ -2709,7 +2709,7 @@ } // Only support _BitInt elements with byte-sized power of 2 NumBits. if (CurType->isBitIntType()) { - unsigned NumBits = CurType->getAs<BitIntType>()->getNumBits(); + unsigned NumBits = CurType->castAs<BitIntType>()->getNumBits(); if (!llvm::isPowerOf2_32(NumBits) || NumBits < 8) { Diag(AttrLoc, diag::err_attribute_invalid_bitint_vector_type) << (NumBits < 8); Index: clang/lib/Sema/SemaObjCProperty.cpp =================================================================== --- clang/lib/Sema/SemaObjCProperty.cpp +++ clang/lib/Sema/SemaObjCProperty.cpp @@ -1363,10 +1363,9 @@ if (!Context.hasSameType(PropertyIvarType, IvarType)) { if (isa<ObjCObjectPointerType>(PropertyIvarType) && isa<ObjCObjectPointerType>(IvarType)) - compat = - Context.canAssignObjCInterfaces( - PropertyIvarType->getAs<ObjCObjectPointerType>(), - IvarType->getAs<ObjCObjectPointerType>()); + compat = Context.canAssignObjCInterfaces( + PropertyIvarType->castAs<ObjCObjectPointerType>(), + IvarType->castAs<ObjCObjectPointerType>()); else { compat = (CheckAssignmentConstraints(PropertyIvarLoc, PropertyIvarType, IvarType) Index: clang/lib/Sema/SemaExprObjC.cpp =================================================================== --- clang/lib/Sema/SemaExprObjC.cpp +++ clang/lib/Sema/SemaExprObjC.cpp @@ -2438,6 +2438,7 @@ if (!ReceiverType.isNull()) receiverTypeInfo = Context.getTrivialTypeSourceInfo(ReceiverType); + assert(receiverTypeInfo && "receiverTypeInfo cannot be null"); return BuildClassMessage(receiverTypeInfo, ReceiverType, /*SuperLoc=*/isSuperReceiver ? Loc : SourceLocation(), Sel, Method, Loc, Loc, Loc, Args, Index: clang/lib/Parse/ParseStmt.cpp =================================================================== --- clang/lib/Parse/ParseStmt.cpp +++ clang/lib/Parse/ParseStmt.cpp @@ -883,8 +883,10 @@ Stmt *NextDeepest = Case.get(); if (TopLevelCase.isInvalid()) TopLevelCase = Case; - else + else { + assert(DeepestParsedCaseStmt && "DeepestParsedCaseStmt cannot be null"); Actions.ActOnCaseStmtBody(DeepestParsedCaseStmt, Case.get()); + } DeepestParsedCaseStmt = NextDeepest; }
Index: clang/lib/Sema/SemaType.cpp =================================================================== --- clang/lib/Sema/SemaType.cpp +++ clang/lib/Sema/SemaType.cpp @@ -2709,7 +2709,7 @@ } // Only support _BitInt elements with byte-sized power of 2 NumBits. if (CurType->isBitIntType()) { - unsigned NumBits = CurType->getAs<BitIntType>()->getNumBits(); + unsigned NumBits = CurType->castAs<BitIntType>()->getNumBits(); if (!llvm::isPowerOf2_32(NumBits) || NumBits < 8) { Diag(AttrLoc, diag::err_attribute_invalid_bitint_vector_type) << (NumBits < 8); Index: clang/lib/Sema/SemaObjCProperty.cpp =================================================================== --- clang/lib/Sema/SemaObjCProperty.cpp +++ clang/lib/Sema/SemaObjCProperty.cpp @@ -1363,10 +1363,9 @@ if (!Context.hasSameType(PropertyIvarType, IvarType)) { if (isa<ObjCObjectPointerType>(PropertyIvarType) && isa<ObjCObjectPointerType>(IvarType)) - compat = - Context.canAssignObjCInterfaces( - PropertyIvarType->getAs<ObjCObjectPointerType>(), - IvarType->getAs<ObjCObjectPointerType>()); + compat = Context.canAssignObjCInterfaces( + PropertyIvarType->castAs<ObjCObjectPointerType>(), + IvarType->castAs<ObjCObjectPointerType>()); else { compat = (CheckAssignmentConstraints(PropertyIvarLoc, PropertyIvarType, IvarType) Index: clang/lib/Sema/SemaExprObjC.cpp =================================================================== --- clang/lib/Sema/SemaExprObjC.cpp +++ clang/lib/Sema/SemaExprObjC.cpp @@ -2438,6 +2438,7 @@ if (!ReceiverType.isNull()) receiverTypeInfo = Context.getTrivialTypeSourceInfo(ReceiverType); + assert(receiverTypeInfo && "receiverTypeInfo cannot be null"); return BuildClassMessage(receiverTypeInfo, ReceiverType, /*SuperLoc=*/isSuperReceiver ? Loc : SourceLocation(), Sel, Method, Loc, Loc, Loc, Args, Index: clang/lib/Parse/ParseStmt.cpp =================================================================== --- clang/lib/Parse/ParseStmt.cpp +++ clang/lib/Parse/ParseStmt.cpp @@ -883,8 +883,10 @@ Stmt *NextDeepest = Case.get(); if (TopLevelCase.isInvalid()) TopLevelCase = Case; - else + else { + assert(DeepestParsedCaseStmt && "DeepestParsedCaseStmt cannot be null"); Actions.ActOnCaseStmtBody(DeepestParsedCaseStmt, Case.get()); + } DeepestParsedCaseStmt = NextDeepest; }
_______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits