[PATCH] D65883: [Extract] Fixed SemicolonExtractionPolicy for SwitchStmt and SwitchCase
Shaurya Gupta via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Aug 7 08:34:36 PDT 2019
SureYeaah updated this revision to Diff 213909.
SureYeaah added a comment.
Removed Do
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D65883/new/
https://reviews.llvm.org/D65883
Files:
clang/lib/Tooling/Refactoring/Extract/SourceExtraction.cpp
Index: clang/lib/Tooling/Refactoring/Extract/SourceExtraction.cpp
===================================================================
--- clang/lib/Tooling/Refactoring/Extract/SourceExtraction.cpp
+++ clang/lib/Tooling/Refactoring/Extract/SourceExtraction.cpp
@@ -40,8 +40,11 @@
return isSemicolonRequiredAfter(CXXFor->getBody());
if (const auto *ObjCFor = dyn_cast<ObjCForCollectionStmt>(S))
return isSemicolonRequiredAfter(ObjCFor->getBody());
+ if(const auto *Switch = dyn_cast<SwitchStmt>(S))
+ return isSemicolonRequiredAfter(Switch->getBody());
+ if(const auto *Case = dyn_cast<SwitchCase>(S))
+ return isSemicolonRequiredAfter(Case->getSubStmt());
switch (S->getStmtClass()) {
- case Stmt::SwitchStmtClass:
case Stmt::CXXTryStmtClass:
case Stmt::ObjCAtSynchronizedStmtClass:
case Stmt::ObjCAutoreleasePoolStmtClass:
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D65883.213909.patch
Type: text/x-patch
Size: 857 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20190807/8e1b81ef/attachment.bin>
More information about the cfe-commits
mailing list