]> granicus.if.org Git - clang/commitdiff
CommentBriefParser: use StringSwitch::Cases to group synonyms. Thanks Jordan!
authorDmitri Gribenko <gribozavr@gmail.com>
Tue, 17 Jul 2012 21:21:55 +0000 (21:21 +0000)
committerDmitri Gribenko <gribozavr@gmail.com>
Tue, 17 Jul 2012 21:21:55 +0000 (21:21 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160396 91177308-0d34-0410-b5e6-96231b3b80d8

lib/AST/CommentBriefParser.cpp

index 687ece219425b9fcaed6f3991c0acc3cf5b180e6..a6bf33edd4118052b443691eeafa3bf091577cec 100644 (file)
@@ -42,17 +42,12 @@ void cleanupBrief(std::string &S) {
 
 bool isBlockCommand(StringRef Name) {
   return llvm::StringSwitch<bool>(Name)
-      .Case("brief", true)
-      .Case("short", true)
-      .Case("result", true)
-      .Case("return", true)
-      .Case("returns", true)
-      .Case("author", true)
-      .Case("authors", true)
+      .Cases("brief", "short", true)
+      .Cases("result", "return", "returns", true)
+      .Cases("author", "authors", true)
       .Case("pre", true)
       .Case("post", true)
-      .Case("param", true)
-      .Case("arg", true)
+      .Cases("param", "arg", true)
       .Default(false);
 }
 } // unnamed namespace