aboutsummaryrefslogtreecommitdiff
path: root/docs/markdown
diff options
context:
space:
mode:
Diffstat (limited to 'docs/markdown')
-rw-r--r--docs/markdown/Reference-tables.md12
-rw-r--r--docs/markdown/snippets/split-visibility-attributes.md14
2 files changed, 25 insertions, 1 deletions
diff --git a/docs/markdown/Reference-tables.md b/docs/markdown/Reference-tables.md
index 682e508..84ce06f 100644
--- a/docs/markdown/Reference-tables.md
+++ b/docs/markdown/Reference-tables.md
@@ -182,12 +182,22 @@ which are supported by GCC, Clang, and other compilers.
| returns_nonnull |
| unused |
| used |
-| visibility |
+| visibility* |
+| visibility:default† |
+| visibility:hidden† |
+| visibility:internal† |
+| visibility:protected†|
| warning |
| warn_unused_result |
| weak |
| weakreaf |
+\* *Changed in 0.52.0* the "visibility" target no longer includes
+"protected", which is not present in Apple's clang.
+
+† *New in 0.52.0* These split visibility attributes are preferred to the plain
+"visibility" as they provide narrower checks.
+
### MSVC __declspec
These values are supported using the MSVC style `__declspec` annotation,
diff --git a/docs/markdown/snippets/split-visibility-attributes.md b/docs/markdown/snippets/split-visibility-attributes.md
new file mode 100644
index 0000000..e8cd152
--- /dev/null
+++ b/docs/markdown/snippets/split-visibility-attributes.md
@@ -0,0 +1,14 @@
+## Splitting of Compiler.get_function_attribute('visibility')
+
+On macOS there is no `protected` visibility, which results in the visbility
+check always failing. 0.52.0 introduces two changes to improve this situation:
+
+1. the "visibility" check no longer includes "protected"
+2. a new set of "split" checks are introduced which check for a single
+ attribute instead of all attributes.
+
+These new attributes are:
+* visibility:default
+* visibility:hidden
+* visibility:internal
+* visibility:protected \ No newline at end of file