Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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
1 change: 1 addition & 0 deletions clang/docs/ReleaseNotes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,7 @@ Bug Fixes to AST Handling
- Fix incorrect name qualifiers applied to alias CTAD. (#GH136624)
- Fixed ElaboratedTypes appearing within NestedNameSpecifier, which was not a
legal representation. This is fixed because ElaboratedTypes don't exist anymore. (#GH43179) (#GH68670) (#GH92757)
- Fix comment lexing of special command names (#GH152943)

Miscellaneous Bug Fixes
^^^^^^^^^^^^^^^^^^^^^^^
Expand Down
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"