From: Chandler Carruth Date: Wed, 20 Jun 2012 06:47:54 +0000 (+0000) Subject: Fix a warning on a fully covered switch with a default: X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=13691bba2423e404b3efc0dfc5206d04ef33dcc6;p=clang Fix a warning on a fully covered switch with a default: ../tools/clang/lib/Serialization/ASTReader.cpp:6316:9: warning: default label in switch which covers all enumeration values [-Wcovered-switch-default] Also fix the indentation here to match the coding conventions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158794 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Serialization/ASTReader.cpp b/lib/Serialization/ASTReader.cpp index 9f10a0b741..8b354f3557 100644 --- a/lib/Serialization/ASTReader.cpp +++ b/lib/Serialization/ASTReader.cpp @@ -6313,19 +6313,16 @@ void ASTReader::ReadComments() { // Read a record. Record.clear(); switch ((CommentRecordTypes) Cursor.ReadRecord(Code, Record)) { - default: // Default behavior: ignore. - break; - - case COMMENTS_RAW_COMMENT: { - unsigned Idx = 0; - SourceRange SR = ReadSourceRange(F, Record, Idx); - RawComment::CommentKind Kind = - (RawComment::CommentKind) Record[Idx++]; - bool IsTrailingComment = Record[Idx++]; - bool IsAlmostTrailingComment = Record[Idx++]; - Comments.push_back(RawComment(SR, Kind, IsTrailingComment, - IsAlmostTrailingComment)); - break; + case COMMENTS_RAW_COMMENT: { + unsigned Idx = 0; + SourceRange SR = ReadSourceRange(F, Record, Idx); + RawComment::CommentKind Kind = + (RawComment::CommentKind) Record[Idx++]; + bool IsTrailingComment = Record[Idx++]; + bool IsAlmostTrailingComment = Record[Idx++]; + Comments.push_back(RawComment(SR, Kind, IsTrailingComment, + IsAlmostTrailingComment)); + break; } } }