From dde8f1b9570b135d58766387f8bf4b829a8c2c77 Mon Sep 17 00:00:00 2001 From: alandefreitas Date: Tue, 14 Jan 2025 16:40:13 -0300 Subject: [PATCH 1/6] attributes template use double brackets #fix --- .../generator/common/partials/symbol/signature/field.hbs | 2 +- .../generator/common/partials/symbol/signature/function.hbs | 2 +- test-files/golden-tests/metadata/attributes_1.adoc | 2 +- test-files/golden-tests/metadata/attributes_1.html | 2 +- test-files/golden-tests/metadata/no_unique_address.adoc | 2 +- test-files/golden-tests/metadata/no_unique_address.html | 2 +- test-files/golden-tests/metadata/noreturn.adoc | 6 +++--- test-files/golden-tests/metadata/noreturn.html | 6 +++--- test-files/golden-tests/snippets/terminate.adoc | 2 +- test-files/golden-tests/snippets/terminate.html | 2 +- 10 files changed, 14 insertions(+), 14 deletions(-) diff --git a/share/mrdocs/addons/generator/common/partials/symbol/signature/field.hbs b/share/mrdocs/addons/generator/common/partials/symbol/signature/field.hbs index cd4c317b88..adb83e6528 100644 --- a/share/mrdocs/addons/generator/common/partials/symbol/signature/field.hbs +++ b/share/mrdocs/addons/generator/common/partials/symbol/signature/field.hbs @@ -1,4 +1,4 @@ -{{#if attributes}}[{{join ", " attributes}}] +{{#if attributes}}[[{{join ", " attributes}}]] {{/if}} {{#if isMutable}}mutable {{/if~}} diff --git a/share/mrdocs/addons/generator/common/partials/symbol/signature/function.hbs b/share/mrdocs/addons/generator/common/partials/symbol/signature/function.hbs index ceb4a159f3..412346c13e 100644 --- a/share/mrdocs/addons/generator/common/partials/symbol/signature/function.hbs +++ b/share/mrdocs/addons/generator/common/partials/symbol/signature/function.hbs @@ -2,7 +2,7 @@ {{/if~}} {{#if isFriend}}friend {{/if~}} -{{#if attributes}}{{#unless isFriend}}[{{join ", " attributes}}] +{{#if attributes}}{{#unless isFriend}}[[{{join ", " attributes}}]] {{/unless}}{{/if~}} {{#if constexprKind}}{{constexprKind}} {{/if~}} diff --git a/test-files/golden-tests/metadata/attributes_1.adoc b/test-files/golden-tests/metadata/attributes_1.adoc index 480b2ed11d..6a21d8d78e 100644 --- a/test-files/golden-tests/metadata/attributes_1.adoc +++ b/test-files/golden-tests/metadata/attributes_1.adoc @@ -25,7 +25,7 @@ Declared in `<attributes_1.cpp>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- -[nodiscard] +[[nodiscard]] bool f(); ---- diff --git a/test-files/golden-tests/metadata/attributes_1.html b/test-files/golden-tests/metadata/attributes_1.html index e0d7f71722..fcc47a1e8c 100644 --- a/test-files/golden-tests/metadata/attributes_1.html +++ b/test-files/golden-tests/metadata/attributes_1.html @@ -32,7 +32,7 @@

Synopsis

Declared in <attributes_1.cpp>
 
-[nodiscard]
+[[nodiscard]]
 bool
 f();
 
diff --git a/test-files/golden-tests/metadata/no_unique_address.adoc b/test-files/golden-tests/metadata/no_unique_address.adoc
index 61f0ccae6e..2395065b95 100644
--- a/test-files/golden-tests/metadata/no_unique_address.adoc
+++ b/test-files/golden-tests/metadata/no_unique_address.adoc
@@ -69,7 +69,7 @@ Declared in `<no_unique_address.cpp>`
 
 [source,cpp,subs="verbatim,replacements,macros,-callouts"]
 ----
-[deprecated, maybe_unused]
+[[deprecated, maybe_unused]]
 <> e = Empty{};
 ----
 
diff --git a/test-files/golden-tests/metadata/no_unique_address.html b/test-files/golden-tests/metadata/no_unique_address.html
index db369bac25..4fb80d7bc6 100644
--- a/test-files/golden-tests/metadata/no_unique_address.html
+++ b/test-files/golden-tests/metadata/no_unique_address.html
@@ -80,7 +80,7 @@ 

Synopsis

Declared in <no_unique_address.cpp>
 
-[deprecated, maybe_unused]
+[[deprecated, maybe_unused]]
 Empty e = Empty{};
 
 
diff --git a/test-files/golden-tests/metadata/noreturn.adoc b/test-files/golden-tests/metadata/noreturn.adoc index e90d9c4bf1..c103d8000b 100644 --- a/test-files/golden-tests/metadata/noreturn.adoc +++ b/test-files/golden-tests/metadata/noreturn.adoc @@ -74,7 +74,7 @@ Declared in `<noreturn.cpp>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- -[noreturn] +[[noreturn]] static void f2(); @@ -91,7 +91,7 @@ Declared in `<noreturn.cpp>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- -[noreturn] +[[noreturn]] void f3(); ---- @@ -123,7 +123,7 @@ Declared in `<noreturn.cpp>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- -[noreturn] +[[noreturn]] void f1(); ---- diff --git a/test-files/golden-tests/metadata/noreturn.html b/test-files/golden-tests/metadata/noreturn.html index 85e6a9f064..5f121220ca 100644 --- a/test-files/golden-tests/metadata/noreturn.html +++ b/test-files/golden-tests/metadata/noreturn.html @@ -97,7 +97,7 @@

Synopsis

Declared in <noreturn.cpp>
 
-[noreturn]
+[[noreturn]]
 static
 void
 f2();
@@ -115,7 +115,7 @@ 

Synopsis

Declared in <noreturn.cpp>
 
-[noreturn]
+[[noreturn]]
 void
 f3();
 
@@ -149,7 +149,7 @@ 

Synopsis

Declared in <noreturn.cpp>
 
-[noreturn]
+[[noreturn]]
 void
 f1();
 
diff --git a/test-files/golden-tests/snippets/terminate.adoc b/test-files/golden-tests/snippets/terminate.adoc
index 2d14d8e6e3..5c70c8d359 100644
--- a/test-files/golden-tests/snippets/terminate.adoc
+++ b/test-files/golden-tests/snippets/terminate.adoc
@@ -33,7 +33,7 @@ Declared in `<terminate.cpp>`
 
 [source,cpp,subs="verbatim,replacements,macros,-callouts"]
 ----
-[noreturn]
+[[noreturn]]
 void
 terminate() noexcept;
 ----
diff --git a/test-files/golden-tests/snippets/terminate.html b/test-files/golden-tests/snippets/terminate.html
index 760731a6c2..6ece5e2f05 100644
--- a/test-files/golden-tests/snippets/terminate.html
+++ b/test-files/golden-tests/snippets/terminate.html
@@ -39,7 +39,7 @@ 

Synopsis

Declared in <terminate.cpp>
 
-[noreturn]
+[[noreturn]]
 void
 terminate() noexcept;
 

From 7519ab95de47bf2eb08bedcc6e13871b78d2ed39 Mon Sep 17 00:00:00 2001
From: alandefreitas 
Date: Tue, 14 Jan 2025 16:42:46 -0300
Subject: [PATCH 2/6] extraction mode upgrade checks file filters

#fix
---
 src/lib/AST/ASTVisitor.cpp                  |  3 ++-
 test-files/golden-tests/core/libcxx.adoc    | 13 -------------
 test-files/golden-tests/core/libcxx.html    | 17 -----------------
 test-files/golden-tests/core/libcxx.xml     |  2 --
 test-files/golden-tests/metadata/mrdocs.yml |  2 ++
 test-files/golden-tests/snippets/sqrt.adoc  | 13 -------------
 test-files/golden-tests/snippets/sqrt.html  | 17 -----------------
 test-files/golden-tests/snippets/sqrt.xml   |  2 --
 8 files changed, 4 insertions(+), 65 deletions(-)

diff --git a/src/lib/AST/ASTVisitor.cpp b/src/lib/AST/ASTVisitor.cpp
index 54e5b6fbef..86bc41ff74 100644
--- a/src/lib/AST/ASTVisitor.cpp
+++ b/src/lib/AST/ASTVisitor.cpp
@@ -675,7 +675,8 @@ populateInfoBases(InfoTy& I, bool const isNew, DeclTy* D)
     {
         // Try an exact match here
         auto qualifiedName = this->qualifiedName(D);
-        if (checkSymbolFiltersImpl(std::string_view(qualifiedName.str())))
+        if (checkSymbolFiltersImpl(std::string_view(qualifiedName.str())) &&
+            checkFileFilters(D))
         {
             I.Extraction = ExtractionMode::Regular;
             // default mode also becomes regular for its
diff --git a/test-files/golden-tests/core/libcxx.adoc b/test-files/golden-tests/core/libcxx.adoc
index 4f98fa9603..15b1d74179 100644
--- a/test-files/golden-tests/core/libcxx.adoc
+++ b/test-files/golden-tests/core/libcxx.adoc
@@ -5,14 +5,6 @@
 == Global namespace
 
 
-=== Namespaces
-
-[cols=1]
-|===
-| Name 
-
-| <> 
-|===
 === Functions
 
 [cols=2]
@@ -26,11 +18,6 @@
 
 |===
 
-[#std]
-== std
-
-
-
 [#sqrt]
 == sqrt
 
diff --git a/test-files/golden-tests/core/libcxx.html b/test-files/golden-tests/core/libcxx.html
index df50908d0c..c25e995c44 100644
--- a/test-files/golden-tests/core/libcxx.html
+++ b/test-files/golden-tests/core/libcxx.html
@@ -9,18 +9,6 @@ 

Reference

Global namespace

-

Namespaces

- - - - - - - - - - -
Name
std

Functions

@@ -38,11 +26,6 @@

Functions

-

std

-
-
-
-

sqrt

Computes the square root of an integral value.

diff --git a/test-files/golden-tests/core/libcxx.xml b/test-files/golden-tests/core/libcxx.xml index c9ace632b4..21ccb072d4 100644 --- a/test-files/golden-tests/core/libcxx.xml +++ b/test-files/golden-tests/core/libcxx.xml @@ -2,8 +2,6 @@ - -