Skip to content

Commit e3d68c7

Browse files
committed
Replace check against NULL with assert as suggested in review
1 parent b3f1fd9 commit e3d68c7

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

lib/IDE/Formatting.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2485,8 +2485,9 @@ class FormatWalker : public ASTWalker {
24852485
getIndentContextFrom(CaptureListExpr *CL,
24862486
SourceLoc ContextLoc = SourceLoc()) {
24872487
AbstractClosureExpr *CE = CL->getClosureBody();
2488-
BraceStmt *BS = CE ? CE->getBody() : NULL;
2489-
if (!CE || !BS)
2488+
assert(CE);
2489+
BraceStmt *BS = CE->getBody();
2490+
if (!BS)
24902491
return None;
24912492

24922493
if (ContextLoc.isValid()) {

0 commit comments

Comments
 (0)