diff --git a/src/lib/AST/ASTVisitor.cpp b/src/lib/AST/ASTVisitor.cpp
index bee3cd80f..a33826061 100644
--- a/src/lib/AST/ASTVisitor.cpp
+++ b/src/lib/AST/ASTVisitor.cpp
@@ -644,15 +644,6 @@ populate(
RecordInfo& I,
CXXRecordDecl const* D)
{
- // Unnamed structs and classes are implementation-defined
- // or dependencies at best. There are never pages for them.
- if (D->getIdentifier() == nullptr)
- {
- I.Extraction = mostSpecific(
- ExtractionMode::ImplementationDefined,
- I.Extraction);
- }
-
if (D->getTypedefNameForAnonDecl())
{
I.IsTypeDef = true;
diff --git a/test-files/golden-tests/symbols/record/unnamed.adoc b/test-files/golden-tests/symbols/record/unnamed.adoc
index d236692ff..ded90cd2b 100644
--- a/test-files/golden-tests/symbols/record/unnamed.adoc
+++ b/test-files/golden-tests/symbols/record/unnamed.adoc
@@ -4,13 +4,102 @@
[#index]
== Global namespace
+=== Types
+
+[cols=2]
+|===
+| Name
+| Description
+| link:#_01record-01[`Unnamed struct`]
+|
+| link:#_01record-0f[`Unnamed struct`]
+| A test unnamed class.
+|===
+
=== Variables
-[cols=1]
+[cols=2]
|===
| Name
+| Description
| link:#F[`F`]
+|
+| link:#x[`x`]
+| A test variable named 'x'
+| link:#y[`y`]
+| A test variable named 'y'
+|===
+
+[#_01record-01]
+== Unnamed struct
+
+=== Synopsis
+
+Declared in `<unnamed.cpp>`
+
+[source,cpp,subs="verbatim,replacements,macros,-callouts"]
+----
+struct Unnamed struct;
+----
+
+=== Member Functions
+
+[cols=1]
|===
+| Name
+| link:#_01record-01-operator_call[`operator()`]
+|===
+
+[#_01record-01-operator_call]
+== operator()
+
+=== Synopsis
+
+Declared in `<unnamed.cpp>`
+
+[source,cpp,subs="verbatim,replacements,macros,-callouts"]
+----
+void
+operator()() const;
+----
+
+[#_01record-0f]
+== Unnamed struct
+
+A test unnamed class.
+
+=== Synopsis
+
+Declared in `<unnamed.cpp>`
+
+[source,cpp,subs="verbatim,replacements,macros,-callouts"]
+----
+struct Unnamed struct;
+----
+
+=== Data Members
+
+[cols=2]
+|===
+| Name
+| Description
+| link:#_01record-0f-a[`a`]
+| A test field.
+|===
+
+[#_01record-0f-a]
+== a
+
+A test field.
+
+=== Synopsis
+
+Declared in `<unnamed.cpp>`
+
+[source,cpp,subs="verbatim,replacements,macros,-callouts"]
+----
+int a;
+----
[#F]
== F
@@ -21,7 +110,37 @@ Declared in `<unnamed.cpp>`
[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
-constexpr /* implementation-defined */ F = {};
+constexpr link:#_01record-01[] F = {};
+----
+
+[#x]
+== x
+
+A test variable named 'x'
+
+=== Synopsis
+
+Declared in `<unnamed.cpp>`
+
+[source,cpp,subs="verbatim,replacements,macros,-callouts"]
+----
+extern
+link:#_01record-0f[] x;
+----
+
+[#y]
+== y
+
+A test variable named 'y'
+
+=== Synopsis
+
+Declared in `<unnamed.cpp>`
+
+[source,cpp,subs="verbatim,replacements,macros,-callouts"]
+----
+extern
+link:#_01record-0f[] y;
----
diff --git a/test-files/golden-tests/symbols/record/unnamed.cpp b/test-files/golden-tests/symbols/record/unnamed.cpp
index 709c287a3..69efc0af5 100644
--- a/test-files/golden-tests/symbols/record/unnamed.cpp
+++ b/test-files/golden-tests/symbols/record/unnamed.cpp
@@ -2,3 +2,13 @@ constexpr struct
{
void operator()() const;
} const F{};
+
+/// A test unnamed class.
+extern struct {
+ /// A test field.
+ int a;
+}
+ /// A test variable named 'x'
+ x,
+ /// A test variable named 'y'
+ y;
diff --git a/test-files/golden-tests/symbols/record/unnamed.html b/test-files/golden-tests/symbols/record/unnamed.html
index be2bd36c9..161447e57 100644
--- a/test-files/golden-tests/symbols/record/unnamed.html
+++ b/test-files/golden-tests/symbols/record/unnamed.html
@@ -9,19 +9,137 @@
Reference
+Types
+
+
Variables
| Name |
+Description |
+
+
+
+
+F | |
+x | A test variable named 'x' |
+y | A test variable named 'y' |
+
+
+
+
+
+
+
+
Synopsis
+
+Declared in <unnamed.cpp>
+
+struct Unnamed struct;
+
+
+
+
+
Member Functions
+
+
+
+
+
+
+
+
Synopsis
+
+Declared in <unnamed.cpp>
+
+void
+operator()() const;
+
+
+
+
+
+
+
+
+
+A test unnamed class.
+
+
+
+
+
Synopsis
+
+Declared in <unnamed.cpp>
+
+struct Unnamed struct;
+
+
+
+
+
Data Members
+
+
+
+| Name |
+Description |
+
+
+
+
+a | A test field. |
+
+
+
+
+
+
+
+
+
+
Synopsis
+
+Declared in <unnamed.cpp>
+
+int a;
+
+
+
+
@@ -32,7 +150,47 @@
Synopsis
Declared in <unnamed.cpp>
-constexpr /* implementation-defined */ F = {};
+constexpr F = {};
+
+
+
+
+
+
+
+
+
+A test variable named 'x'
+
+
+
+
+
Synopsis
+
+Declared in <unnamed.cpp>
+
+extern
+ x;
+
+
+
+
+
+
+
+
+
+A test variable named 'y'
+
+
+
+
+
Synopsis
+
+Declared in <unnamed.cpp>
+
+extern
+ y;
diff --git a/test-files/golden-tests/symbols/record/unnamed.xml b/test-files/golden-tests/symbols/record/unnamed.xml
index c3280b32c..1e194ea3b 100644
--- a/test-files/golden-tests/symbols/record/unnamed.xml
+++ b/test-files/golden-tests/symbols/record/unnamed.xml
@@ -4,11 +4,53 @@
+
+
+
+
+
+
+
+
+
+
+ A test unnamed class.
+
+
+
+
+
+
+
+ A test field.
+
+
+
+
+
+
+
+
+
+ A test variable named 'x'
+
+
+
+
+
+
+
+
+
+ A test variable named 'y'
+
+
+