diff --git a/clang-tools-extra/clang-doc/HTMLGenerator.cpp b/clang-tools-extra/clang-doc/HTMLGenerator.cpp
index a6ebc007278db..18a0de826630c 100644
--- a/clang-tools-extra/clang-doc/HTMLGenerator.cpp
+++ b/clang-tools-extra/clang-doc/HTMLGenerator.cpp
@@ -494,18 +494,31 @@ genReferencesBlock(const std::vector Defined at line 8 of file {{.*}}Shape.h Abstract base class for shapes. Provides a common interface for different types of shapes. public double area() Calculates the area of the shape. public double perimeter() Calculates the perimeter of the shape. double The perimeter of the shape. public void ~Shape() Defined at line 13 of file {{.*}}Shape.h Virtual destructor.
+// HTML-SHAPE-NEXT: Defined at line
+// HTML-SHAPE-NEXT: 8
+// HTML-SHAPE-NEXT: of file
+// HTML-SHAPE-NEXT: Shape.h
+// HTML-SHAPE-NEXT: Abstract base class for shapes. Provides a common interface for different types of shapes. public double area() Calculates the area of the shape. public double perimeter() Calculates the perimeter of the shape. double The perimeter of the shape. public void ~Shape() Virtual destructor. Defined at line 8 of file {{.*}}Calculator.h A simple calculator class. Provides basic arithmetic operations. public int add(int a, int b) Defined at line 3 of file {{.*}}Calculator.cpp Adds two integers. int The sum of a and b. public int subtract(int a, int b) Defined at line 7 of file {{.*}}Calculator.cpp Subtracts the second integer from the first. int The result of a - b. public int multiply(int a, int b) Defined at line 11 of file {{.*}}Calculator.cpp Multiplies two integers. int The product of a and b. public double divide(int a, int b) Defined at line 15 of file {{.*}}Calculator.cpp Divides the first integer by the second. double The result of a / b. if b is zero.
+// HTML-CALC-NEXT: Defined at line
+// HTML-CALC-NEXT: 8
+// HTML-CALC-NEXT: of file
+// HTML-CALC-NEXT: Calculator.h
+// HTML-CALC-NEXT: A simple calculator class. Provides basic arithmetic operations. public int add(int a, int b) Adds two integers. int The sum of a and b. public int subtract(int a, int b) Subtracts the second integer from the first. int The result of a - b. public int multiply(int a, int b) Multiplies two integers. int The product of a and b. public double divide(int a, int b) Divides the first integer by the second. double The result of a / b. if b is zero. Defined at line 10 of file {{.*}}Rectangle.h Represents a rectangle with a given width and height.class Shape
-// HTML-SHAPE: Functions
-// HTML-SHAPE: area
-// HTML-SHAPE: perimeter
-// HTML-SHAPE: ~Shape
-// HTML-SHAPE: class Shape
+// HTML-SHAPE-NEXT: Functions
+// HTML-SHAPE: area
+// HTML-SHAPE: perimeter
+// HTML-SHAPE: ~Shape
+// HTML-SHAPE: class Calculator
-// HTML-CALC: Functions
-// HTML-CALC: add
-// HTML-CALC: subtract
-// HTML-CALC: multiply
-// HTML-CALC: divide
-// HTML-CALC: class Calculator
+// HTML-CALC-NEXT: Functions
+// HTML-CALC: add
+// HTML-CALC: subtract
+// HTML-CALC: multiply
+// HTML-CALC: divide
+// HTML-CALC: class Rectangle
-// HTML-RECTANGLE:
Width of the rectangle.
-// HTML-RECTANGLE:Height of the rectangle.
-// HTML-RECTANGLE:public void Rectangle(double width, double height)
-// HTML-RECTANGLE:Defined at line 3 of file {{.*}}Rectangle.cpp
-// HTML-RECTANGLE:Constructs a new Rectangle object.
-// HTML-RECTANGLE:public double area()
-// HTML-RECTANGLE:Defined at line 6 of file {{.*}}Rectangle.cpp
-// HTML-RECTANGLE:Calculates the area of the rectangle.
-// HTML-RECTANGLE:double The area of the rectangle.
-// HTML-RECTANGLE:public double perimeter()
-// HTML-RECTANGLE:Defined at line 10 of file {{.*}}Rectangle.cpp
-// HTML-RECTANGLE:Calculates the perimeter of the rectangle.
-// HTML-RECTANGLE:double The perimeter of the rectangle.
+// HTML-RECTANGLE:+// HTML-RECTANGLE-NEXT: Defined at line +// HTML-RECTANGLE-NEXT: 10 +// HTML-RECTANGLE-NEXT: of file +// HTML-RECTANGLE-NEXT: Rectangle.h +// HTML-RECTANGLE-NEXT:
+// HTML-RECTANGLE:Represents a rectangle with a given width and height.
+// HTML-RECTANGLE:+// HTML-RECTANGLE: Inherits from +// HTML-RECTANGLE: Shape +// HTML-RECTANGLE:
+// HTML-RECTANGLE:Width of the rectangle.
+// HTML-RECTANGLE:Height of the rectangle.
+// HTML-RECTANGLE:public void Rectangle(double width, double height)
+// HTML-RECTANGLE: Defined at line +// HTML-RECTANGLE-NEXT: 3 +// HTML-RECTANGLE-NEXT: of file +// HTML-RECTANGLE-NEXT: Rectangle.cpp +// HTML-RECTANGLE:Constructs a new Rectangle object.
+// HTML-RECTANGLE:public double area()
+// HTML-RECTANGLE: Defined at line +// HTML-RECTANGLE-NEXT: 6 +// HTML-RECTANGLE-NEXT: of file +// HTML-RECTANGLE-NEXT: Rectangle.cpp +// HTML-RECTANGLE:Calculates the area of the rectangle.
+// HTML-RECTANGLE:double The area of the rectangle.
+// HTML-RECTANGLE:public double perimeter()
+// HTML-RECTANGLE: Defined at line +// HTML-RECTANGLE-NEXT: 10 +// HTML-RECTANGLE-NEXT: of file +// HTML-RECTANGLE-NEXT: Rectangle.cpp +// HTML-RECTANGLE:Calculates the perimeter of the rectangle.
+// HTML-RECTANGLE:double The perimeter of the rectangle.
-// HTML-CIRCLE:Defined at line 10 of file {{.*}}Circle.h
-// HTML-CIRCLE:Circle class derived from Shape.
-// HTML-CIRCLE:Represents a circle with a given radius.
-// HTML-CIRCLE:-// HTML-CIRCLE: Inherits from -// HTML-CIRCLE: Shape -// HTML-CIRCLE:
-// HTML-CIRCLE:Radius of the circle.
-// HTML-CIRCLE:public void Circle(double radius)
-// HTML-CIRCLE:Defined at line 3 of file {{.*}}Circle.cpp
-// HTML-CIRCLE:Constructs a new Circle object.
-// HTML-CIRCLE:public double area()
-// HTML-CIRCLE:Defined at line 5 of file {{.*}}Circle.cpp
-// HTML-CIRCLE:Calculates the area of the circle.
-// HTML-CIRCLE:double The area of the circle.
-// HTML-CIRCLE:public double perimeter()
-// HTML-CIRCLE:Defined at line 9 of file {{.*}}Circle.cpp
-// HTML-CIRCLE:Calculates the perimeter of the circle.
-// HTML-CIRCLE:double The perimeter of the circle.
+// HTML-CIRCLE:+// HTML-CIRCLE-NEXT: Defined at line +// HTML-CIRCLE-NEXT: 10 +// HTML-CIRCLE-NEXT: of file +// HTML-CIRCLE-NEXT: Circle.h +// HTML-CIRCLE-NEXT:
+// HTML-CIRCLE:Circle class derived from Shape.
+// HTML-CIRCLE:Represents a circle with a given radius.
+// HTML-CIRCLE:+// HTML-CIRCLE: Inherits from +// HTML-CIRCLE: Shape +// HTML-CIRCLE:
+// HTML-CIRCLE:Radius of the circle.
+// HTML-CIRCLE:public void Circle(double radius)
+// HTML-CIRCLE: Defined at line +// HTML-CIRCLE-NEXT: 3 +// HTML-CIRCLE-NEXT: of file +// HTML-CIRCLE-NEXT: Circle.cpp +// HTML-CIRCLE:Constructs a new Circle object.
+// HTML-CIRCLE:public double area()
+// HTML-CIRCLE: Defined at line +// HTML-CIRCLE-NEXT: 5 +// HTML-CIRCLE-NEXT: of file +// HTML-CIRCLE-NEXT: Circle.cpp +// HTML-CIRCLE:Calculates the area of the circle.
+// HTML-CIRCLE:double The area of the circle.
+// HTML-CIRCLE:public double perimeter()
+// HTML-CIRCLE: Defined at line +// HTML-CIRCLE-NEXT: 9 +// HTML-CIRCLE-NEXT: of file +// HTML-CIRCLE-NEXT: Circle.cpp +// HTML-CIRCLE:Calculates the perimeter of the circle.
+// HTML-CIRCLE:double The perimeter of the circle.
// MD-CALC: # class Calculator // MD-CALC: *Defined at .{{[\/]}}include{{[\/]}}Calculator.h#8* diff --git a/clang-tools-extra/unittests/clang-doc/HTMLGeneratorTest.cpp b/clang-tools-extra/unittests/clang-doc/HTMLGeneratorTest.cpp index dfd31e6578714..97afa12cab6d3 100644 --- a/clang-tools-extra/unittests/clang-doc/HTMLGeneratorTest.cpp +++ b/clang-tools-extra/unittests/clang-doc/HTMLGeneratorTest.cpp @@ -319,7 +319,12 @@ TEST(HTMLGeneratorTest, emitFunctionHTML) { int P) -Defined at line 10 of file dir/test.cpp
+