Skip to content

Commit 9cfd897

Browse files
author
Brock Denson
committed
[clang] unrecognized html tag causing undesirable comment lexing. fixes llvm#32680
1 parent 86813aa commit 9cfd897

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

clang/include/clang/AST/CommentHTMLTags.td

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ def Col : Tag<"col"> { let EndTagForbidden = 1; }
5151
def Tr : Tag<"tr"> { let EndTagOptional = 1; }
5252
def Th : Tag<"th"> { let EndTagOptional = 1; }
5353
def Td : Tag<"td"> { let EndTagOptional = 1; }
54+
def Summary : Tag<"summary">;
5455

5556
// Define a list of attributes that are not safe to pass through to HTML
5657
// output if the input is untrusted.

clang/test/AST/ast-dump-comment.cpp

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,3 +131,12 @@ void Test_TemplatedFunctionVariadic(int arg, ...);
131131
// CHECK: ParamCommandComment{{.*}} [in] implicitly Param="..."
132132
// CHECK-NEXT: ParagraphComment
133133
// CHECK-NEXT: TextComment{{.*}} Text=" More arguments"
134+
135+
/// \param[out] Aaa <summary>Short summary</summary>
136+
int Test_HTMLSummaryTag(int Aaa);
137+
// CHECK: FunctionDecl{{.*}}Test_HTMLSummaryTag
138+
// CHECK: ParamCommandComment{{.*}} [out] explicitly Param="Aaa"
139+
// CHECK-NEXT: ParagraphComment
140+
// CHECK: HTMLStartTagComment{{.*}} Name="summary"
141+
// CHECK-NEXT: TextComment{{.*}} Text="Short summary"
142+
// CHECK-NEXT: HTMLEndTagComment{{.*}} Name="summary"

0 commit comments

Comments
 (0)