Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion clang/lib/AST/CommentLexer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ bool isCommandNameStartCharacter(char C) {
}

bool isCommandNameCharacter(char C) {
return isAlphanumeric(C);
return isAsciiIdentifierContinue(C, false);
}

const char *skipCommandName(const char *BufferPtr, const char *BufferEnd) {
Expand Down
6 changes: 6 additions & 0 deletions clang/test/AST/ast-dump-comment.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -131,3 +131,9 @@ void Test_TemplatedFunctionVariadic(int arg, ...);
// CHECK: ParamCommandComment{{.*}} [in] implicitly Param="..."
// CHECK-NEXT: ParagraphComment
// CHECK-NEXT: TextComment{{.*}} Text=" More arguments"

/// \thread_safe test for underscore in special command
int Test_UnderscoreInSpecialCommand;
// CHECK: VarDecl{{.*}}Test_UnderscoreInSpecialCommand 'int'
// CHECK: InlineCommandComment{{.*}} Name="thread_safe" RenderNormal
// CHECK-NEXT: TextComment{{.*}} Text=" test for underscore in special command"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This file needs an empty line at the end of it.