[cfe-commits] r160396 - /cfe/trunk/lib/AST/CommentBriefParser.cpp
Dmitri Gribenko
gribozavr at gmail.com
Tue Jul 17 14:21:55 PDT 2012
Author: gribozavr
Date: Tue Jul 17 16:21:55 2012
New Revision: 160396
URL: http://llvm.org/viewvc/llvm-project?rev=160396&view=rev
Log:
CommentBriefParser: use StringSwitch::Cases to group synonyms. Thanks Jordan!
Modified:
cfe/trunk/lib/AST/CommentBriefParser.cpp
Modified: cfe/trunk/lib/AST/CommentBriefParser.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/AST/CommentBriefParser.cpp?rev=160396&r1=160395&r2=160396&view=diff
==============================================================================
--- cfe/trunk/lib/AST/CommentBriefParser.cpp (original)
+++ cfe/trunk/lib/AST/CommentBriefParser.cpp Tue Jul 17 16:21:55 2012
@@ -42,17 +42,12 @@
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
More information about the cfe-commits
mailing list