Lines Matching full:branches
27 /// Determines if the bodies of two branches in a switch statements are Type I
327 diag(IS->getBeginLoc(), "if with identical then and else branches");
334 // To find all the duplicates, we collect all the branches into a vector.
335 llvm::SmallVector<const Stmt *, 4> Branches;
339 Branches.push_back(Cur->getThen());
350 Branches.push_back(Else);
355 size_t N = Branches.size();
359 // We have already seen Branches[i] as a clone of an earlier branch.
367 Branches[I]->IgnoreContainers(),
368 Branches[J]->IgnoreContainers(), Context))
376 diag(Branches[I]->getBeginLoc(),
379 Lexer::getLocForEndOfToken(Branches[I]->getEndLoc(), 0,
386 diag(Branches[J]->getBeginLoc(), "clone %0 starts here",
410 // but we do not try to distinguish branches in such code.
414 // We will first collect the branches of the switch statements. For the
415 // sake of simplicity we say that branches are delimited by the SwitchCase
419 llvm::SmallVector<SwitchBranch, 4> Branches;
423 Branches.emplace_back();
428 // store those statements in branches.
429 if (!Branches.empty())
430 Branches.back().push_back(S);
433 auto *End = Branches.end();
434 auto *BeginCurrent = Branches.begin();
447 // complete family of consecutive identical branches.
450 // No consecutive identical branches that start on BeginCurrent
456 "switch has %0 consecutive identical branches")