diff options
author | Dmitri Gribenko <gribozavr@gmail.com> | 2012-09-14 16:35:35 +0000 |
---|---|---|
committer | Dmitri Gribenko <gribozavr@gmail.com> | 2012-09-14 16:35:35 +0000 |
commit | 8c05da3fd8db98af482826ba059ab1ad6d58010f (patch) | |
tree | f244d88fa34892e580964a51d85be2dc66b3512a /lib/AST/CommentLexer.cpp | |
parent | 388a594cd04aae78be452f6eacb9ca6be239c1f8 (diff) |
Comment parsing: don't parse comment marker followed by a digit as a command
since no Doxygen command starts with a digit.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163909 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/AST/CommentLexer.cpp')
-rw-r--r-- | lib/AST/CommentLexer.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/AST/CommentLexer.cpp b/lib/AST/CommentLexer.cpp index fde2c40fa5..31a09f71d9 100644 --- a/lib/AST/CommentLexer.cpp +++ b/lib/AST/CommentLexer.cpp @@ -226,6 +226,11 @@ bool isWhitespace(const char *BufferPtr, const char *BufferEnd) { return skipWhitespace(BufferPtr, BufferEnd) == BufferEnd; } +bool isCommandNameStartCharacter(char C) { + return (C >= 'a' && C <= 'z') || + (C >= 'A' && C <= 'Z'); +} + bool isCommandNameCharacter(char C) { return (C >= 'a' && C <= 'z') || (C >= 'A' && C <= 'Z') || @@ -340,7 +345,7 @@ void Lexer::lexCommentText(Token &T) { } // Don't make zero-length commands. - if (!isCommandNameCharacter(*TokenPtr)) { + if (!isCommandNameStartCharacter(*TokenPtr)) { formTextToken(T, TokenPtr); return; } |