| #===------------------------------------------------------------------------===# |
| # |
| # Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. |
| # See https://llvm.org/LICENSE.txt for license information. |
| # SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception |
| # |
| #===------------------------------------------------------------------------===# |
| |
| # Check that all functions in the libc++ headers are either marked with hidden |
| # visibility or default visibility |
| |
| # TODO: enable the check for all functions once we don't force-inline everything with GCC |
| match |
| functionDecl( |
| unless( |
| anyOf( |
| hasName("__introsort"), |
| hasName("__inplace_merge"), |
| hasName("__libcpp_snprintf_l"), |
| hasName("__libcpp_asprintf_l"), |
| hasName("__libcpp_sscanf_l"), |
| hasName("__tree_sub_invariant"), |
| hasName("__stable_sort_move"), |
| hasName("__stable_sort"), |
| hasName("__stable_partition"), |
| hasName("__lock_first"), |
| hasName("__stable_partition_impl"), |
| hasAttr("attr::Visibility"), |
| hasAttr("attr::AbiTag"), |
| cxxMethodDecl(), # We have explicitly instantiated classes and some of their methods don't have these attributes |
| isDeleted(), |
| isConsteval(), |
| isExpansionInSystemHeader() |
| ) |
| ), |
| isDefinition() |
| ) |