From: patrick
Date: Wed, 28 Apr 2021 12:28:50 +0000 (+0000)
Subject: Import LLVM 11.1.0 release including clang, lld and lldb.
X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=ec727ea710c91afd8ce4f788c5aaa8482b7b69b2;p=openbsd
Import LLVM 11.1.0 release including clang, lld and lldb.
---
diff --git a/gnu/llvm/clang/.clang-tidy b/gnu/llvm/clang/.clang-tidy
index 849c26987ef..5b425a71202 100644
--- a/gnu/llvm/clang/.clang-tidy
+++ b/gnu/llvm/clang/.clang-tidy
@@ -19,4 +19,6 @@ CheckOptions:
value: CamelCase
- key: readability-identifier-naming.VariableCase
value: CamelCase
+ - key: readability-identifier-naming.IgnoreMainLikeFunctions
+ value: 1
diff --git a/gnu/llvm/clang/CMakeLists.txt b/gnu/llvm/clang/CMakeLists.txt
index dc1413f4b59..bb4b801f01c 100644
--- a/gnu/llvm/clang/CMakeLists.txt
+++ b/gnu/llvm/clang/CMakeLists.txt
@@ -9,6 +9,10 @@ endif()
if( CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR )
project(Clang)
+ set(CMAKE_CXX_STANDARD 14 CACHE STRING "C++ standard to conform to")
+ set(CMAKE_CXX_STANDARD_REQUIRED YES)
+ set(CMAKE_CXX_EXTENSIONS NO)
+
# Rely on llvm-config.
set(CONFIG_OUTPUT)
if(LLVM_CONFIG)
@@ -117,6 +121,8 @@ if( CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR )
include(LLVMDistributionSupport)
set(PACKAGE_VERSION "${LLVM_PACKAGE_VERSION}")
+ set(BUG_REPORT_URL "${LLVM_PACKAGE_BUGREPORT}" CACHE STRING
+ "Default URL where bug reports are to be submitted.")
if (NOT DEFINED LLVM_INCLUDE_TESTS)
set(LLVM_INCLUDE_TESTS ON)
@@ -130,16 +136,38 @@ if( CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR )
set( CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib${LLVM_LIBDIR_SUFFIX} )
if(LLVM_INCLUDE_TESTS)
- include(FindPythonInterp)
- if(NOT PYTHONINTERP_FOUND)
- message(FATAL_ERROR
-"Unable to find Python interpreter, required for builds and testing.
+ if(CMAKE_VERSION VERSION_LESS 3.12)
+ include(FindPythonInterp)
+ if(NOT PYTHONINTERP_FOUND)
+ message(FATAL_ERROR
+ "Unable to find Python interpreter, required for builds and testing.
-Please install Python or specify the PYTHON_EXECUTABLE CMake variable.")
- endif()
+ Please install Python or specify the PYTHON_EXECUTABLE CMake variable.")
+ endif()
+
+ if( ${PYTHON_VERSION_STRING} VERSION_LESS 2.7 )
+ message(FATAL_ERROR "Python 2.7 or newer is required")
+ endif()
- if( ${PYTHON_VERSION_STRING} VERSION_LESS 2.7 )
- message(FATAL_ERROR "Python 2.7 or newer is required")
+ add_executable(Python3::Interpreter IMPORTED)
+ set_target_properties(Python3::Interpreter PROPERTIES
+ IMPORTED_LOCATION ${PYTHON_EXECUTABLE})
+ set(Python3_EXECUTABLE ${PYTHON_EXECUTABLE})
+ else()
+ find_package(Python3 COMPONENTS Interpreter)
+ if(NOT Python3_Interpreter_FOUND)
+ message(WARNING "Python3 not found, using python2 as a fallback")
+ find_package(Python2 COMPONENTS Interpreter REQUIRED)
+ if(Python2_VERSION VERSION_LESS 2.7)
+ message(SEND_ERROR "Python 2.7 or newer is required")
+ endif()
+
+ # Treat python2 as python3
+ add_executable(Python3::Interpreter IMPORTED)
+ set_target_properties(Python3::Interpreter PROPERTIES
+ IMPORTED_LOCATION ${Python2_EXECUTABLE})
+ set(Python3_EXECUTABLE ${Python2_EXECUTABLE})
+ endif()
endif()
# Check prebuilt llvm/utils.
@@ -226,7 +254,7 @@ set(C_INCLUDE_DIRS "" CACHE STRING
"Colon separated list of directories clang will search for headers.")
set(GCC_INSTALL_PREFIX "" CACHE PATH "Directory where gcc is installed." )
-set(DEFAULT_SYSROOT "" CACHE PATH
+set(DEFAULT_SYSROOT "" CACHE STRING
"Default to all compiler invocations for --sysroot=." )
set(ENABLE_LINKER_BUILD_ID OFF CACHE BOOL "pass --build-id to ld")
@@ -306,6 +334,8 @@ if (NOT DEFINED MATCHED_ARCH OR "${CMAKE_MATCH_1}" LESS 35)
"Default architecture for OpenMP offloading to Nvidia GPUs." FORCE)
endif()
+set(CLANG_SYSTEMZ_DEFAULT_ARCH "z10" CACHE STRING "SystemZ Default Arch")
+
set(CLANG_VENDOR ${PACKAGE_VENDOR} CACHE STRING
"Vendor-specific text for showing with version information.")
@@ -479,7 +509,7 @@ set(CLANG_EXECUTABLE_VERSION
"${CLANG_VERSION_MAJOR}" CACHE STRING
"Major version number that will be appended to the clang executable name")
set(LIBCLANG_LIBRARY_VERSION
- "${CLANG_VERSION_MAJOR}" CACHE STRING
+ "${CLANG_VERSION_MAJOR}.${CLANG_VERSION_MINOR}" CACHE STRING
"Major version number that will be appended to the libclang library")
mark_as_advanced(CLANG_EXECUTABLE_VERSION LIBCLANG_LIBRARY_VERSION)
@@ -493,7 +523,10 @@ add_subdirectory(include)
# All targets below may depend on all tablegen'd files.
get_property(CLANG_TABLEGEN_TARGETS GLOBAL PROPERTY CLANG_TABLEGEN_TARGETS)
-add_custom_target(clang-tablegen-targets DEPENDS ${CLANG_TABLEGEN_TARGETS})
+add_custom_target(clang-tablegen-targets
+ DEPENDS
+ omp_gen
+ ${CLANG_TABLEGEN_TARGETS})
set_target_properties(clang-tablegen-targets PROPERTIES FOLDER "Misc")
list(APPEND LLVM_COMMON_DEPENDS clang-tablegen-targets)
@@ -588,6 +621,7 @@ if(CLANG_LIBS)
add_dependencies(clang-libraries ${lib})
if(NOT LLVM_ENABLE_IDE)
add_dependencies(install-clang-libraries install-${lib})
+ add_dependencies(install-clang-libraries-stripped install-${lib}-stripped)
endif()
endforeach()
endif()
@@ -686,6 +720,7 @@ if (CLANG_ENABLE_BOOTSTRAP)
CLANG_VERSION_MAJOR
CLANG_VERSION_MINOR
CLANG_VERSION_PATCHLEVEL
+ CLANG_VENDOR
LLVM_VERSION_SUFFIX
LLVM_BINUTILS_INCDIR
CLANG_REPOSITORY_STRING
diff --git a/gnu/llvm/clang/bindings/python/clang/cindex.py b/gnu/llvm/clang/bindings/python/clang/cindex.py
index 8e5a9fe0068..aceaa131f15 100644
--- a/gnu/llvm/clang/bindings/python/clang/cindex.py
+++ b/gnu/llvm/clang/bindings/python/clang/cindex.py
@@ -2122,6 +2122,7 @@ TypeKind.OCLQUEUE = TypeKind(159)
TypeKind.OCLRESERVEID = TypeKind(160)
TypeKind.EXTVECTOR = TypeKind(176)
+TypeKind.ATOMIC = TypeKind(177)
class RefQualifierKind(BaseEnumeration):
"""Describes a specific ref-qualifier of a type."""
diff --git a/gnu/llvm/clang/bindings/python/tests/CMakeLists.txt b/gnu/llvm/clang/bindings/python/tests/CMakeLists.txt
index 626256af9c1..3f58c4bde8e 100644
--- a/gnu/llvm/clang/bindings/python/tests/CMakeLists.txt
+++ b/gnu/llvm/clang/bindings/python/tests/CMakeLists.txt
@@ -3,7 +3,7 @@
add_custom_target(check-clang-python
COMMAND ${CMAKE_COMMAND} -E env
CLANG_LIBRARY_PATH=$
- ${PYTHON_EXECUTABLE} -m unittest discover
+ "${Python3_EXECUTABLE}" -m unittest discover
DEPENDS libclang
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/..)
diff --git a/gnu/llvm/clang/bindings/python/tests/cindex/test_diagnostics.py b/gnu/llvm/clang/bindings/python/tests/cindex/test_diagnostics.py
index 52928db7303..64d0ca2ef9b 100644
--- a/gnu/llvm/clang/bindings/python/tests/cindex/test_diagnostics.py
+++ b/gnu/llvm/clang/bindings/python/tests/cindex/test_diagnostics.py
@@ -100,7 +100,7 @@ class TestDiagnostics(unittest.TestCase):
self.assertRegexpMatches(children[0].spelling,
'.*declared here')
self.assertEqual(children[0].location.line, 1)
- self.assertEqual(children[0].location.column, 1)
+ self.assertEqual(children[0].location.column, 6)
def test_diagnostic_string_repr(self):
tu = get_tu('struct MissingSemicolon{}')
diff --git a/gnu/llvm/clang/cmake/caches/Apple-stage1.cmake b/gnu/llvm/clang/cmake/caches/Apple-stage1.cmake
index 4b11342086a..8a4fe6dfdfd 100644
--- a/gnu/llvm/clang/cmake/caches/Apple-stage1.cmake
+++ b/gnu/llvm/clang/cmake/caches/Apple-stage1.cmake
@@ -20,6 +20,7 @@ set(CMAKE_MACOSX_RPATH ON CACHE BOOL "")
set(LLVM_ENABLE_ZLIB OFF CACHE BOOL "")
set(LLVM_ENABLE_BACKTRACES OFF CACHE BOOL "")
set(CLANG_PLUGIN_SUPPORT OFF CACHE BOOL "")
+set(CLANG_SPAWN_CC1 ON CACHE BOOL "")
set(CLANG_BOOTSTRAP_PASSTHROUGH
CMAKE_OSX_ARCHITECTURES
CACHE STRING "")
diff --git a/gnu/llvm/clang/cmake/caches/Apple-stage2.cmake b/gnu/llvm/clang/cmake/caches/Apple-stage2.cmake
index eb482700201..b24ec558c07 100644
--- a/gnu/llvm/clang/cmake/caches/Apple-stage2.cmake
+++ b/gnu/llvm/clang/cmake/caches/Apple-stage2.cmake
@@ -16,6 +16,7 @@ set(LLVM_ENABLE_BACKTRACES OFF CACHE BOOL "")
set(LLVM_ENABLE_MODULES ON CACHE BOOL "")
set(LLVM_EXTERNALIZE_DEBUGINFO ON CACHE BOOL "")
set(CLANG_PLUGIN_SUPPORT OFF CACHE BOOL "")
+set(CLANG_SPAWN_CC1 ON CACHE BOOL "")
set(BUG_REPORT_URL "http://developer.apple.com/bugreporter/" CACHE STRING "")
set(LLVM_BUILD_EXTERNAL_COMPILER_RT ON CACHE BOOL "Build Compiler-RT with just-built clang")
diff --git a/gnu/llvm/clang/cmake/caches/CrossWinToARMLinux.cmake b/gnu/llvm/clang/cmake/caches/CrossWinToARMLinux.cmake
index d08e09a291f..9aa0efa8049 100644
--- a/gnu/llvm/clang/cmake/caches/CrossWinToARMLinux.cmake
+++ b/gnu/llvm/clang/cmake/caches/CrossWinToARMLinux.cmake
@@ -25,6 +25,14 @@
# cmake --build . --target check-clang
# cmake --build . --target check-lld
+# LLVM_PROJECT_DIR is the path to the llvm-project directory.
+# The right way to compute it would probably be to use "${CMAKE_SOURCE_DIR}/../",
+# but CMAKE_SOURCE_DIR is set to the wrong value on earlier CMake versions
+# that we still need to support (for instance, 3.10.2).
+get_filename_component(LLVM_PROJECT_DIR
+ "${CMAKE_CURRENT_LIST_DIR}/../../../"
+ ABSOLUTE)
+
if (NOT DEFINED DEFAULT_SYSROOT)
message(WARNING "DEFAULT_SYSROOT must be specified for the cross toolchain build.")
endif()
@@ -78,19 +86,26 @@ set(LIBCXXABI_TARGET_TRIPLE "${CMAKE_C_COMPILER_TARGET}" CACHE S
set(LIBCXXABI_SYSROOT "${DEFAULT_SYSROOT}" CACHE STRING "")
set(LIBCXXABI_LINK_TESTS_WITH_SHARED_LIBCXXABI OFF CACHE BOOL "")
set(LIBCXXABI_LINK_TESTS_WITH_SHARED_LIBCXX OFF CACHE BOOL "")
+set(LIBCXX_LINK_TESTS_WITH_SHARED_LIBCXXABI OFF CACHE BOOL "")
+set(LIBCXX_LINK_TESTS_WITH_SHARED_LIBCXX OFF CACHE BOOL "")
set(LIBCXX_USE_COMPILER_RT ON CACHE BOOL "")
set(LIBCXX_TARGET_TRIPLE "${CMAKE_C_COMPILER_TARGET}" CACHE STRING "")
set(LIBCXX_SYSROOT "${DEFAULT_SYSROOT}" CACHE STRING "")
set(LIBCXX_ENABLE_SHARED OFF CACHE BOOL "")
+set(LIBCXX_CXX_ABI "libcxxabi" CACHE STRING "")
+set(LIBCXX_CXX_ABI_INCLUDE_PATHS "${LLVM_PROJECT_DIR}/libcxxabi/include" CACHE PATH "")
+set(LIBCXX_CXX_ABI_LIBRARY_PATH "${CMAKE_BINARY_DIR}/lib/${LIBCXX_TARGET_TRIPLE}/c++" CACHE PATH "")
set(BUILTINS_CMAKE_ARGS "-DCMAKE_SYSTEM_NAME=Linux;-DCMAKE_AR=${CMAKE_AR}" CACHE STRING "")
set(RUNTIMES_CMAKE_ARGS "-DCMAKE_SYSTEM_NAME=Linux;-DCMAKE_AR=${CMAKE_AR}" CACHE STRING "")
+find_package(Python3 COMPONENTS Interpreter)
+
# Remote test configuration.
if(DEFINED REMOTE_TEST_HOST)
- set(DEFAULT_TEST_EXECUTOR "SSHExecutor('${REMOTE_TEST_HOST}', '${REMOTE_TEST_USER}')")
- set(DEFAULT_TEST_TARGET_INFO "libcxx.test.target_info.LinuxLocalTI")
+ set(DEFAULT_TEST_EXECUTOR "\\\"${Python3_EXECUTABLE}\\\" \\\"${LLVM_PROJECT_DIR}/libcxx/utils/ssh.py\\\" --host='${REMOTE_TEST_USER}@${REMOTE_TEST_HOST}'")
+ set(DEFAULT_TEST_TARGET_INFO "libcxx.test.target_info.LinuxRemoteTI")
# Allow override with the custom values.
if(NOT DEFINED LIBUNWIND_TARGET_INFO)
diff --git a/gnu/llvm/clang/cmake/caches/Fuchsia-stage2.cmake b/gnu/llvm/clang/cmake/caches/Fuchsia-stage2.cmake
index b338f1b8a08..259684ff2b0 100644
--- a/gnu/llvm/clang/cmake/caches/Fuchsia-stage2.cmake
+++ b/gnu/llvm/clang/cmake/caches/Fuchsia-stage2.cmake
@@ -4,6 +4,9 @@ set(LLVM_TARGETS_TO_BUILD X86;ARM;AArch64;RISCV CACHE STRING "")
set(PACKAGE_VENDOR Fuchsia CACHE STRING "")
+set(LLVM_ENABLE_PROJECTS "clang;clang-tools-extra;lld;llvm" CACHE STRING "")
+set(LLVM_ENABLE_RUNTIMES "compiler-rt;libcxx;libcxxabi;libunwind" CACHE STRING "")
+
set(LLVM_ENABLE_BACKTRACES OFF CACHE BOOL "")
if(NOT APPLE)
set(LLVM_ENABLE_LLD ON CACHE BOOL "")
@@ -16,7 +19,12 @@ set(LLVM_ENABLE_ZLIB ON CACHE BOOL "")
set(LLVM_INCLUDE_DOCS OFF CACHE BOOL "")
set(LLVM_INCLUDE_EXAMPLES OFF CACHE BOOL "")
set(LLVM_INCLUDE_GO_TESTS OFF CACHE BOOL "")
-set(LLVM_USE_RELATIVE_PATHS_IN_DEBUG_INFO ON CACHE BOOL "")
+set(LLVM_USE_RELATIVE_PATHS_IN_FILES ON CACHE BOOL "")
+set(LLVM_ENABLE_Z3_SOLVER OFF CACHE BOOL "")
+
+if(MSVC)
+ set(LLVM_USE_CRT_RELEASE "MT" CACHE STRING "")
+endif()
set(CLANG_DEFAULT_CXX_STDLIB libc++ CACHE STRING "")
if(NOT APPLE)
@@ -35,6 +43,8 @@ set(ENABLE_X86_RELAX_RELOCATIONS ON CACHE BOOL "")
set(CMAKE_BUILD_TYPE Release CACHE STRING "")
if (APPLE)
set(MACOSX_DEPLOYMENT_TARGET 10.7 CACHE STRING "")
+elseif(MSVC)
+ set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded" CACHE STRING "")
endif()
if(APPLE)
@@ -43,6 +53,7 @@ if(APPLE)
set(COMPILER_RT_ENABLE_TVOS OFF CACHE BOOL "")
set(COMPILER_RT_ENABLE_WATCHOS OFF CACHE BOOL "")
+ set(COMPILER_RT_USE_BUILTINS_LIBRARY ON CACHE BOOL "")
set(LIBUNWIND_ENABLE_SHARED OFF CACHE BOOL "")
set(LIBUNWIND_INSTALL_LIBRARY OFF CACHE BOOL "")
@@ -62,12 +73,34 @@ if(APPLE)
set(SANITIZER_MIN_OSX_VERSION 10.7 CACHE STRING "")
endif()
+if(WIN32)
+ set(target "x86_64-pc-windows-msvc")
+
+ list(APPEND BUILTIN_TARGETS "${target}")
+ set(BUILTINS_${target}_CMAKE_SYSTEM_NAME Windows CACHE STRING "")
+ set(BUILTINS_${target}_CMAKE_BUILD_TYPE RelWithDebInfo CACHE STRING "")
+
+ list(APPEND RUNTIME_TARGETS "${target}")
+ set(RUNTIMES_${target}_CMAKE_SYSTEM_NAME Windows CACHE STRING "")
+ set(RUNTIMES_${target}_CMAKE_BUILD_TYPE RelWithDebInfo CACHE STRING "")
+ set(RUNTIMES_${target}_LIBCXX_ABI_VERSION 2 CACHE STRING "")
+ set(RUNTIMES_${target}_LIBCXX_HAS_WIN32_THREAD_API ON CACHE BOOL "")
+ set(RUNTIMES_${target}_LIBCXX_ENABLE_EXPERIMENTAL_LIBRARY OFF CACHE BOOL "")
+ set(RUNTIMES_${target}_LIBCXX_ENABLE_FILESYSTEM OFF CACHE BOOL "")
+ set(RUNTIMES_${target}_LIBCXX_ENABLE_ABI_LINKER_SCRIPT OFF CACHE BOOL "")
+ set(RUNTIMES_${target}_LIBCXX_ENABLE_SHARED OFF CACHE BOOL "")
+ set(RUNTIMES_${target}_LLVM_ENABLE_RUNTIMES "compiler-rt;libcxx" CACHE STRING "")
+endif()
+
foreach(target aarch64-unknown-linux-gnu;armv7-unknown-linux-gnueabihf;i386-unknown-linux-gnu;x86_64-unknown-linux-gnu)
if(LINUX_${target}_SYSROOT)
# Set the per-target builtins options.
list(APPEND BUILTIN_TARGETS "${target}")
set(BUILTINS_${target}_CMAKE_SYSTEM_NAME Linux CACHE STRING "")
set(BUILTINS_${target}_CMAKE_BUILD_TYPE RelWithDebInfo CACHE STRING "")
+ set(BUILTINS_${target}_CMAKE_C_FLAGS "--target=${target}" CACHE STRING "")
+ set(BUILTINS_${target}_CMAKE_CXX_FLAGS "--target=${target}" CACHE STRING "")
+ set(BUILTINS_${target}_CMAKE_ASM_FLAGS "--target=${target}" CACHE STRING "")
set(BUILTINS_${target}_CMAKE_SYSROOT ${LINUX_${target}_SYSROOT} CACHE STRING "")
set(BUILTINS_${target}_CMAKE_SHARED_LINKER_FLAGS "-fuse-ld=lld" CACHE STRING "")
set(BUILTINS_${target}_CMAKE_MODULE_LINKER_FLAGS "-fuse-ld=lld" CACHE STRING "")
@@ -77,11 +110,14 @@ foreach(target aarch64-unknown-linux-gnu;armv7-unknown-linux-gnueabihf;i386-unkn
list(APPEND RUNTIME_TARGETS "${target}")
set(RUNTIMES_${target}_CMAKE_SYSTEM_NAME Linux CACHE STRING "")
set(RUNTIMES_${target}_CMAKE_BUILD_TYPE RelWithDebInfo CACHE STRING "")
+ set(RUNTIMES_${target}_CMAKE_C_FLAGS "--target=${target}" CACHE STRING "")
+ set(RUNTIMES_${target}_CMAKE_CXX_FLAGS "--target=${target}" CACHE STRING "")
+ set(RUNTIMES_${target}_CMAKE_ASM_FLAGS "--target=${target}" CACHE STRING "")
set(RUNTIMES_${target}_CMAKE_SYSROOT ${LINUX_${target}_SYSROOT} CACHE STRING "")
set(RUNTIMES_${target}_CMAKE_SHARED_LINKER_FLAGS "-fuse-ld=lld" CACHE STRING "")
set(RUNTIMES_${target}_CMAKE_MODULE_LINKER_FLAGS "-fuse-ld=lld" CACHE STRING "")
set(RUNTIMES_${target}_CMAKE_EXE_LINKER_FLAGS "-fuse-ld=lld" CACHE STRING "")
- set(RUNTIMES_${target}_LLVM_ENABLE_ASSERTIONS ON CACHE BOOL "")
+ set(RUNTIMES_${target}_COMPILER_RT_USE_BUILTINS_LIBRARY ON CACHE BOOL "")
set(RUNTIMES_${target}_LIBUNWIND_ENABLE_SHARED OFF CACHE BOOL "")
set(RUNTIMES_${target}_LIBUNWIND_USE_COMPILER_RT ON CACHE BOOL "")
set(RUNTIMES_${target}_LIBUNWIND_INSTALL_LIBRARY OFF CACHE BOOL "")
@@ -94,9 +130,10 @@ foreach(target aarch64-unknown-linux-gnu;armv7-unknown-linux-gnueabihf;i386-unkn
set(RUNTIMES_${target}_LIBCXX_ENABLE_SHARED OFF CACHE BOOL "")
set(RUNTIMES_${target}_LIBCXX_ENABLE_STATIC_ABI_LIBRARY ON CACHE BOOL "")
set(RUNTIMES_${target}_LIBCXX_ABI_VERSION 2 CACHE STRING "")
+ set(RUNTIMES_${target}_LLVM_ENABLE_ASSERTIONS ON CACHE BOOL "")
set(RUNTIMES_${target}_SANITIZER_CXX_ABI "libc++" CACHE STRING "")
set(RUNTIMES_${target}_SANITIZER_CXX_ABI_INTREE ON CACHE BOOL "")
- set(RUNTIMES_${target}_COMPILER_RT_USE_BUILTINS_LIBRARY ON CACHE BOOL "")
+ set(RUNTIMES_${target}_LLVM_ENABLE_RUNTIMES "compiler-rt;libcxx;libcxxabi;libunwind" CACHE STRING "")
# Use .build-id link.
list(APPEND RUNTIME_BUILD_ID_LINK "${target}")
@@ -105,15 +142,16 @@ endforeach()
if(FUCHSIA_SDK)
set(FUCHSIA_aarch64_NAME arm64)
+ set(FUCHSIA_i386_NAME x64)
set(FUCHSIA_x86_64_NAME x64)
set(FUCHSIA_riscv64_NAME riscv64)
- foreach(target x86_64;aarch64;riscv64)
- set(FUCHSIA_${target}_COMPILER_FLAGS "-I${FUCHSIA_SDK}/pkg/fdio/include")
+ foreach(target i386;x86_64;aarch64;riscv64)
+ set(FUCHSIA_${target}_COMPILER_FLAGS "--target=${target}-unknown-fuchsia -I${FUCHSIA_SDK}/pkg/fdio/include")
set(FUCHSIA_${target}_LINKER_FLAGS "-L${FUCHSIA_SDK}/arch/${FUCHSIA_${target}_NAME}/lib")
set(FUCHSIA_${target}_SYSROOT "${FUCHSIA_SDK}/arch/${FUCHSIA_${target}_NAME}/sysroot")
endforeach()
- foreach(target x86_64;aarch64;riscv64)
+ foreach(target i386;x86_64;aarch64;riscv64)
# Set the per-target builtins options.
list(APPEND BUILTIN_TARGETS "${target}-unknown-fuchsia")
set(BUILTINS_${target}-unknown-fuchsia_CMAKE_SYSTEM_NAME Fuchsia CACHE STRING "")
@@ -140,7 +178,7 @@ if(FUCHSIA_SDK)
set(RUNTIMES_${target}-unknown-fuchsia_CMAKE_MODULE_LINKER_FLAGS ${FUCHSIA_${target}_LINKER_FLAGS} CACHE STRING "")
set(RUNTIMES_${target}-unknown-fuchsia_CMAKE_EXE_LINKER_FLAGS ${FUCHSIA_${target}_LINKER_FLAGS} CACHE STRING "")
set(RUNTIMES_${target}-unknown-fuchsia_CMAKE_SYSROOT ${FUCHSIA_${target}_SYSROOT} CACHE PATH "")
- set(RUNTIMES_${target}-unknown-fuchsia_LLVM_ENABLE_ASSERTIONS ON CACHE BOOL "")
+ set(RUNTIMES_${target}-unknown-fuchsia_COMPILER_RT_USE_BUILTINS_LIBRARY ON CACHE BOOL "")
set(RUNTIMES_${target}-unknown-fuchsia_LIBUNWIND_USE_COMPILER_RT ON CACHE BOOL "")
set(RUNTIMES_${target}-unknown-fuchsia_LIBUNWIND_HERMETIC_STATIC_LIBRARY ON CACHE BOOL "")
set(RUNTIMES_${target}-unknown-fuchsia_LIBUNWIND_INSTALL_STATIC_LIBRARY OFF CACHE BOOL "")
@@ -155,6 +193,8 @@ if(FUCHSIA_SDK)
set(RUNTIMES_${target}-unknown-fuchsia_LIBCXX_HERMETIC_STATIC_LIBRARY ON CACHE BOOL "")
set(RUNTIMES_${target}-unknown-fuchsia_LIBCXX_STATICALLY_LINK_ABI_IN_SHARED_LIBRARY OFF CACHE BOOL "")
set(RUNTIMES_${target}-unknown-fuchsia_LIBCXX_ABI_VERSION 2 CACHE STRING "")
+ set(RUNTIMES_${target}-unknown-fuchsia_LLVM_ENABLE_ASSERTIONS ON CACHE BOOL "")
+ set(RUNTIMES_${target}-unknown-fuchsia_LLVM_ENABLE_RUNTIMES "compiler-rt;libcxx;libcxxabi;libunwind" CACHE STRING "")
set(RUNTIMES_${target}-unknown-fuchsia+asan_LLVM_BUILD_COMPILER_RT OFF CACHE BOOL "")
set(RUNTIMES_${target}-unknown-fuchsia+asan_LLVM_USE_SANITIZER "Address" CACHE STRING "")
@@ -195,6 +235,7 @@ set(LLVM_TOOLCHAIN_TOOLS
llvm-cxxfilt
llvm-dwarfdump
llvm-dwp
+ llvm-gsymutil
llvm-lib
llvm-nm
llvm-objcopy
diff --git a/gnu/llvm/clang/cmake/caches/Fuchsia.cmake b/gnu/llvm/clang/cmake/caches/Fuchsia.cmake
index 2a65de2039c..8688b71ecc7 100644
--- a/gnu/llvm/clang/cmake/caches/Fuchsia.cmake
+++ b/gnu/llvm/clang/cmake/caches/Fuchsia.cmake
@@ -4,6 +4,8 @@ set(LLVM_TARGETS_TO_BUILD X86;ARM;AArch64;RISCV CACHE STRING "")
set(PACKAGE_VENDOR Fuchsia CACHE STRING "")
+set(LLVM_ENABLE_PROJECTS "clang;clang-tools-extra;lld;llvm" CACHE STRING "")
+
set(LLVM_ENABLE_BACKTRACES OFF CACHE BOOL "")
set(LLVM_ENABLE_PER_TARGET_RUNTIME_DIR ON CACHE BOOL "")
set(LLVM_ENABLE_TERMINFO OFF CACHE BOOL "")
@@ -13,6 +15,10 @@ set(LLVM_INCLUDE_DOCS OFF CACHE BOOL "")
set(LLVM_INCLUDE_EXAMPLES OFF CACHE BOOL "")
set(LLVM_INCLUDE_GO_TESTS OFF CACHE BOOL "")
+if(MSVC)
+ set(LLVM_USE_CRT_RELEASE "MT" CACHE STRING "")
+endif()
+
set(CLANG_DEFAULT_CXX_STDLIB libc++ CACHE STRING "")
if(NOT APPLE)
set(CLANG_DEFAULT_LINKER lld CACHE STRING "")
@@ -29,8 +35,10 @@ set(ENABLE_X86_RELAX_RELOCATIONS ON CACHE BOOL "")
set(LLVM_ENABLE_ASSERTIONS ON CACHE BOOL "")
set(CMAKE_BUILD_TYPE Release CACHE STRING "")
-if (APPLE)
+if(APPLE)
set(MACOSX_DEPLOYMENT_TARGET 10.7 CACHE STRING "")
+elseif(MSVC)
+ set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded" CACHE STRING "")
endif()
if(APPLE)
@@ -49,20 +57,33 @@ set(LIBCXXABI_USE_COMPILER_RT ON CACHE BOOL "")
set(LIBCXXABI_USE_LLVM_UNWINDER ON CACHE BOOL "")
set(LIBCXX_ABI_VERSION 2 CACHE STRING "")
set(LIBCXX_ENABLE_SHARED OFF CACHE BOOL "")
-set(LIBCXX_ENABLE_STATIC_ABI_LIBRARY ON CACHE BOOL "")
-set(LIBCXX_USE_COMPILER_RT ON CACHE BOOL "")
+if(WIN32)
+ set(LIBCXX_HAS_WIN32_THREAD_API ON CACHE BOOL "")
+ set(LIBCXX_ENABLE_EXPERIMENTAL_LIBRARY OFF CACHE BOOL "")
+ set(LIBCXX_ENABLE_FILESYSTEM OFF CACHE BOOL "")
+ set(LIBCXX_ENABLE_ABI_LINKER_SCRIPT OFF CACHE BOOL "")
+ set(LIBCXX_ENABLE_STATIC_ABI_LIBRARY OFF CACHE BOOL "")
+ set(BUILTINS_CMAKE_ARGS -DCMAKE_SYSTEM_NAME=Windows CACHE STRING "")
+ set(RUNTIMES_CMAKE_ARGS -DCMAKE_SYSTEM_NAME=Windows CACHE STRING "")
+ set(LLVM_ENABLE_RUNTIMES "compiler-rt;libcxx" CACHE STRING "")
+else()
+ set(LIBCXX_ENABLE_STATIC_ABI_LIBRARY ON CACHE BOOL "")
+ set(LLVM_ENABLE_RUNTIMES "compiler-rt;libcxx;libcxxabi;libunwind" CACHE STRING "")
+endif()
if(BOOTSTRAP_CMAKE_SYSTEM_NAME)
set(target "${BOOTSTRAP_CMAKE_CXX_COMPILER_TARGET}")
if(STAGE2_LINUX_${target}_SYSROOT)
+ set(LLVM_BUILTIN_TARGETS "${target}" CACHE STRING "")
set(BUILTINS_${target}_CMAKE_SYSTEM_NAME Linux CACHE STRING "")
set(BUILTINS_${target}_CMAKE_BUILD_TYPE Release CACHE STRING "")
set(BUILTINS_${target}_CMAKE_SYSROOT ${STAGE2_LINUX_${target}_SYSROOT} CACHE STRING "")
- set(LLVM_BUILTIN_TARGETS "${target}" CACHE STRING "")
+ set(LLVM_RUNTIME_TARGETS "${target}" CACHE STRING "")
set(RUNTIMES_${target}_CMAKE_SYSTEM_NAME Linux CACHE STRING "")
set(RUNTIMES_${target}_CMAKE_BUILD_TYPE Release CACHE STRING "")
set(RUNTIMES_${target}_CMAKE_SYSROOT ${STAGE2_LINUX_${target}_SYSROOT} CACHE STRING "")
+ set(RUNTIMES_${target}_COMPILER_RT_USE_BUILTINS_LIBRARY ON CACHE BOOL "")
set(RUNTIMES_${target}_LLVM_ENABLE_ASSERTIONS ON CACHE BOOL "")
set(RUNTIMES_${target}_LIBUNWIND_ENABLE_SHARED OFF CACHE BOOL "")
set(RUNTIMES_${target}_LIBUNWIND_USE_COMPILER_RT ON CACHE BOOL "")
@@ -76,10 +97,9 @@ if(BOOTSTRAP_CMAKE_SYSTEM_NAME)
set(RUNTIMES_${target}_LIBCXX_ENABLE_SHARED OFF CACHE BOOL "")
set(RUNTIMES_${target}_LIBCXX_ENABLE_STATIC_ABI_LIBRARY ON CACHE BOOL "")
set(RUNTIMES_${target}_LIBCXX_ABI_VERSION 2 CACHE STRING "")
+ set(RUNTIMES_${target}_LLVM_ENABLE_RUNTIMES "compiler-rt;libcxx;libcxxabi;libunwind" CACHE STRING "")
set(RUNTIMES_${target}_SANITIZER_CXX_ABI "libc++" CACHE STRING "")
set(RUNTIMES_${target}_SANITIZER_CXX_ABI_INTREE ON CACHE BOOL "")
- set(RUNTIMES_${target}_COMPILER_RT_USE_BUILTINS_LIBRARY ON CACHE BOOL "")
- set(LLVM_RUNTIME_TARGETS "${target}" CACHE STRING "")
endif()
endif()
diff --git a/gnu/llvm/clang/cmake/modules/AddClang.cmake b/gnu/llvm/clang/cmake/modules/AddClang.cmake
index 577cc11ab01..704278a0e93 100644
--- a/gnu/llvm/clang/cmake/modules/AddClang.cmake
+++ b/gnu/llvm/clang/cmake/modules/AddClang.cmake
@@ -17,7 +17,7 @@ function(clang_tablegen)
message(FATAL_ERROR "SOURCE source-file required by clang_tablegen")
endif()
- set( CLANG_TABLEGEN_ARGUMENTS -I ${CLANG_SOURCE_DIR}/include )
+ set( CLANG_TABLEGEN_ARGUMENTS "" )
set( LLVM_TARGET_DEFINITIONS ${CTG_SOURCE} )
tablegen(CLANG ${CTG_UNPARSED_ARGUMENTS} ${CLANG_TABLEGEN_ARGUMENTS})
@@ -45,7 +45,7 @@ endmacro()
macro(add_clang_library name)
cmake_parse_arguments(ARG
- "SHARED;INSTALL_WITH_TOOLCHAIN"
+ "SHARED;STATIC;INSTALL_WITH_TOOLCHAIN"
""
"ADDITIONAL_HEADERS"
${ARGN})
@@ -81,7 +81,10 @@ macro(add_clang_library name)
${ARG_ADDITIONAL_HEADERS} # It may contain unparsed unknown args.
)
endif()
- if(ARG_SHARED)
+
+ if(ARG_SHARED AND ARG_STATIC)
+ set(LIBTYPE SHARED STATIC)
+ elseif(ARG_SHARED)
set(LIBTYPE SHARED)
else()
# llvm_add_library ignores BUILD_SHARED_LIBS if STATIC is explicitly set,
@@ -99,38 +102,45 @@ macro(add_clang_library name)
endif()
llvm_add_library(${name} ${LIBTYPE} ${ARG_UNPARSED_ARGUMENTS} ${srcs})
- if(TARGET ${name})
- target_link_libraries(${name} INTERFACE ${LLVM_COMMON_LIBS})
-
- if (NOT LLVM_INSTALL_TOOLCHAIN_ONLY OR ARG_INSTALL_WITH_TOOLCHAIN)
- set(export_to_clangtargets)
- if(${name} IN_LIST LLVM_DISTRIBUTION_COMPONENTS OR
- "clang-libraries" IN_LIST LLVM_DISTRIBUTION_COMPONENTS OR
- NOT LLVM_DISTRIBUTION_COMPONENTS)
- set(export_to_clangtargets EXPORT ClangTargets)
- set_property(GLOBAL PROPERTY CLANG_HAS_EXPORTS True)
- endif()
+ set(libs ${name})
+ if(ARG_SHARED AND ARG_STATIC)
+ list(APPEND libs ${name}_static)
+ endif()
- install(TARGETS ${name}
- COMPONENT ${name}
- ${export_to_clangtargets}
- LIBRARY DESTINATION lib${LLVM_LIBDIR_SUFFIX}
- ARCHIVE DESTINATION lib${LLVM_LIBDIR_SUFFIX}
- RUNTIME DESTINATION bin)
-
- if (NOT LLVM_ENABLE_IDE)
- add_llvm_install_targets(install-${name}
- DEPENDS ${name}
- COMPONENT ${name})
+ foreach(lib ${libs})
+ if(TARGET ${lib})
+ target_link_libraries(${lib} INTERFACE ${LLVM_COMMON_LIBS})
+
+ if (NOT LLVM_INSTALL_TOOLCHAIN_ONLY OR ARG_INSTALL_WITH_TOOLCHAIN)
+ set(export_to_clangtargets)
+ if(${lib} IN_LIST LLVM_DISTRIBUTION_COMPONENTS OR
+ "clang-libraries" IN_LIST LLVM_DISTRIBUTION_COMPONENTS OR
+ NOT LLVM_DISTRIBUTION_COMPONENTS)
+ set(export_to_clangtargets EXPORT ClangTargets)
+ set_property(GLOBAL PROPERTY CLANG_HAS_EXPORTS True)
+ endif()
+
+ install(TARGETS ${lib}
+ COMPONENT ${lib}
+ ${export_to_clangtargets}
+ LIBRARY DESTINATION lib${LLVM_LIBDIR_SUFFIX}
+ ARCHIVE DESTINATION lib${LLVM_LIBDIR_SUFFIX}
+ RUNTIME DESTINATION bin)
+
+ if (NOT LLVM_ENABLE_IDE)
+ add_llvm_install_targets(install-${lib}
+ DEPENDS ${lib}
+ COMPONENT ${lib})
+ endif()
+
+ set_property(GLOBAL APPEND PROPERTY CLANG_LIBS ${lib})
endif()
-
- set_property(GLOBAL APPEND PROPERTY CLANG_LIBS ${name})
+ set_property(GLOBAL APPEND PROPERTY CLANG_EXPORTS ${lib})
+ else()
+ # Add empty "phony" target
+ add_custom_target(${lib})
endif()
- set_property(GLOBAL APPEND PROPERTY CLANG_EXPORTS ${name})
- else()
- # Add empty "phony" target
- add_custom_target(${name})
- endif()
+ endforeach()
set_target_properties(${name} PROPERTIES FOLDER "Clang libraries")
set_clang_windows_version_resource_properties(${name})
diff --git a/gnu/llvm/clang/cmake/modules/ClangConfig.cmake.in b/gnu/llvm/clang/cmake/modules/ClangConfig.cmake.in
index a5a7eae5032..c5ce56274b1 100644
--- a/gnu/llvm/clang/cmake/modules/ClangConfig.cmake.in
+++ b/gnu/llvm/clang/cmake/modules/ClangConfig.cmake.in
@@ -8,6 +8,7 @@ find_package(LLVM REQUIRED CONFIG
set(CLANG_EXPORTED_TARGETS "@CLANG_EXPORTS@")
set(CLANG_CMAKE_DIR "@CLANG_CONFIG_CMAKE_DIR@")
set(CLANG_INCLUDE_DIRS "@CLANG_CONFIG_INCLUDE_DIRS@")
+set(CLANG_LINK_CLANG_DYLIB "@CLANG_LINK_CLANG_DYLIB@")
# Provide all our library targets to users.
include("@CLANG_CONFIG_EXPORTS_FILE@")
diff --git a/gnu/llvm/clang/docs/AutomaticReferenceCounting.rst b/gnu/llvm/clang/docs/AutomaticReferenceCounting.rst
index 9d61f58ed4d..c75ef025415 100644
--- a/gnu/llvm/clang/docs/AutomaticReferenceCounting.rst
+++ b/gnu/llvm/clang/docs/AutomaticReferenceCounting.rst
@@ -1100,32 +1100,282 @@ A pass-by-writeback is evaluated as follows:
Ownership-qualified fields of structs and unions
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-A program is ill-formed if it declares a member of a C struct or union to have
-a nontrivially ownership-qualified type.
+A member of a struct or union may be declared to have ownership-qualified
+type. If the type is qualified with ``__unsafe_unretained``, the semantics
+of the containing aggregate are unchanged from the semantics of an unqualified type in a non-ARC mode. If the type is qualified with ``__autoreleasing``, the program is ill-formed. Otherwise, if the type is nontrivially ownership-qualified, additional rules apply.
+
+Both Objective-C and Objective-C++ support nontrivially ownership-qualified
+fields. Due to formal differences between the standards, the formal
+treatment is different; however, the basic language model is intended to
+be the same for identical code.
.. admonition:: Rationale
- The resulting type would be non-POD in the C++ sense, but C does not give us
- very good language tools for managing the lifetime of aggregates, so it is
- more convenient to simply forbid them. It is still possible to manage this
- with a ``void*`` or an ``__unsafe_unretained`` object.
+ Permitting ``__strong`` and ``__weak`` references in aggregate types
+ allows programmers to take advantage of the normal language tools of
+ C and C++ while still automatically managing memory. While it is
+ usually simpler and more idiomatic to use Objective-C objects for
+ secondary data structures, doing so can introduce extra allocation
+ and message-send overhead, which can cause to unacceptable
+ performance. Using structs can resolve some of this tension.
+
+ ``__autoreleasing`` is forbidden because it is treacherous to rely
+ on autoreleases as an ownership tool outside of a function-local
+ contexts.
+
+ Earlier releases of Clang permitted ``__strong`` and ``__weak`` only
+ references in Objective-C++ classes, not in Objective-C. This
+ restriction was an undesirable short-term constraint arising from the
+ complexity of adding support for non-trivial struct types to C.
+
+In Objective-C++, nontrivially ownership-qualified types are treated
+for nearly all purposes as if they were class types with non-trivial
+default constructors, copy constructors, move constructors, copy assignment
+operators, move assignment operators, and destructors. This includes the
+determination of the triviality of special members of classes with a
+non-static data member of such a type.
+
+In Objective-C, the definition cannot be so succinct: because the C
+standard lacks rules for non-trivial types, those rules must first be
+developed. They are given in the next section. The intent is that these
+rules are largely consistent with the rules of C++ for code expressible
+in both languages.
+
+Formal rules for non-trivial types in C
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+The following are base rules which can be added to C to support
+implementation-defined non-trivial types.
+
+A type in C is said to be *non-trivial to copy*, *non-trivial to destroy*,
+or *non-trivial to default-initialize* if:
+
+- it is a struct or union containing a member whose type is non-trivial
+ to (respectively) copy, destroy, or default-initialize;
+
+- it is a qualified type whose unqualified type is non-trivial to
+ (respectively) copy, destroy, or default-initialize (for at least
+ the standard C qualifiers); or
+
+- it is an array type whose element type is non-trivial to (respectively)
+ copy, destroy, or default-initialize.
+
+A type in C is said to be *illegal to copy*, *illegal to destroy*, or
+*illegal to default-initialize* if:
+
+- it is a union which contains a member whose type is either illegal
+ or non-trivial to (respectively) copy, destroy, or initialize;
+
+- it is a qualified type whose unqualified type is illegal to
+ (respectively) copy, destroy, or default-initialize (for at least
+ the standard C qualifiers); or
+
+- it is an array type whose element type is illegal to (respectively)
+ copy, destroy, or default-initialize.
+
+No type describable under the rules of the C standard shall be either
+non-trivial or illegal to copy, destroy, or default-initialize.
+An implementation may provide additional types which have one or more
+of these properties.
+
+An expression calls for a type to be copied if it:
+
+- passes an argument of that type to a function call,
+- defines a function which declares a parameter of that type,
+- calls or defines a function which returns a value of that type,
+- assigns to an l-value of that type, or
+- converts an l-value of that type to an r-value.
+
+A program calls for a type to be destroyed if it:
+
+- passes an argument of that type to a function call,
+- defines a function which declares a parameter of that type,
+- calls or defines a function which returns a value of that type,
+- creates an object of automatic storage duration of that type,
+- assigns to an l-value of that type, or
+- converts an l-value of that type to an r-value.
+
+A program calls for a type to be default-initialized if it:
+
+- declares a variable of that type without an initializer.
+
+An expression is ill-formed if calls for a type to be copied,
+destroyed, or default-initialized and that type is illegal to
+(respectively) copy, destroy, or default-initialize.
+
+A program is ill-formed if it contains a function type specifier
+with a parameter or return type that is illegal to copy or
+destroy. If a function type specifier would be ill-formed for this
+reason except that the parameter or return type was incomplete at
+that point in the translation unit, the program is ill-formed but
+no diagnostic is required.
+
+A ``goto`` or ``switch`` is ill-formed if it jumps into the scope of
+an object of automatic storage duration whose type is non-trivial to
+destroy.
+
+C specifies that it is generally undefined behavior to access an l-value
+if there is no object of that type at that location. Implementations
+are often lenient about this, but non-trivial types generally require
+it to be enforced more strictly. The following rules apply:
+
+The *static subobjects* of a type ``T`` at a location ``L`` are:
+
+ - an object of type ``T`` spanning from ``L`` to ``L + sizeof(T)``;
+
+ - if ``T`` is a struct type, then for each field ``f`` of that struct,
+ the static subobjects of ``T`` at location ``L + offsetof(T, .f)``; and
+
+ - if ``T`` is the array type ``E[N]``, then for each ``i`` satisfying
+ ``0 <= i < N``, the static subobjects of ``E`` at location
+ ``L + i * sizeof(E)``.
+
+If an l-value is converted to an r-value, then all static subobjects
+whose types are non-trivial to copy are accessed. If an l-value is
+assigned to, or if an object of automatic storage duration goes out of
+scope, then all static subobjects of types that are non-trivial to destroy
+are accessed.
+
+A dynamic object is created at a location if an initialization initializes
+an object of that type there. A dynamic object ceases to exist at a
+location if the memory is repurposed. Memory is repurposed if it is
+freed or if a different dynamic object is created there, for example by
+assigning into a different union member. An implementation may provide
+additional rules for what constitutes creating or destroying a dynamic
+object.
+
+If an object is accessed under these rules at a location where no such
+dynamic object exists, the program has undefined behavior.
+If memory for a location is repurposed while a dynamic object that is
+non-trivial to destroy exists at that location, the program has
+undefined behavior.
+
+.. admonition:: Rationale
-This restriction does not apply in Objective-C++. However, nontrivally
-ownership-qualified types are considered non-POD: in C++11 terms, they are not
-trivially default constructible, copy constructible, move constructible, copy
-assignable, move assignable, or destructible. It is a violation of C++'s One
-Definition Rule to use a class outside of ARC that, under ARC, would have a
-nontrivially ownership-qualified member.
+ While these rules are far less fine-grained than C++, they are
+ nonetheless sufficient to express a wide spectrum of types.
+ Types that express some sort of ownership will generally be non-trivial
+ to both copy and destroy and either non-trivial or illegal to
+ default-initialize. Types that don't express ownership may still
+ be non-trivial to copy because of some sort of address sensitivity;
+ for example, a relative reference. Distinguishing default
+ initialization allows types to impose policies about how they are
+ created.
+
+ These rules assume that assignment into an l-value is always a
+ modification of an existing object rather than an initialization.
+ Assignment is then a compound operation where the old value is
+ read and destroyed, if necessary, and the new value is put into
+ place. These are the natural semantics of value propagation, where
+ all basic operations on the type come down to copies and destroys,
+ and everything else is just an optimization on top of those.
+
+ The most glaring weakness of programming with non-trivial types in C
+ is that there are no language mechanisms (akin to C++'s placement
+ ``new`` and explicit destructor calls) for explicitly creating and
+ destroying objects. Clang should consider adding builtins for this
+ purpose, as well as for common optimizations like destructive
+ relocation.
+
+Application of the formal C rules to nontrivial ownership qualifiers
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+Nontrivially ownership-qualified types are considered non-trivial
+to copy, destroy, and default-initialize.
+
+A dynamic object of nontrivially ownership-qualified type contingently
+exists at a location if the memory is filled with a zero pattern, e.g.
+by ``calloc`` or ``bzero``. Such an object can be safely accessed in
+all of the cases above, but its memory can also be safely repurposed.
+Assigning a null pointer into an l-value of ``__weak`` or
+``__strong``-qualified type accesses the dynamic object there (and thus
+may have undefined behavior if no such object exists), but afterwards
+the object's memory is guaranteed to be filled with a zero pattern
+and thus may be either further accessed or repurposed as needed.
+The upshot is that programs may safely initialize dynamically-allocated
+memory for nontrivially ownership-qualified types by ensuring it is zero-initialized, and they may safely deinitialize memory before
+freeing it by storing ``nil`` into any ``__strong`` or ``__weak``
+references previously created in that memory.
+
+C/C++ compatibility for structs and unions with non-trivial members
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+Structs and unions with non-trivial members are compatible in
+different language modes (e.g. between Objective-C and Objective-C++,
+or between ARC and non-ARC modes) under the following conditions:
+
+- The types must be compatible ignoring ownership qualifiers according
+ to the baseline, non-ARC rules (e.g. C struct compatibility or C++'s
+ ODR). This condition implies a pairwise correspondance between
+ fields.
+
+ Note that an Objective-C++ class with base classes, a user-provided
+ copy or move constructor, or a user-provided destructor is never
+ compatible with an Objective-C type.
+
+- If two fields correspond as above, and at least one of the fields is
+ ownership-qualified, then:
+
+ - the fields must be identically qualified, or else
+
+ - one type must be unqualified (and thus declared in a non-ARC mode),
+ and the other type must be qualified with ``__unsafe_unretained``
+ or ``__strong``.
+
+ Note that ``__weak`` fields must always be declared ``__weak`` because
+ of the need to pin those fields in memory and keep them properly
+ registered with the Objective-C runtime. Non-ARC modes may still
+ declare fields ``__weak`` by enabling ``-fobjc-weak``.
+
+These compatibility rules permit a function that takes a parameter
+of non-trivial struct type to be written in ARC and called from
+non-ARC or vice-versa. The convention for this always transfers
+ownership of objects stored in ``__strong`` fields from the caller
+to the callee, just as for an ``ns_consumed`` argument. Therefore,
+non-ARC callers must ensure that such fields are initialized to a +1
+reference, and non-ARC callees must balance that +1 by releasing the
+reference or transferring it as appropriate.
+
+Likewise, a function returning a non-trivial struct may be written in
+ARC and called from non-ARC or vice-versa. The convention for this
+always transfers ownership of objects stored in ``__strong`` fields
+from the callee to the caller, and so callees must initialize such
+fields with +1 references, and callers must balance that +1 by releasing
+or transferring them.
+
+Similar transfers of responsibility occur for ``__weak`` fields, but
+since both sides must use native ``__weak`` support to ensure
+calling convention compatibililty, this transfer is always handled
+automatically by the compiler.
.. admonition:: Rationale
- Unlike in C, we can express all the necessary ARC semantics for
- ownership-qualified subobjects as suboperations of the (default) special
- member functions for the class. These functions then become non-trivial.
- This has the non-obvious result that the class will have a non-trivial copy
- constructor and non-trivial destructor; if this would not normally be true
- outside of ARC, objects of the type will be passed and returned in an
- ABI-incompatible manner.
+ In earlier releases, when non-trivial ownership was only permitted
+ on fields in Objective-C++, the ABI used for such classees was the
+ ordinary ABI for non-trivial C++ classes, which passes arguments and
+ returns indirectly and does not transfer responsibility for arguments.
+ When support for Objective-C structs was added, it was decided to
+ change to the current ABI for three reasons:
+
+ - It permits ARC / non-ARC compatibility for structs containing only
+ ``__strong`` references, as long as the non-ARC side is careful about
+ transferring ownership.
+
+ - It avoids unnecessary indirection for sufficiently small types that
+ the C ABI would prefer to pass in registers.
+
+ - Given that struct arguments must be produced at +1 to satisfy C's
+ semantics of initializing the local parameter variable, transferring
+ ownership of that copy to the callee is generally better for ARC
+ optimization, since otherwise there will be releases in the caller
+ that are much harder to pair with transfers in the callee.
+
+ Breaking compatibility with existing Objective-C++ structures was
+ considered an acceptable cost, as most Objective-C++ code does not have
+ binary-compatibility requirements. Any existing code which cannot accept
+ this compatibility break, which is necessarily Objective-C++, should
+ force the use of the standard C++ ABI by declaring an empty (but
+ non-defaulted) destructor.
.. _arc.ownership.inference:
diff --git a/gnu/llvm/clang/docs/Block-ABI-Apple.rst b/gnu/llvm/clang/docs/Block-ABI-Apple.rst
index 0cc14a35b03..d038cdfe9bd 100644
--- a/gnu/llvm/clang/docs/Block-ABI-Apple.rst
+++ b/gnu/llvm/clang/docs/Block-ABI-Apple.rst
@@ -63,7 +63,7 @@ The following flags bits are in use thusly for a possible ABI.2010.3.16:
enum {
// Set to true on blocks that have captures (and thus are not true
// global blocks) but are known not to escape for various other
- // reasons. For backward compatiblity with old runtimes, whenever
+ // reasons. For backward compatibility with old runtimes, whenever
// BLOCK_IS_NOESCAPE is set, BLOCK_IS_GLOBAL is set too. Copying a
// non-escaping block returns the original block and releasing such a
// block is a no-op, which is exactly how global blocks are handled.
diff --git a/gnu/llvm/clang/docs/CMakeLists.txt b/gnu/llvm/clang/docs/CMakeLists.txt
index d2956c18f80..2d3ac5dbdd1 100644
--- a/gnu/llvm/clang/docs/CMakeLists.txt
+++ b/gnu/llvm/clang/docs/CMakeLists.txt
@@ -90,15 +90,43 @@ if (LLVM_ENABLE_DOXYGEN)
endif()
endif()
+function (gen_rst_file_from_td output_file td_option source docs_target)
+ if (NOT EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/${source}")
+ message(FATAL_ERROR "Cannot find source file: ${source} in ${CMAKE_CURRENT_SOURCE_DIR}")
+ endif()
+ get_filename_component(TABLEGEN_INCLUDE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/${source}" DIRECTORY)
+ list(APPEND LLVM_TABLEGEN_FLAGS "-I${TABLEGEN_INCLUDE_DIR}")
+ clang_tablegen(${output_file} ${td_option} SOURCE ${source} TARGET "gen-${output_file}")
+ add_dependencies(${docs_target} "gen-${output_file}")
+endfunction()
+
if (LLVM_ENABLE_SPHINX)
include(AddSphinxTarget)
if (SPHINX_FOUND)
if (${SPHINX_OUTPUT_HTML})
- add_sphinx_target(html clang)
+ add_sphinx_target(html clang SOURCE_DIR "${CMAKE_CURRENT_BINARY_DIR}")
+
+ # Copy rst files to build directory before generating the html
+ # documentation. Some of the rst files are generated, so they
+ # only exist in the build directory. Sphinx needs all files in
+ # the same directory in order to generate the html, so we need to
+ # copy all the non-gnerated rst files from the source to the build
+ # directory before we run sphinx.
+ add_custom_target(copy-clang-rst-docs
+ COMMAND "${CMAKE_COMMAND}" -E copy_directory
+ "${CMAKE_CURRENT_SOURCE_DIR}"
+ "${CMAKE_CURRENT_BINARY_DIR}")
+ add_dependencies(docs-clang-html copy-clang-rst-docs)
+
add_custom_command(TARGET docs-clang-html POST_BUILD
- COMMAND ${CMAKE_COMMAND} -E copy
+ COMMAND "${CMAKE_COMMAND}" -E copy
"${CMAKE_CURRENT_SOURCE_DIR}/LibASTMatchersReference.html"
"${CMAKE_CURRENT_BINARY_DIR}/html/LibASTMatchersReference.html")
+
+ # Generated files
+ gen_rst_file_from_td(AttributeReference.rst -gen-attr-docs ../include/clang/Basic/Attr.td docs-clang-html)
+ gen_rst_file_from_td(DiagnosticsReference.rst -gen-diag-docs ../include/clang/Basic/Diagnostic.td docs-clang-html)
+ gen_rst_file_from_td(ClangCommandLineReference.rst -gen-opt-docs ../include/clang/Driver/ClangOptionDocs.td docs-clang-html)
endif()
if (${SPHINX_OUTPUT_MAN})
add_sphinx_target(man clang)
diff --git a/gnu/llvm/clang/docs/ClangFormat.rst b/gnu/llvm/clang/docs/ClangFormat.rst
index 1138b233267..b09f48b0027 100644
--- a/gnu/llvm/clang/docs/ClangFormat.rst
+++ b/gnu/llvm/clang/docs/ClangFormat.rst
@@ -173,16 +173,17 @@ shortcut in the BBEdit preferences, under Menus & Shortcuts.
CLion Integration
-==================
+=================
:program:`clang-format` is integrated into `CLion `_ as an alternative code formatter. It is disabled by default and
-can be turned on in Settings/Preferences | Editor | Code Style.
+.com/clion/>`_ as an alternative code formatter. CLion turns it on
+automatically when there is a ``.clang-format`` file under the project root.
+Code style rules are applied as you type, including indentation,
+auto-completion, code generation, and refactorings.
-If :program:`clang-format` support is enabled, CLion detects config files when
-opening a project and suggests overriding the current IDE settings. Code style
-rules from the ``.clang-format`` files are then applied automatically to all
-editor actions, including auto-completion, code generation, and refactorings.
+:program:`clang-format` can also be enabled without a ``.clang-format`` file.
+In this case, CLion prompts you to create one based on the current IDE settings
+or the default LLVM style.
Visual Studio Integration
@@ -192,6 +193,12 @@ Download the latest Visual Studio extension from the `alpha build site
`_. The default key-binding is Ctrl-R,Ctrl-F.
+Visual Studio Code Integration
+==============================
+
+Get the latest Visual Studio Code extension from the `Visual Studio Marketplace `_. The default key-binding is Alt-Shift-F.
+
+
Script for patch reformatting
=============================
@@ -234,3 +241,8 @@ In an SVN client, you can do:
The option `-U0` will create a diff without context lines (the script would format
those as well).
+
+Current State of Clang Format for LLVM
+======================================
+
+The following table :doc:`ClangFormattedStatus` shows the current status of clang-formatting for the entire LLVM source tree.
diff --git a/gnu/llvm/clang/docs/ClangFormatStyleOptions.rst b/gnu/llvm/clang/docs/ClangFormatStyleOptions.rst
index 18cdc54a370..e84676760c3 100644
--- a/gnu/llvm/clang/docs/ClangFormatStyleOptions.rst
+++ b/gnu/llvm/clang/docs/ClangFormatStyleOptions.rst
@@ -151,6 +151,9 @@ the configuration (without a prefix: ``Auto``).
* ``Microsoft``
A style complying with `Microsoft's style guide
`_
+ * ``GNU``
+ A style complying with the `GNU coding standards
+ `_
.. START_FORMAT_STYLE_OPTIONS
@@ -204,6 +207,18 @@ the configuration (without a prefix: ``Auto``).
int b = 23;
int ccc = 23;
+**AlignConsecutiveBitFields** (``bool``)
+ If ``true``, aligns consecutive bitfield members.
+
+ This will align the bitfield separators of consecutive lines. This
+ will result in formattings like
+
+ .. code-block:: c++
+
+ int aaaa : 1;
+ int b : 12;
+ int ccc : 8;
+
**AlignConsecutiveDeclarations** (``bool``)
If ``true``, aligns consecutive declarations.
@@ -270,17 +285,49 @@ the configuration (without a prefix: ``Auto``).
-**AlignOperands** (``bool``)
+**AlignOperands** (``OperandAlignmentStyle``)
If ``true``, horizontally align operands of binary and ternary
expressions.
- Specifically, this aligns operands of a single expression that needs to be
- split over multiple lines, e.g.:
+ Possible values:
+
+ * ``OAS_DontAlign`` (in configuration: ``DontAlign``)
+ Do not align operands of binary and ternary expressions.
+ The wrapped lines are indented ``ContinuationIndentWidth`` spaces from
+ the start of the line.
+
+ * ``OAS_Align`` (in configuration: ``Align``)
+ Horizontally align operands of binary and ternary expressions.
+
+ Specifically, this aligns operands of a single expression that needs
+ to be split over multiple lines, e.g.:
+
+ .. code-block:: c++
+
+ int aaa = bbbbbbbbbbbbbbb +
+ ccccccccccccccc;
+
+ When ``BreakBeforeBinaryOperators`` is set, the wrapped operator is
+ aligned with the operand on the first line.
+
+ .. code-block:: c++
+
+ int aaa = bbbbbbbbbbbbbbb
+ + ccccccccccccccc;
+
+ * ``OAS_AlignAfterOperator`` (in configuration: ``AlignAfterOperator``)
+ Horizontally align operands of binary and ternary expressions.
+
+ This is similar to ``AO_Align``, except when
+ ``BreakBeforeBinaryOperators`` is set, the operator is un-indented so
+ that the wrapped operand is aligned with the operand on the first line.
+
+ .. code-block:: c++
+
+ int aaa = bbbbbbbbbbbbbbb
+ + ccccccccccccccc;
- .. code-block:: c++
- int aaa = bbbbbbbbbbbbbbb +
- ccccccccccccccc;
**AlignTrailingComments** (``bool``)
If ``true``, aligns trailing comments.
@@ -395,6 +442,21 @@ the configuration (without a prefix: ``Auto``).
return;
}
+**AllowShortEnumsOnASingleLine** (``bool``)
+ Allow short enums on a single line.
+
+ .. code-block:: c++
+
+ true:
+ enum { A, B } myEnum;
+
+ false:
+ enum
+ {
+ A,
+ B
+ } myEnum;
+
**AllowShortFunctionsOnASingleLine** (``ShortFunctionStyle``)
Dependent on the value, ``int f() { return 0; }`` can be put on a
single line.
@@ -948,6 +1010,39 @@ the configuration (without a prefix: ``Auto``).
} else {
}
+ * ``bool BeforeLambdaBody`` Wrap lambda block.
+
+ .. code-block:: c++
+
+ true:
+ connect(
+ []()
+ {
+ foo();
+ bar();
+ });
+
+ false:
+ connect([]() {
+ foo();
+ bar();
+ });
+
+ * ``bool BeforeWhile`` Wrap before ``while``.
+
+ .. code-block:: c++
+
+ true:
+ do {
+ foo();
+ }
+ while (1);
+
+ false:
+ do {
+ foo();
+ } while (1);
+
* ``bool IndentBraces`` Indent the wrapped braces themselves.
* ``bool SplitEmptyFunction`` If ``false``, empty function body can be put on a single line.
@@ -1605,12 +1700,36 @@ the configuration (without a prefix: ``Auto``).
``ClassImpl.hpp`` would not have the main include file put on top
before any other include.
+**IndentCaseBlocks** (``bool``)
+ Indent case label blocks one level from the case label.
+
+ When ``false``, the block following the case label uses the same
+ indentation level as for the case label, treating the case label the same
+ as an if-statement.
+ When ``true``, the block gets indented as a scope block.
+
+ .. code-block:: c++
+
+ false: true:
+ switch (fool) { vs. switch (fool) {
+ case 1: { case 1:
+ bar(); {
+ } break; bar();
+ default: { }
+ plop(); break;
+ } default:
+ } {
+ plop();
+ }
+ }
+
**IndentCaseLabels** (``bool``)
Indent case labels one level from the switch statement.
When ``false``, use the same indentation level as for the switch
statement. Switch statement body is always indented one level more than
- case labels.
+ case labels (except the first block following the case label, which
+ itself indents the code - unless IndentCaseBlocks is enabled).
.. code-block:: c++
@@ -1623,6 +1742,52 @@ the configuration (without a prefix: ``Auto``).
plop(); plop();
} }
+**IndentExternBlock** (``IndentExternBlockStyle``)
+ IndentExternBlockStyle is the type of indenting of extern blocks.
+
+ Possible values:
+
+ * ``IEBS_AfterExternBlock`` (in configuration: ``AfterExternBlock``)
+ Backwards compatible with AfterExternBlock's indenting.
+
+ .. code-block:: c++
+
+ IndentExternBlock: AfterExternBlock
+ BraceWrapping.AfterExternBlock: true
+ extern "C"
+ {
+ void foo();
+ }
+
+
+ .. code-block:: c++
+
+ IndentExternBlock: AfterExternBlock
+ BraceWrapping.AfterExternBlock: false
+ extern "C" {
+ void foo();
+ }
+
+ * ``IEBS_NoIndent`` (in configuration: ``NoIndent``)
+ Does not indent extern blocks.
+
+ .. code-block:: c++
+
+ extern "C" {
+ void foo();
+ }
+
+ * ``IEBS_Indent`` (in configuration: ``Indent``)
+ Indents extern blocks.
+
+ .. code-block:: c++
+
+ extern "C" {
+ void foo();
+ }
+
+
+
**IndentGotoLabels** (``bool``)
Indent goto labels.
@@ -1708,6 +1873,38 @@ the configuration (without a prefix: ``Auto``).
LoooooooooooooooooooooooooooooooooooooooongReturnType
LoooooooooooooooooooooooooooooooongFunctionDeclaration();
+**InsertTrailingCommas** (``TrailingCommaStyle``)
+ If set to ``TCS_Wrapped`` will insert trailing commas in container
+ literals (arrays and objects) that wrap across multiple lines.
+ It is currently only available for JavaScript
+ and disabled by default ``TCS_None``.
+ ``InsertTrailingCommas`` cannot be used together with ``BinPackArguments``
+ as inserting the comma disables bin-packing.
+
+ .. code-block:: c++
+
+ TSC_Wrapped:
+ const someArray = [
+ aaaaaaaaaaaaaaaaaaaaaaaaaa,
+ aaaaaaaaaaaaaaaaaaaaaaaaaa,
+ aaaaaaaaaaaaaaaaaaaaaaaaaa,
+ // ^ inserted
+ ]
+
+ Possible values:
+
+ * ``TCS_None`` (in configuration: ``None``)
+ Do not insert trailing commas.
+
+ * ``TCS_Wrapped`` (in configuration: ``Wrapped``)
+ Insert trailing commas in container literals that were wrapped over
+ multiple lines. Note that this is conceptually incompatible with
+ bin-packing, because the trailing comma is used as an indicator
+ that a container should be formatted one-per-line (i.e. not bin-packed).
+ So inserting a trailing comma counteracts bin-packing.
+
+
+
**JavaImportGroups** (``std::vector``)
A vector of prefixes ordered by the desired groups for Java imports.
@@ -1993,6 +2190,30 @@ the configuration (without a prefix: ``Auto``).
[self onOperationDone];
}];
+**ObjCBreakBeforeNestedBlockParam** (``bool``)
+ Break parameters list into lines when there is nested block
+ parameters in a fuction call.
+
+ .. code-block:: c++
+
+ false:
+ - (void)_aMethod
+ {
+ [self.test1 t:self w:self callback:^(typeof(self) self, NSNumber
+ *u, NSNumber *v) {
+ u = c;
+ }]
+ }
+ true:
+ - (void)_aMethod
+ {
+ [self.test1 t:self
+ w:self
+ callback:^(typeof(self) self, NSNumber *u, NSNumber *v) {
+ u = c;
+ }]
+ }
+
**ObjCSpaceAfterProperty** (``bool``)
Add a space after ``@property`` in Objective-C, i.e. use
``@property (readonly)`` instead of ``@property(readonly)``.
@@ -2223,6 +2444,19 @@ the configuration (without a prefix: ``Auto``).
}
}
+ * ``SBPO_ControlStatementsExceptForEachMacros`` (in configuration: ``ControlStatementsExceptForEachMacros``)
+ Same as ``SBPO_ControlStatements`` except this option doesn't apply to
+ ForEach macros. This is useful in projects where ForEach macros are
+ treated as function calls instead of control statements.
+
+ .. code-block:: c++
+
+ void f() {
+ Q_FOREACH(...) {
+ f();
+ }
+ }
+
* ``SBPO_NonEmptyParentheses`` (in configuration: ``NonEmptyParentheses``)
Put a space before opening parentheses only if the parentheses are not
empty i.e. '()'
@@ -2329,7 +2563,14 @@ the configuration (without a prefix: ``Auto``).
x = ( int32 )y vs. x = (int32)y
**SpacesInConditionalStatement** (``bool``)
- If ``true``, spaces will be inserted around if/for/while (and similar) conditions.
+ If ``true``, spaces will be inserted around if/for/switch/while
+ conditions.
+
+ .. code-block:: c++
+
+ true: false:
+ if ( a ) { ... } vs. if (a) { ... }
+ while ( i < 5 ) { ... } while (i < 5) { ... }
**SpacesInContainerLiterals** (``bool``)
If ``true``, spaces are inserted inside container literals (e.g.
@@ -2442,12 +2683,34 @@ the configuration (without a prefix: ``Auto``).
Use tabs only for indentation.
* ``UT_ForContinuationAndIndentation`` (in configuration: ``ForContinuationAndIndentation``)
- Use tabs only for line continuation and indentation.
+ Fill all leading whitespace with tabs, and use spaces for alignment that
+ appears within a line (e.g. consecutive assignments and declarations).
+
+ * ``UT_AlignWithSpaces`` (in configuration: ``AlignWithSpaces``)
+ Use tabs for line continuation and indentation, and spaces for
+ alignment.
* ``UT_Always`` (in configuration: ``Always``)
Use tabs whenever we need to fill whitespace that spans at least from
one tab stop to the next one.
+**WhitespaceSensitiveMacros** (``std::vector``)
+ A vector of macros which are whitespace-sensitive and should not be touched.
+
+ These are expected to be macros of the form:
+
+ .. code-block:: c++
+
+ STRINGIZE(...)
+
+ In the .clang-format configuration file, this can be configured like:
+
+ .. code-block:: yaml
+
+ WhitespaceSensitiveMacros: ['STRINGIZE', 'PP_STRINGIZE']
+
+ For example: BOOST_PP_STRINGIZE.
+
.. END_FORMAT_STYLE_OPTIONS
diff --git a/gnu/llvm/clang/docs/ClangFormattedStatus.rst b/gnu/llvm/clang/docs/ClangFormattedStatus.rst
new file mode 100644
index 00000000000..3e348eadd4f
--- /dev/null
+++ b/gnu/llvm/clang/docs/ClangFormattedStatus.rst
@@ -0,0 +1,6866 @@
+.. raw:: html
+
+
+
+.. role:: none
+.. role:: part
+.. role:: good
+.. role:: total
+
+======================
+Clang Formatted Status
+======================
+
+:doc:`ClangFormattedStatus` describes the state of LLVM source
+tree in terms of conformance to :doc:`ClangFormat` as of: June 27, 2020 11:36:24 (`eb50838ba08 `_).
+
+
+.. list-table:: LLVM Clang-Format Status
+ :widths: 50 25 25 25 25
+ :header-rows: 1
+
+ * - Directory
+ - Total Files
+ - Formatted Files
+ - Unformatted Files
+ - % Complete
+ * - clang/bindings/python/tests/cindex/INPUTS
+ - `5`
+ - `3`
+ - `2`
+ - :part:`60%`
+ * - clang/docs/analyzer/checkers
+ - `2`
+ - `0`
+ - `2`
+ - :none:`0%`
+ * - clang/examples/AnnotateFunctions
+ - `1`
+ - `0`
+ - `1`
+ - :none:`0%`
+ * - clang/examples/Attribute
+ - `1`
+ - `0`
+ - `1`
+ - :none:`0%`
+ * - clang/examples/clang-interpreter
+ - `1`
+ - `0`
+ - `1`
+ - :none:`0%`
+ * - clang/examples/PrintFunctionNames
+ - `1`
+ - `0`
+ - `1`
+ - :none:`0%`
+ * - clang/include/clang/Analysis
+ - `14`
+ - `3`
+ - `11`
+ - :part:`21%`
+ * - clang/include/clang/Analysis/Analyses
+ - `14`
+ - `2`
+ - `12`
+ - :part:`14%`
+ * - clang/include/clang/Analysis/DomainSpecific
+ - `2`
+ - `0`
+ - `2`
+ - :none:`0%`
+ * - clang/include/clang/Analysis/FlowSensitive
+ - `2`
+ - `1`
+ - `1`
+ - :part:`50%`
+ * - clang/include/clang/Analysis/Support
+ - `1`
+ - `0`
+ - `1`
+ - :none:`0%`
+ * - clang/include/clang/ARCMigrate
+ - `3`
+ - `0`
+ - `3`
+ - :none:`0%`
+ * - clang/include/clang/AST
+ - `113`
+ - `20`
+ - `93`
+ - :part:`17%`
+ * - clang/include/clang/ASTMatchers
+ - `5`
+ - `1`
+ - `4`
+ - :part:`20%`
+ * - clang/include/clang/ASTMatchers/Dynamic
+ - `4`
+ - `1`
+ - `3`
+ - :part:`25%`
+ * - clang/include/clang/Basic
+ - `76`
+ - `26`
+ - `50`
+ - :part:`34%`
+ * - clang/include/clang/CodeGen
+ - `9`
+ - `0`
+ - `9`
+ - :none:`0%`
+ * - clang/include/clang/CrossTU
+ - `2`
+ - `1`
+ - `1`
+ - :part:`50%`
+ * - clang/include/clang/DirectoryWatcher
+ - `1`
+ - `1`
+ - `0`
+ - :good:`100%`
+ * - clang/include/clang/Driver
+ - `17`
+ - `4`
+ - `13`
+ - :part:`23%`
+ * - clang/include/clang/Edit
+ - `5`
+ - `1`
+ - `4`
+ - :part:`20%`
+ * - clang/include/clang/Format
+ - `1`
+ - `1`
+ - `0`
+ - :good:`100%`
+ * - clang/include/clang/Frontend
+ - `28`
+ - `7`
+ - `21`
+ - :part:`25%`
+ * - clang/include/clang/FrontendTool
+ - `1`
+ - `0`
+ - `1`
+ - :none:`0%`
+ * - clang/include/clang/Index
+ - `7`
+ - `2`
+ - `5`
+ - :part:`28%`
+ * - clang/include/clang/Lex
+ - `29`
+ - `4`
+ - `25`
+ - :part:`13%`
+ * - clang/include/clang/Parse
+ - `5`
+ - `2`
+ - `3`
+ - :part:`40%`
+ * - clang/include/clang/Rewrite/Core
+ - `6`
+ - `0`
+ - `6`
+ - :none:`0%`
+ * - clang/include/clang/Rewrite/Frontend
+ - `4`
+ - `0`
+ - `4`
+ - :none:`0%`
+ * - clang/include/clang/Sema
+ - `32`
+ - `3`
+ - `29`
+ - :part:`9%`
+ * - clang/include/clang/Serialization
+ - `14`
+ - `2`
+ - `12`
+ - :part:`14%`
+ * - clang/include/clang/StaticAnalyzer/Checkers
+ - `4`
+ - `1`
+ - `3`
+ - :part:`25%`
+ * - clang/include/clang/StaticAnalyzer/Core
+ - `5`
+ - `1`
+ - `4`
+ - :part:`20%`
+ * - clang/include/clang/StaticAnalyzer/Core/BugReporter
+ - `4`
+ - `1`
+ - `3`
+ - :part:`25%`
+ * - clang/include/clang/StaticAnalyzer/Core/PathSensitive
+ - `36`
+ - `9`
+ - `27`
+ - :part:`25%`
+ * - clang/include/clang/StaticAnalyzer/Frontend
+ - `5`
+ - `3`
+ - `2`
+ - :part:`60%`
+ * - clang/include/clang/Testing
+ - `1`
+ - `1`
+ - `0`
+ - :good:`100%`
+ * - clang/include/clang/Tooling
+ - `16`
+ - `9`
+ - `7`
+ - :part:`56%`
+ * - clang/include/clang/Tooling/ASTDiff
+ - `2`
+ - `2`
+ - `0`
+ - :good:`100%`
+ * - clang/include/clang/Tooling/Core
+ - `3`
+ - `1`
+ - `2`
+ - :part:`33%`
+ * - clang/include/clang/Tooling/DependencyScanning
+ - `5`
+ - `4`
+ - `1`
+ - :part:`80%`
+ * - clang/include/clang/Tooling/Inclusions
+ - `2`
+ - `0`
+ - `2`
+ - :none:`0%`
+ * - clang/include/clang/Tooling/Refactoring
+ - `14`
+ - `12`
+ - `2`
+ - :part:`85%`
+ * - clang/include/clang/Tooling/Refactoring/Extract
+ - `2`
+ - `1`
+ - `1`
+ - :part:`50%`
+ * - clang/include/clang/Tooling/Refactoring/Rename
+ - `6`
+ - `5`
+ - `1`
+ - :part:`83%`
+ * - clang/include/clang/Tooling/Syntax
+ - `5`
+ - `5`
+ - `0`
+ - :good:`100%`
+ * - clang/include/clang/Tooling/Transformer
+ - `8`
+ - `7`
+ - `1`
+ - :part:`87%`
+ * - clang/include/clang-c
+ - `9`
+ - `3`
+ - `6`
+ - :part:`33%`
+ * - clang/INPUTS
+ - `2`
+ - `0`
+ - `2`
+ - :none:`0%`
+ * - clang/lib/Analysis
+ - `25`
+ - `2`
+ - `23`
+ - :part:`8%`
+ * - clang/lib/Analysis/plugins/CheckerDependencyHandling
+ - `1`
+ - `1`
+ - `0`
+ - :good:`100%`
+ * - clang/lib/Analysis/plugins/CheckerOptionHandling
+ - `1`
+ - `0`
+ - `1`
+ - :none:`0%`
+ * - clang/lib/Analysis/plugins/SampleAnalyzer
+ - `1`
+ - `1`
+ - `0`
+ - :good:`100%`
+ * - clang/lib/ARCMigrate
+ - `22`
+ - `0`
+ - `22`
+ - :none:`0%`
+ * - clang/lib/AST
+ - `80`
+ - `2`
+ - `78`
+ - :part:`2%`
+ * - clang/lib/AST/Interp
+ - `44`
+ - `19`
+ - `25`
+ - :part:`43%`
+ * - clang/lib/ASTMatchers
+ - `3`
+ - `0`
+ - `3`
+ - :none:`0%`
+ * - clang/lib/ASTMatchers/Dynamic
+ - `6`
+ - `1`
+ - `5`
+ - :part:`16%`
+ * - clang/lib/Basic
+ - `34`
+ - `8`
+ - `26`
+ - :part:`23%`
+ * - clang/lib/Basic/Targets
+ - `48`
+ - `23`
+ - `25`
+ - :part:`47%`
+ * - clang/lib/CodeGen
+ - `87`
+ - `8`
+ - `79`
+ - :part:`9%`
+ * - clang/lib/CrossTU
+ - `1`
+ - `0`
+ - `1`
+ - :none:`0%`
+ * - clang/lib/DirectoryWatcher
+ - `2`
+ - `2`
+ - `0`
+ - :good:`100%`
+ * - clang/lib/DirectoryWatcher/default
+ - `1`
+ - `0`
+ - `1`
+ - :none:`0%`
+ * - clang/lib/DirectoryWatcher/linux
+ - `1`
+ - `0`
+ - `1`
+ - :none:`0%`
+ * - clang/lib/DirectoryWatcher/mac
+ - `1`
+ - `0`
+ - `1`
+ - :none:`0%`
+ * - clang/lib/DirectoryWatcher/windows
+ - `1`
+ - `0`
+ - `1`
+ - :none:`0%`
+ * - clang/lib/Driver
+ - `16`
+ - `2`
+ - `14`
+ - :part:`12%`
+ * - clang/lib/Driver/ToolChains
+ - `83`
+ - `27`
+ - `56`
+ - :part:`32%`
+ * - clang/lib/Driver/ToolChains/Arch
+ - `18`
+ - `4`
+ - `14`
+ - :part:`22%`
+ * - clang/lib/Edit
+ - `3`
+ - `0`
+ - `3`
+ - :none:`0%`
+ * - clang/lib/Format
+ - `29`
+ - `29`
+ - `0`
+ - :good:`100%`
+ * - clang/lib/Format/old
+ - `2`
+ - `1`
+ - `1`
+ - :part:`50%`
+ * - clang/lib/Frontend
+ - `33`
+ - `4`
+ - `29`
+ - :part:`12%`
+ * - clang/lib/Frontend/Rewrite
+ - `8`
+ - `0`
+ - `8`
+ - :none:`0%`
+ * - clang/lib/FrontendTool
+ - `1`
+ - `0`
+ - `1`
+ - :none:`0%`
+ * - clang/lib/Headers
+ - `129`
+ - `12`
+ - `117`
+ - :part:`9%`
+ * - clang/lib/Headers/openmp_wrappers
+ - `3`
+ - `3`
+ - `0`
+ - :good:`100%`
+ * - clang/lib/Headers/ppc_wrappers
+ - `7`
+ - `2`
+ - `5`
+ - :part:`28%`
+ * - clang/lib/Index
+ - `12`
+ - `2`
+ - `10`
+ - :part:`16%`
+ * - clang/lib/Lex
+ - `23`
+ - `1`
+ - `22`
+ - :part:`4%`
+ * - clang/lib/Parse
+ - `15`
+ - `0`
+ - `15`
+ - :none:`0%`
+ * - clang/lib/Rewrite
+ - `5`
+ - `0`
+ - `5`
+ - :none:`0%`
+ * - clang/lib/Sema
+ - `55`
+ - `4`
+ - `51`
+ - :part:`7%`
+ * - clang/lib/Serialization
+ - `17`
+ - `1`
+ - `16`
+ - :part:`5%`
+ * - clang/lib/StaticAnalyzer/Checkers
+ - `115`
+ - `13`
+ - `102`
+ - :part:`11%`
+ * - clang/lib/StaticAnalyzer/Checkers/cert
+ - `1`
+ - `1`
+ - `0`
+ - :good:`100%`
+ * - clang/lib/StaticAnalyzer/Checkers/MPI-Checker
+ - `6`
+ - `0`
+ - `6`
+ - :none:`0%`
+ * - clang/lib/StaticAnalyzer/Checkers/RetainCountChecker
+ - `4`
+ - `0`
+ - `4`
+ - :none:`0%`
+ * - clang/lib/StaticAnalyzer/Checkers/UninitializedObject
+ - `3`
+ - `1`
+ - `2`
+ - :part:`33%`
+ * - clang/lib/StaticAnalyzer/Checkers/WebKit
+ - `8`
+ - `6`
+ - `2`
+ - :part:`75%`
+ * - clang/lib/StaticAnalyzer/Core
+ - `46`
+ - `8`
+ - `38`
+ - :part:`17%`
+ * - clang/lib/StaticAnalyzer/Frontend
+ - `8`
+ - `3`
+ - `5`
+ - :part:`37%`
+ * - clang/lib/Testing
+ - `1`
+ - `1`
+ - `0`
+ - :good:`100%`
+ * - clang/lib/Tooling
+ - `15`
+ - `6`
+ - `9`
+ - :part:`40%`
+ * - clang/lib/Tooling/ASTDiff
+ - `1`
+ - `0`
+ - `1`
+ - :none:`0%`
+ * - clang/lib/Tooling/Core
+ - `3`
+ - `1`
+ - `2`
+ - :part:`33%`
+ * - clang/lib/Tooling/DependencyScanning
+ - `5`
+ - `2`
+ - `3`
+ - :part:`40%`
+ * - clang/lib/Tooling/Inclusions
+ - `2`
+ - `2`
+ - `0`
+ - :good:`100%`
+ * - clang/lib/Tooling/Refactoring
+ - `4`
+ - `2`
+ - `2`
+ - :part:`50%`
+ * - clang/lib/Tooling/Refactoring/Extract
+ - `2`
+ - `1`
+ - `1`
+ - :part:`50%`
+ * - clang/lib/Tooling/Refactoring/Rename
+ - `5`
+ - `2`
+ - `3`
+ - :part:`40%`
+ * - clang/lib/Tooling/Syntax
+ - `7`
+ - `6`
+ - `1`
+ - :part:`85%`
+ * - clang/lib/Tooling/Transformer
+ - `7`
+ - `4`
+ - `3`
+ - :part:`57%`
+ * - clang/tools/arcmt-test
+ - `1`
+ - `0`
+ - `1`
+ - :none:`0%`
+ * - clang/tools/c-index-test
+ - `1`
+ - `0`
+ - `1`
+ - :none:`0%`
+ * - clang/tools/clang-check
+ - `1`
+ - `0`
+ - `1`
+ - :none:`0%`
+ * - clang/tools/clang-diff
+ - `1`
+ - `0`
+ - `1`
+ - :none:`0%`
+ * - clang/tools/clang-extdef-mapping
+ - `1`
+ - `0`
+ - `1`
+ - :none:`0%`
+ * - clang/tools/clang-format
+ - `1`
+ - `1`
+ - `0`
+ - :good:`100%`
+ * - clang/tools/clang-format/fuzzer
+ - `1`
+ - `0`
+ - `1`
+ - :none:`0%`
+ * - clang/tools/clang-fuzzer
+ - `6`
+ - `4`
+ - `2`
+ - :part:`66%`
+ * - clang/tools/clang-fuzzer/fuzzer-initialize
+ - `2`
+ - `0`
+ - `2`
+ - :none:`0%`
+ * - clang/tools/clang-fuzzer/handle-cxx
+ - `2`
+ - `0`
+ - `2`
+ - :none:`0%`
+ * - clang/tools/clang-fuzzer/handle-llvm
+ - `3`
+ - `1`
+ - `2`
+ - :part:`33%`
+ * - clang/tools/clang-fuzzer/proto-to-cxx
+ - `5`
+ - `0`
+ - `5`
+ - :none:`0%`
+ * - clang/tools/clang-fuzzer/proto-to-llvm
+ - `3`
+ - `0`
+ - `3`
+ - :none:`0%`
+ * - clang/tools/clang-import-test
+ - `1`
+ - `1`
+ - `0`
+ - :good:`100%`
+ * - clang/tools/clang-offload-bundler
+ - `1`
+ - `0`
+ - `1`
+ - :none:`0%`
+ * - clang/tools/clang-offload-wrapper
+ - `1`
+ - `1`
+ - `0`
+ - :good:`100%`
+ * - clang/tools/clang-refactor
+ - `4`
+ - `4`
+ - `0`
+ - :good:`100%`
+ * - clang/tools/clang-rename
+ - `1`
+ - `1`
+ - `0`
+ - :good:`100%`
+ * - clang/tools/clang-scan-deps
+ - `1`
+ - `0`
+ - `1`
+ - :none:`0%`
+ * - clang/tools/clang-shlib
+ - `1`
+ - `1`
+ - `0`
+ - :good:`100%`
+ * - clang/tools/diagtool
+ - `9`
+ - `0`
+ - `9`
+ - :none:`0%`
+ * - clang/tools/driver
+ - `4`
+ - `1`
+ - `3`
+ - :part:`25%`
+ * - clang/tools/libclang
+ - `34`
+ - `6`
+ - `28`
+ - :part:`17%`
+ * - clang/tools/scan-build-py/tests/functional/src/include
+ - `1`
+ - `1`
+ - `0`
+ - :good:`100%`
+ * - clang/unittests/Analysis
+ - `5`
+ - `2`
+ - `3`
+ - :part:`40%`
+ * - clang/unittests/AST
+ - `27`
+ - `6`
+ - `21`
+ - :part:`22%`
+ * - clang/unittests/ASTMatchers
+ - `6`
+ - `0`
+ - `6`
+ - :none:`0%`
+ * - clang/unittests/ASTMatchers/Dynamic
+ - `3`
+ - `0`
+ - `3`
+ - :none:`0%`
+ * - clang/unittests/Basic
+ - `5`
+ - `1`
+ - `4`
+ - :part:`20%`
+ * - clang/unittests/CodeGen
+ - `5`
+ - `0`
+ - `5`
+ - :none:`0%`
+ * - clang/unittests/CrossTU
+ - `1`
+ - `1`
+ - `0`
+ - :good:`100%`
+ * - clang/unittests/DirectoryWatcher
+ - `1`
+ - `0`
+ - `1`
+ - :none:`0%`
+ * - clang/unittests/Driver
+ - `5`
+ - `1`
+ - `4`
+ - :part:`20%`
+ * - clang/unittests/Format
+ - `18`
+ - `17`
+ - `1`
+ - :part:`94%`
+ * - clang/unittests/Frontend
+ - `9`
+ - `5`
+ - `4`
+ - :part:`55%`
+ * - clang/unittests/Index
+ - `1`
+ - `1`
+ - `0`
+ - :good:`100%`
+ * - clang/unittests/Lex
+ - `6`
+ - `1`
+ - `5`
+ - :part:`16%`
+ * - clang/unittests/libclang
+ - `2`
+ - `0`
+ - `2`
+ - :none:`0%`
+ * - clang/unittests/libclang/CrashTests
+ - `1`
+ - `1`
+ - `0`
+ - :good:`100%`
+ * - clang/unittests/Rename
+ - `6`
+ - `0`
+ - `6`
+ - :none:`0%`
+ * - clang/unittests/Rewrite
+ - `2`
+ - `1`
+ - `1`
+ - :part:`50%`
+ * - clang/unittests/Sema
+ - `3`
+ - `2`
+ - `1`
+ - :part:`66%`
+ * - clang/unittests/Serialization
+ - `1`
+ - `1`
+ - `0`
+ - :good:`100%`
+ * - clang/unittests/StaticAnalyzer
+ - `11`
+ - `4`
+ - `7`
+ - :part:`36%`
+ * - clang/unittests/Tooling
+ - `29`
+ - `7`
+ - `22`
+ - :part:`24%`
+ * - clang/unittests/Tooling/RecursiveASTVisitorTests
+ - `23`
+ - `9`
+ - `14`
+ - :part:`39%`
+ * - clang/unittests/Tooling/Syntax
+ - `2`
+ - `2`
+ - `0`
+ - :good:`100%`
+ * - clang/utils/perf-training/cxx
+ - `1`
+ - `0`
+ - `1`
+ - :none:`0%`
+ * - clang/utils/TableGen
+ - `20`
+ - `2`
+ - `18`
+ - :part:`10%`
+ * - clang-tools-extra/clang-apply-replacements/include/clang-apply-replacements/Tooling
+ - `1`
+ - `1`
+ - `0`
+ - :good:`100%`
+ * - clang-tools-extra/clang-apply-replacements/lib/Tooling
+ - `1`
+ - `1`
+ - `0`
+ - :good:`100%`
+ * - clang-tools-extra/clang-apply-replacements/tool
+ - `1`
+ - `1`
+ - `0`
+ - :good:`100%`
+ * - clang-tools-extra/clang-change-namespace
+ - `2`
+ - `0`
+ - `2`
+ - :none:`0%`
+ * - clang-tools-extra/clang-change-namespace/tool
+ - `1`
+ - `0`
+ - `1`
+ - :none:`0%`
+ * - clang-tools-extra/clang-doc
+ - `17`
+ - `16`
+ - `1`
+ - :part:`94%`
+ * - clang-tools-extra/clang-doc/tool
+ - `1`
+ - `1`
+ - `0`
+ - :good:`100%`
+ * - clang-tools-extra/clang-include-fixer
+ - `13`
+ - `7`
+ - `6`
+ - :part:`53%`
+ * - clang-tools-extra/clang-include-fixer/find-all-symbols
+ - `17`
+ - `13`
+ - `4`
+ - :part:`76%`
+ * - clang-tools-extra/clang-include-fixer/find-all-symbols/tool
+ - `1`
+ - `0`
+ - `1`
+ - :none:`0%`
+ * - clang-tools-extra/clang-include-fixer/plugin
+ - `1`
+ - `1`
+ - `0`
+ - :good:`100%`
+ * - clang-tools-extra/clang-include-fixer/tool
+ - `1`
+ - `0`
+ - `1`
+ - :none:`0%`
+ * - clang-tools-extra/clang-move
+ - `4`
+ - `1`
+ - `3`
+ - :part:`25%`
+ * - clang-tools-extra/clang-move/tool
+ - `1`
+ - `1`
+ - `0`
+ - :good:`100%`
+ * - clang-tools-extra/clang-query
+ - `5`
+ - `3`
+ - `2`
+ - :part:`60%`
+ * - clang-tools-extra/clang-query/tool
+ - `1`
+ - `1`
+ - `0`
+ - :good:`100%`
+ * - clang-tools-extra/clang-reorder-fields
+ - `2`
+ - `1`
+ - `1`
+ - :part:`50%`
+ * - clang-tools-extra/clang-reorder-fields/tool
+ - `1`
+ - `0`
+ - `1`
+ - :none:`0%`
+ * - clang-tools-extra/clang-tidy
+ - `18`
+ - `10`
+ - `8`
+ - :part:`55%`
+ * - clang-tools-extra/clang-tidy/abseil
+ - `40`
+ - `28`
+ - `12`
+ - :part:`70%`
+ * - clang-tools-extra/clang-tidy/android
+ - `33`
+ - `23`
+ - `10`
+ - :part:`69%`
+ * - clang-tools-extra/clang-tidy/boost
+ - `3`
+ - `3`
+ - `0`
+ - :good:`100%`
+ * - clang-tools-extra/clang-tidy/bugprone
+ - `105`
+ - `85`
+ - `20`
+ - :part:`80%`
+ * - clang-tools-extra/clang-tidy/cert
+ - `29`
+ - `27`
+ - `2`
+ - :part:`93%`
+ * - clang-tools-extra/clang-tidy/cppcoreguidelines
+ - `41`
+ - `38`
+ - `3`
+ - :part:`92%`
+ * - clang-tools-extra/clang-tidy/darwin
+ - `5`
+ - `2`
+ - `3`
+ - :part:`40%`
+ * - clang-tools-extra/clang-tidy/fuchsia
+ - `15`
+ - `9`
+ - `6`
+ - :part:`60%`
+ * - clang-tools-extra/clang-tidy/google
+ - `35`
+ - `23`
+ - `12`
+ - :part:`65%`
+ * - clang-tools-extra/clang-tidy/hicpp
+ - `9`
+ - `6`
+ - `3`
+ - :part:`66%`
+ * - clang-tools-extra/clang-tidy/linuxkernel
+ - `3`
+ - `2`
+ - `1`
+ - :part:`66%`
+ * - clang-tools-extra/clang-tidy/llvm
+ - `11`
+ - `10`
+ - `1`
+ - :part:`90%`
+ * - clang-tools-extra/clang-tidy/llvmlibc
+ - `7`
+ - `7`
+ - `0`
+ - :good:`100%`
+ * - clang-tools-extra/clang-tidy/misc
+ - `29`
+ - `25`
+ - `4`
+ - :part:`86%`
+ * - clang-tools-extra/clang-tidy/modernize
+ - `67`
+ - `46`
+ - `21`
+ - :part:`68%`
+ * - clang-tools-extra/clang-tidy/mpi
+ - `5`
+ - `4`
+ - `1`
+ - :part:`80%`
+ * - clang-tools-extra/clang-tidy/objc
+ - `15`
+ - `10`
+ - `5`
+ - :part:`66%`
+ * - clang-tools-extra/clang-tidy/openmp
+ - `5`
+ - `5`
+ - `0`
+ - :good:`100%`
+ * - clang-tools-extra/clang-tidy/performance
+ - `29`
+ - `24`
+ - `5`
+ - :part:`82%`
+ * - clang-tools-extra/clang-tidy/plugin
+ - `1`
+ - `1`
+ - `0`
+ - :good:`100%`
+ * - clang-tools-extra/clang-tidy/portability
+ - `5`
+ - `3`
+ - `2`
+ - :part:`60%`
+ * - clang-tools-extra/clang-tidy/readability
+ - `77`
+ - `63`
+ - `14`
+ - :part:`81%`
+ * - clang-tools-extra/clang-tidy/tool
+ - `3`
+ - `2`
+ - `1`
+ - :part:`66%`
+ * - clang-tools-extra/clang-tidy/utils
+ - `33`
+ - `26`
+ - `7`
+ - :part:`78%`
+ * - clang-tools-extra/clang-tidy/zircon
+ - `3`
+ - `3`
+ - `0`
+ - :good:`100%`
+ * - clang-tools-extra/clangd
+ - `75`
+ - `58`
+ - `17`
+ - :part:`77%`
+ * - clang-tools-extra/clangd/benchmarks
+ - `1`
+ - `1`
+ - `0`
+ - :good:`100%`
+ * - clang-tools-extra/clangd/fuzzer
+ - `2`
+ - `2`
+ - `0`
+ - :good:`100%`
+ * - clang-tools-extra/clangd/index
+ - `37`
+ - `34`
+ - `3`
+ - :part:`91%`
+ * - clang-tools-extra/clangd/index/dex
+ - `9`
+ - `8`
+ - `1`
+ - :part:`88%`
+ * - clang-tools-extra/clangd/index/dex/dexp
+ - `1`
+ - `1`
+ - `0`
+ - :good:`100%`
+ * - clang-tools-extra/clangd/index/remote
+ - `2`
+ - `2`
+ - `0`
+ - :good:`100%`
+ * - clang-tools-extra/clangd/index/remote/marshalling
+ - `2`
+ - `2`
+ - `0`
+ - :good:`100%`
+ * - clang-tools-extra/clangd/index/remote/server
+ - `1`
+ - `1`
+ - `0`
+ - :good:`100%`
+ * - clang-tools-extra/clangd/index/remote/unimplemented
+ - `1`
+ - `1`
+ - `0`
+ - :good:`100%`
+ * - clang-tools-extra/clangd/indexer
+ - `1`
+ - `1`
+ - `0`
+ - :good:`100%`
+ * - clang-tools-extra/clangd/refactor
+ - `4`
+ - `4`
+ - `0`
+ - :good:`100%`
+ * - clang-tools-extra/clangd/refactor/tweaks
+ - `13`
+ - `10`
+ - `3`
+ - :part:`76%`
+ * - clang-tools-extra/clangd/support
+ - `18`
+ - `18`
+ - `0`
+ - :good:`100%`
+ * - clang-tools-extra/clangd/tool
+ - `1`
+ - `1`
+ - `0`
+ - :good:`100%`
+ * - clang-tools-extra/clangd/unittests
+ - `64`
+ - `52`
+ - `12`
+ - :part:`81%`
+ * - clang-tools-extra/clangd/unittests/remote
+ - `1`
+ - `1`
+ - `0`
+ - :good:`100%`
+ * - clang-tools-extra/clangd/unittests/support
+ - `8`
+ - `8`
+ - `0`
+ - :good:`100%`
+ * - clang-tools-extra/clangd/unittests/xpc
+ - `1`
+ - `1`
+ - `0`
+ - :good:`100%`
+ * - clang-tools-extra/clangd/xpc
+ - `3`
+ - `3`
+ - `0`
+ - :good:`100%`
+ * - clang-tools-extra/clangd/xpc/framework
+ - `1`
+ - `1`
+ - `0`
+ - :good:`100%`
+ * - clang-tools-extra/clangd/xpc/test-client
+ - `1`
+ - `1`
+ - `0`
+ - :good:`100%`
+ * - clang-tools-extra/modularize
+ - `9`
+ - `1`
+ - `8`
+ - :part:`11%`
+ * - clang-tools-extra/pp-trace
+ - `3`
+ - `1`
+ - `2`
+ - :part:`33%`
+ * - clang-tools-extra/tool-template
+ - `1`
+ - `1`
+ - `0`
+ - :good:`100%`
+ * - clang-tools-extra/unittests/clang-apply-replacements
+ - `1`
+ - `1`
+ - `0`
+ - :good:`100%`
+ * - clang-tools-extra/unittests/clang-change-namespace
+ - `1`
+ - `0`
+ - `1`
+ - :none:`0%`
+ * - clang-tools-extra/unittests/clang-doc
+ - `9`
+ - `9`
+ - `0`
+ - :good:`100%`
+ * - clang-tools-extra/unittests/clang-include-fixer
+ - `2`
+ - `0`
+ - `2`
+ - :none:`0%`
+ * - clang-tools-extra/unittests/clang-include-fixer/find-all-symbols
+ - `1`
+ - `0`
+ - `1`
+ - :none:`0%`
+ * - clang-tools-extra/unittests/clang-move
+ - `1`
+ - `0`
+ - `1`
+ - :none:`0%`
+ * - clang-tools-extra/unittests/clang-query
+ - `2`
+ - `0`
+ - `2`
+ - :none:`0%`
+ * - clang-tools-extra/unittests/clang-tidy
+ - `14`
+ - `6`
+ - `8`
+ - :part:`42%`
+ * - clang-tools-extra/unittests/include/common
+ - `1`
+ - `0`
+ - `1`
+ - :none:`0%`
+ * - compiler-rt/include/fuzzer
+ - `1`
+ - `0`
+ - `1`
+ - :none:`0%`
+ * - compiler-rt/include/sanitizer
+ - `14`
+ - `1`
+ - `13`
+ - :part:`7%`
+ * - compiler-rt/include/xray
+ - `3`
+ - `2`
+ - `1`
+ - :part:`66%`
+ * - compiler-rt/lib/asan
+ - `59`
+ - `3`
+ - `56`
+ - :part:`5%`
+ * - compiler-rt/lib/asan/tests
+ - `17`
+ - `1`
+ - `16`
+ - :part:`5%`
+ * - compiler-rt/lib/BlocksRuntime
+ - `2`
+ - `0`
+ - `2`
+ - :none:`0%`
+ * - compiler-rt/lib/builtins
+ - `11`
+ - `9`
+ - `2`
+ - :part:`81%`
+ * - compiler-rt/lib/builtins/arm
+ - `1`
+ - `0`
+ - `1`
+ - :none:`0%`
+ * - compiler-rt/lib/builtins/ppc
+ - `1`
+ - `1`
+ - `0`
+ - :good:`100%`
+ * - compiler-rt/lib/cfi
+ - `1`
+ - `0`
+ - `1`
+ - :none:`0%`
+ * - compiler-rt/lib/dfsan
+ - `5`
+ - `0`
+ - `5`
+ - :none:`0%`
+ * - compiler-rt/lib/fuzzer
+ - `43`
+ - `5`
+ - `38`
+ - :part:`11%`
+ * - compiler-rt/lib/fuzzer/afl
+ - `1`
+ - `0`
+ - `1`
+ - :none:`0%`
+ * - compiler-rt/lib/fuzzer/dataflow
+ - `3`
+ - `0`
+ - `3`
+ - :none:`0%`
+ * - compiler-rt/lib/fuzzer/tests
+ - `2`
+ - `1`
+ - `1`
+ - :part:`50%`
+ * - compiler-rt/lib/gwp_asan
+ - `14`
+ - `13`
+ - `1`
+ - :part:`92%`
+ * - compiler-rt/lib/gwp_asan/optional
+ - `7`
+ - `7`
+ - `0`
+ - :good:`100%`
+ * - compiler-rt/lib/gwp_asan/platform_specific
+ - `4`
+ - `4`
+ - `0`
+ - :good:`100%`
+ * - compiler-rt/lib/gwp_asan/tests
+ - `14`
+ - `14`
+ - `0`
+ - :good:`100%`
+ * - compiler-rt/lib/gwp_asan/tests/optional
+ - `1`
+ - `1`
+ - `0`
+ - :good:`100%`
+ * - compiler-rt/lib/hwasan
+ - `27`
+ - `7`
+ - `20`
+ - :part:`25%`
+ * - compiler-rt/lib/interception
+ - `8`
+ - `1`
+ - `7`
+ - :part:`12%`
+ * - compiler-rt/lib/interception/tests
+ - `3`
+ - `1`
+ - `2`
+ - :part:`33%`
+ * - compiler-rt/lib/lsan
+ - `20`
+ - `7`
+ - `13`
+ - :part:`35%`
+ * - compiler-rt/lib/msan
+ - `18`
+ - `4`
+ - `14`
+ - :part:`22%`
+ * - compiler-rt/lib/msan/tests
+ - `4`
+ - `0`
+ - `4`
+ - :none:`0%`
+ * - compiler-rt/lib/profile
+ - `6`
+ - `0`
+ - `6`
+ - :none:`0%`
+ * - compiler-rt/lib/safestack
+ - `3`
+ - `1`
+ - `2`
+ - :part:`33%`
+ * - compiler-rt/lib/sanitizer_common
+ - `159`
+ - `23`
+ - `136`
+ - :part:`14%`
+ * - compiler-rt/lib/sanitizer_common/symbolizer
+ - `2`
+ - `2`
+ - `0`
+ - :good:`100%`
+ * - compiler-rt/lib/sanitizer_common/tests
+ - `38`
+ - `1`
+ - `37`
+ - :part:`2%`
+ * - compiler-rt/lib/scudo
+ - `20`
+ - `0`
+ - `20`
+ - :none:`0%`
+ * - compiler-rt/lib/scudo/standalone
+ - `46`
+ - `42`
+ - `4`
+ - :part:`91%`
+ * - compiler-rt/lib/scudo/standalone/benchmarks
+ - `1`
+ - `1`
+ - `0`
+ - :good:`100%`
+ * - compiler-rt/lib/scudo/standalone/fuzz
+ - `1`
+ - `0`
+ - `1`
+ - :none:`0%`
+ * - compiler-rt/lib/scudo/standalone/include/scudo
+ - `1`
+ - `1`
+ - `0`
+ - :good:`100%`
+ * - compiler-rt/lib/scudo/standalone/tests
+ - `23`
+ - `23`
+ - `0`
+ - :good:`100%`
+ * - compiler-rt/lib/scudo/standalone/tools
+ - `1`
+ - `0`
+ - `1`
+ - :none:`0%`
+ * - compiler-rt/lib/stats
+ - `3`
+ - `0`
+ - `3`
+ - :none:`0%`
+ * - compiler-rt/lib/tsan/benchmarks
+ - `6`
+ - `0`
+ - `6`
+ - :none:`0%`
+ * - compiler-rt/lib/tsan/dd
+ - `3`
+ - `0`
+ - `3`
+ - :none:`0%`
+ * - compiler-rt/lib/tsan/go
+ - `1`
+ - `0`
+ - `1`
+ - :none:`0%`
+ * - compiler-rt/lib/tsan/rtl
+ - `62`
+ - `10`
+ - `52`
+ - :part:`16%`
+ * - compiler-rt/lib/tsan/tests/rtl
+ - `10`
+ - `1`
+ - `9`
+ - :part:`10%`
+ * - compiler-rt/lib/tsan/tests/unit
+ - `10`
+ - `0`
+ - `10`
+ - :none:`0%`
+ * - compiler-rt/lib/ubsan
+ - `27`
+ - `7`
+ - `20`
+ - :part:`25%`
+ * - compiler-rt/lib/ubsan_minimal
+ - `1`
+ - `0`
+ - `1`
+ - :none:`0%`
+ * - compiler-rt/lib/xray
+ - `39`
+ - `30`
+ - `9`
+ - :part:`76%`
+ * - compiler-rt/lib/xray/tests/unit
+ - `10`
+ - `8`
+ - `2`
+ - :part:`80%`
+ * - compiler-rt/tools/gwp_asan
+ - `1`
+ - `1`
+ - `0`
+ - :good:`100%`
+ * - debuginfo-tests/dexter/feature_tests/commands/penalty
+ - `6`
+ - `0`
+ - `6`
+ - :none:`0%`
+ * - debuginfo-tests/dexter/feature_tests/commands/perfect
+ - `5`
+ - `0`
+ - `5`
+ - :none:`0%`
+ * - debuginfo-tests/dexter/feature_tests/commands/perfect/expect_step_kind
+ - `5`
+ - `0`
+ - `5`
+ - :none:`0%`
+ * - debuginfo-tests/dexter/feature_tests/commands/perfect/limit_steps
+ - `5`
+ - `0`
+ - `5`
+ - :none:`0%`
+ * - debuginfo-tests/dexter/feature_tests/subtools
+ - `1`
+ - `0`
+ - `1`
+ - :none:`0%`
+ * - debuginfo-tests/dexter/feature_tests/subtools/clang-opt-bisect
+ - `1`
+ - `0`
+ - `1`
+ - :none:`0%`
+ * - debuginfo-tests/dexter-tests
+ - `8`
+ - `3`
+ - `5`
+ - :part:`37%`
+ * - debuginfo-tests/llgdb-tests
+ - `7`
+ - `0`
+ - `7`
+ - :none:`0%`
+ * - debuginfo-tests/llvm-prettyprinters/gdb
+ - `1`
+ - `1`
+ - `0`
+ - :good:`100%`
+ * - flang/include/flang
+ - `1`
+ - `1`
+ - `0`
+ - :good:`100%`
+ * - flang/include/flang/Common
+ - `19`
+ - `19`
+ - `0`
+ - :good:`100%`
+ * - flang/include/flang/Decimal
+ - `2`
+ - `2`
+ - `0`
+ - :good:`100%`
+ * - flang/include/flang/Evaluate
+ - `23`
+ - `23`
+ - `0`
+ - :good:`100%`
+ * - flang/include/flang/Lower
+ - `13`
+ - `12`
+ - `1`
+ - :part:`92%`
+ * - flang/include/flang/Lower/Support
+ - `1`
+ - `1`
+ - `0`
+ - :good:`100%`
+ * - flang/include/flang/Optimizer/CodeGen
+ - `1`
+ - `1`
+ - `0`
+ - :good:`100%`
+ * - flang/include/flang/Optimizer/Dialect
+ - `5`
+ - `5`
+ - `0`
+ - :good:`100%`
+ * - flang/include/flang/Optimizer/Support
+ - `2`
+ - `2`
+ - `0`
+ - :good:`100%`
+ * - flang/include/flang/Parser
+ - `17`
+ - `17`
+ - `0`
+ - :good:`100%`
+ * - flang/include/flang/Semantics
+ - `8`
+ - `8`
+ - `0`
+ - :good:`100%`
+ * - flang/lib/Common
+ - `4`
+ - `4`
+ - `0`
+ - :good:`100%`
+ * - flang/lib/Decimal
+ - `3`
+ - `3`
+ - `0`
+ - :good:`100%`
+ * - flang/lib/Evaluate
+ - `32`
+ - `32`
+ - `0`
+ - :good:`100%`
+ * - flang/lib/Lower
+ - `10`
+ - `9`
+ - `1`
+ - :part:`90%`
+ * - flang/lib/Optimizer/Dialect
+ - `4`
+ - `4`
+ - `0`
+ - :good:`100%`
+ * - flang/lib/Optimizer/Support
+ - `2`
+ - `2`
+ - `0`
+ - :good:`100%`
+ * - flang/lib/Parser
+ - `34`
+ - `34`
+ - `0`
+ - :good:`100%`
+ * - flang/lib/Semantics
+ - `68`
+ - `65`
+ - `3`
+ - :part:`95%`
+ * - flang/module
+ - `1`
+ - `0`
+ - `1`
+ - :none:`0%`
+ * - flang/runtime
+ - `56`
+ - `56`
+ - `0`
+ - :good:`100%`
+ * - flang/tools/f18
+ - `2`
+ - `2`
+ - `0`
+ - :good:`100%`
+ * - flang/tools/f18-parse-demo
+ - `2`
+ - `2`
+ - `0`
+ - :good:`100%`
+ * - flang/tools/tco
+ - `1`
+ - `1`
+ - `0`
+ - :good:`100%`
+ * - flang/unittests/Decimal
+ - `2`
+ - `2`
+ - `0`
+ - :good:`100%`
+ * - flang/unittests/Evaluate
+ - `15`
+ - `15`
+ - `0`
+ - :good:`100%`
+ * - flang/unittests/Optimizer
+ - `1`
+ - `1`
+ - `0`
+ - :good:`100%`
+ * - flang/unittests/Runtime
+ - `7`
+ - `7`
+ - `0`
+ - :good:`100%`
+ * - libc/AOR_v20.02/math
+ - `4`
+ - `1`
+ - `3`
+ - :part:`25%`
+ * - libc/AOR_v20.02/math/include
+ - `1`
+ - `0`
+ - `1`
+ - :none:`0%`
+ * - libc/AOR_v20.02/networking
+ - `1`
+ - `0`
+ - `1`
+ - :none:`0%`
+ * - libc/AOR_v20.02/networking/include
+ - `1`
+ - `0`
+ - `1`
+ - :none:`0%`
+ * - libc/AOR_v20.02/string
+ - `1`
+ - `0`
+ - `1`
+ - :none:`0%`
+ * - libc/AOR_v20.02/string/include
+ - `1`
+ - `0`
+ - `1`
+ - :none:`0%`
+ * - libc/benchmarks
+ - `14`
+ - `14`
+ - `0`
+ - :good:`100%`
+ * - libc/fuzzing/string
+ - `2`
+ - `1`
+ - `1`
+ - :part:`50%`
+ * - libc/include
+ - `4`
+ - `4`
+ - `0`
+ - :good:`100%`
+ * - libc/loader/linux/x86_64
+ - `1`
+ - `1`
+ - `0`
+ - :good:`100%`
+ * - libc/src/assert
+ - `2`
+ - `0`
+ - `2`
+ - :none:`0%`
+ * - libc/src/errno
+ - `2`
+ - `2`
+ - `0`
+ - :good:`100%`
+ * - libc/src/math
+ - `70`
+ - `70`
+ - `0`
+ - :good:`100%`
+ * - libc/src/signal
+ - `8`
+ - `8`
+ - `0`
+ - :good:`100%`
+ * - libc/src/signal/linux
+ - `10`
+ - `10`
+ - `0`
+ - :good:`100%`
+ * - libc/src/stdio
+ - `3`
+ - `3`
+ - `0`
+ - :good:`100%`
+ * - libc/src/stdlib
+ - `3`
+ - `3`
+ - `0`
+ - :good:`100%`
+ * - libc/src/stdlib/linux
+ - `1`
+ - `1`
+ - `0`
+ - :good:`100%`
+ * - libc/src/string
+ - `14`
+ - `13`
+ - `1`
+ - :part:`92%`
+ * - libc/src/string/memory_utils
+ - `3`
+ - `3`
+ - `0`
+ - :good:`100%`
+ * - libc/src/string/x86
+ - `1`
+ - `1`
+ - `0`
+ - :good:`100%`
+ * - libc/src/sys/mman
+ - `2`
+ - `2`
+ - `0`
+ - :good:`100%`
+ * - libc/src/sys/mman/linux
+ - `2`
+ - `2`
+ - `0`
+ - :good:`100%`
+ * - libc/src/threads
+ - `6`
+ - `6`
+ - `0`
+ - :good:`100%`
+ * - libc/src/threads/linux
+ - `7`
+ - `7`
+ - `0`
+ - :good:`100%`
+ * - libc/src/unistd
+ - `1`
+ - `1`
+ - `0`
+ - :good:`100%`
+ * - libc/src/unistd/linux
+ - `1`
+ - `1`
+ - `0`
+ - :good:`100%`
+ * - libc/utils/CPP
+ - `5`
+ - `5`
+ - `0`
+ - :good:`100%`
+ * - libc/utils/FPUtil
+ - `9`
+ - `9`
+ - `0`
+ - :good:`100%`
+ * - libc/utils/HdrGen
+ - `9`
+ - `9`
+ - `0`
+ - :good:`100%`
+ * - libc/utils/HdrGen/PrototypeTestGen
+ - `1`
+ - `1`
+ - `0`
+ - :good:`100%`
+ * - libc/utils/MPFRWrapper
+ - `3`
+ - `2`
+ - `1`
+ - :part:`66%`
+ * - libc/utils/testutils
+ - `6`
+ - `6`
+ - `0`
+ - :good:`100%`
+ * - libc/utils/UnitTest
+ - `3`
+ - `3`
+ - `0`
+ - :good:`100%`
+ * - libclc/generic/include
+ - `2`
+ - `1`
+ - `1`
+ - :part:`50%`
+ * - libclc/generic/include/clc
+ - `6`
+ - `2`
+ - `4`
+ - :part:`33%`
+ * - libclc/generic/include/clc/async
+ - `4`
+ - `4`
+ - `0`
+ - :good:`100%`
+ * - libclc/generic/include/clc/atomic
+ - `11`
+ - `7`
+ - `4`
+ - :part:`63%`
+ * - libclc/generic/include/clc/cl_khr_global_int32_base_atomics
+ - `6`
+ - `5`
+ - `1`
+ - :part:`83%`
+ * - libclc/generic/include/clc/cl_khr_global_int32_extended_atomics
+ - `5`
+ - `5`
+ - `0`
+ - :good:`100%`
+ * - libclc/generic/include/clc/cl_khr_int64_base_atomics
+ - `6`
+ - `3`
+ - `3`
+ - :part:`50%`
+ * - libclc/generic/include/clc/cl_khr_int64_extended_atomics
+ - `5`
+ - `5`
+ - `0`
+ - :good:`100%`
+ * - libclc/generic/include/clc/cl_khr_local_int32_base_atomics
+ - `6`
+ - `5`
+ - `1`
+ - :part:`83%`
+ * - libclc/generic/include/clc/cl_khr_local_int32_extended_atomics
+ - `5`
+ - `5`
+ - `0`
+ - :good:`100%`
+ * - libclc/generic/include/clc/common
+ - `6`
+ - `6`
+ - `0`
+ - :good:`100%`
+ * - libclc/generic/include/clc/explicit_fence
+ - `1`
+ - `1`
+ - `0`
+ - :good:`100%`
+ * - libclc/generic/include/clc/float
+ - `1`
+ - `0`
+ - `1`
+ - :none:`0%`
+ * - libclc/generic/include/clc/geometric
+ - `8`
+ - `8`
+ - `0`
+ - :good:`100%`
+ * - libclc/generic/include/clc/image
+ - `2`
+ - `0`
+ - `2`
+ - :none:`0%`
+ * - libclc/generic/include/clc/integer
+ - `16`
+ - `13`
+ - `3`
+ - :part:`81%`
+ * - libclc/generic/include/clc/math
+ - `95`
+ - `92`
+ - `3`
+ - :part:`96%`
+ * - libclc/generic/include/clc/misc
+ - `2`
+ - `0`
+ - `2`
+ - :none:`0%`
+ * - libclc/generic/include/clc/relational
+ - `18`
+ - `12`
+ - `6`
+ - :part:`66%`
+ * - libclc/generic/include/clc/shared
+ - `5`
+ - `3`
+ - `2`
+ - :part:`60%`
+ * - libclc/generic/include/clc/synchronization
+ - `2`
+ - `2`
+ - `0`
+ - :good:`100%`
+ * - libclc/generic/include/clc/workitem
+ - `8`
+ - `8`
+ - `0`
+ - :good:`100%`
+ * - libclc/generic/include/integer
+ - `1`
+ - `1`
+ - `0`
+ - :good:`100%`
+ * - libclc/generic/include/math
+ - `15`
+ - `15`
+ - `0`
+ - :good:`100%`
+ * - libclc/generic/lib
+ - `1`
+ - `0`
+ - `1`
+ - :none:`0%`
+ * - libclc/generic/lib/math
+ - `8`
+ - `1`
+ - `7`
+ - :part:`12%`
+ * - libclc/generic/lib/relational
+ - `1`
+ - `0`
+ - `1`
+ - :none:`0%`
+ * - libclc/utils
+ - `1`
+ - `0`
+ - `1`
+ - :none:`0%`
+ * - libcxx/benchmarks
+ - `16`
+ - `1`
+ - `15`
+ - :part:`6%`
+ * - libcxx/fuzzing
+ - `4`
+ - `0`
+ - `4`
+ - :none:`0%`
+ * - libcxx/include
+ - `21`
+ - `0`
+ - `21`
+ - :none:`0%`
+ * - libcxx/include/support/android
+ - `1`
+ - `0`
+ - `1`
+ - :none:`0%`
+ * - libcxx/include/support/fuchsia
+ - `1`
+ - `1`
+ - `0`
+ - :good:`100%`
+ * - libcxx/include/support/ibm
+ - `4`
+ - `1`
+ - `3`
+ - :part:`25%`
+ * - libcxx/include/support/musl
+ - `1`
+ - `0`
+ - `1`
+ - :none:`0%`
+ * - libcxx/include/support/newlib
+ - `1`
+ - `0`
+ - `1`
+ - :none:`0%`
+ * - libcxx/include/support/solaris
+ - `3`
+ - `2`
+ - `1`
+ - :part:`66%`
+ * - libcxx/include/support/win32
+ - `2`
+ - `0`
+ - `2`
+ - :none:`0%`
+ * - libcxx/include/support/xlocale
+ - `3`
+ - `0`
+ - `3`
+ - :none:`0%`
+ * - libcxx/src
+ - `35`
+ - `1`
+ - `34`
+ - :part:`2%`
+ * - libcxx/src/experimental
+ - `1`
+ - `0`
+ - `1`
+ - :none:`0%`
+ * - libcxx/src/filesystem
+ - `4`
+ - `2`
+ - `2`
+ - :part:`50%`
+ * - libcxx/src/include
+ - `4`
+ - `2`
+ - `2`
+ - :part:`50%`
+ * - libcxx/src/support/solaris
+ - `1`
+ - `0`
+ - `1`
+ - :none:`0%`
+ * - libcxx/src/support/win32
+ - `3`
+ - `0`
+ - `3`
+ - :none:`0%`
+ * - libcxx/utils/google-benchmark/cmake
+ - `5`
+ - `1`
+ - `4`
+ - :part:`20%`
+ * - libcxx/utils/google-benchmark/include/benchmark
+ - `1`
+ - `0`
+ - `1`
+ - :none:`0%`
+ * - libcxx/utils/google-benchmark/src
+ - `20`
+ - `16`
+ - `4`
+ - :part:`80%`
+ * - libcxxabi/fuzz
+ - `1`
+ - `0`
+ - `1`
+ - :none:`0%`
+ * - libcxxabi/include
+ - `2`
+ - `0`
+ - `2`
+ - :none:`0%`
+ * - libcxxabi/src
+ - `26`
+ - `1`
+ - `25`
+ - :part:`3%`
+ * - libcxxabi/src/demangle
+ - `4`
+ - `2`
+ - `2`
+ - :part:`50%`
+ * - libcxxabi/src/include
+ - `2`
+ - `0`
+ - `2`
+ - :none:`0%`
+ * - libunwind/include
+ - `3`
+ - `0`
+ - `3`
+ - :none:`0%`
+ * - libunwind/include/mach-o
+ - `1`
+ - `0`
+ - `1`
+ - :none:`0%`
+ * - libunwind/src
+ - `9`
+ - `0`
+ - `9`
+ - :none:`0%`
+ * - lld/COFF
+ - `33`
+ - `10`
+ - `23`
+ - :part:`30%`
+ * - lld/Common
+ - `10`
+ - `9`
+ - `1`
+ - :part:`90%`
+ * - lld/ELF
+ - `48`
+ - `26`
+ - `22`
+ - :part:`54%`
+ * - lld/ELF/Arch
+ - `14`
+ - `7`
+ - `7`
+ - :part:`50%`
+ * - lld/include/lld/Common
+ - `12`
+ - `6`
+ - `6`
+ - :part:`50%`
+ * - lld/include/lld/Core
+ - `20`
+ - `4`
+ - `16`
+ - :part:`20%`
+ * - lld/include/lld/ReaderWriter
+ - `2`
+ - `0`
+ - `2`
+ - :none:`0%`
+ * - lld/lib/Core
+ - `8`
+ - `2`
+ - `6`
+ - :part:`25%`
+ * - lld/lib/Driver
+ - `1`
+ - `0`
+ - `1`
+ - :none:`0%`
+ * - lld/lib/ReaderWriter
+ - `1`
+ - `0`
+ - `1`
+ - :none:`0%`
+ * - lld/lib/ReaderWriter/MachO
+ - `30`
+ - `1`
+ - `29`
+ - :part:`3%`
+ * - lld/lib/ReaderWriter/YAML
+ - `1`
+ - `0`
+ - `1`
+ - :none:`0%`
+ * - lld/MachO
+ - `26`
+ - `26`
+ - `0`
+ - :good:`100%`
+ * - lld/MachO/Arch
+ - `1`
+ - `1`
+ - `0`
+ - :good:`100%`
+ * - lld/MinGW
+ - `1`
+ - `1`
+ - `0`
+ - :good:`100%`
+ * - lld/tools/lld
+ - `1`
+ - `1`
+ - `0`
+ - :good:`100%`
+ * - lld/unittests/DriverTests
+ - `1`
+ - `0`
+ - `1`
+ - :none:`0%`
+ * - lld/unittests/MachOTests
+ - `4`
+ - `0`
+ - `4`
+ - :none:`0%`
+ * - lld/wasm
+ - `27`
+ - `14`
+ - `13`
+ - :part:`51%`
+ * - lldb/examples/darwin/heap_find/heap
+ - `1`
+ - `1`
+ - `0`
+ - :good:`100%`
+ * - lldb/examples/functions
+ - `1`
+ - `0`
+ - `1`
+ - :none:`0%`
+ * - lldb/examples/interposing/darwin/fd_interposing
+ - `1`
+ - `0`
+ - `1`
+ - :none:`0%`
+ * - lldb/examples/lookup
+ - `1`
+ - `0`
+ - `1`
+ - :none:`0%`
+ * - lldb/examples/plugins/commands
+ - `1`
+ - `1`
+ - `0`
+ - :good:`100%`
+ * - lldb/examples/synthetic/bitfield
+ - `1`
+ - `1`
+ - `0`
+ - :good:`100%`
+ * - lldb/include/lldb
+ - `12`
+ - `7`
+ - `5`
+ - :part:`58%`
+ * - lldb/include/lldb/API
+ - `71`
+ - `59`
+ - `12`
+ - :part:`83%`
+ * - lldb/include/lldb/Breakpoint
+ - `24`
+ - `10`
+ - `14`
+ - :part:`41%`
+ * - lldb/include/lldb/Core
+ - `57`
+ - `31`
+ - `26`
+ - :part:`54%`
+ * - lldb/include/lldb/DataFormatters
+ - `18`
+ - `9`
+ - `9`
+ - :part:`50%`
+ * - lldb/include/lldb/Expression
+ - `17`
+ - `6`
+ - `11`
+ - :part:`35%`
+ * - lldb/include/lldb/Host
+ - `40`
+ - `20`
+ - `20`
+ - :part:`50%`
+ * - lldb/include/lldb/Host/android
+ - `1`
+ - `1`
+ - `0`
+ - :good:`100%`
+ * - lldb/include/lldb/Host/common
+ - `8`
+ - `2`
+ - `6`
+ - :part:`25%`
+ * - lldb/include/lldb/Host/freebsd
+ - `1`
+ - `0`
+ - `1`
+ - :none:`0%`
+ * - lldb/include/lldb/Host/linux
+ - `5`
+ - `3`
+ - `2`
+ - :part:`60%`
+ * - lldb/include/lldb/Host/macosx
+ - `2`
+ - `0`
+ - `2`
+ - :none:`0%`
+ * - lldb/include/lldb/Host/netbsd
+ - `1`
+ - `0`
+ - `1`
+ - :none:`0%`
+ * - lldb/include/lldb/Host/openbsd
+ - `1`
+ - `0`
+ - `1`
+ - :none:`0%`
+ * - lldb/include/lldb/Host/posix
+ - `9`
+ - `7`
+ - `2`
+ - :part:`77%`
+ * - lldb/include/lldb/Host/windows
+ - `11`
+ - `5`
+ - `6`
+ - :part:`45%`
+ * - lldb/include/lldb/Initialization
+ - `3`
+ - `1`
+ - `2`
+ - :part:`33%`
+ * - lldb/include/lldb/Interpreter
+ - `47`
+ - `38`
+ - `9`
+ - :part:`80%`
+ * - lldb/include/lldb/Symbol
+ - `36`
+ - `16`
+ - `20`
+ - :part:`44%`
+ * - lldb/include/lldb/Target
+ - `66`
+ - `37`
+ - `29`
+ - :part:`56%`
+ * - lldb/include/lldb/Utility
+ - `58`
+ - `36`
+ - `22`
+ - :part:`62%`
+ * - lldb/source
+ - `1`
+ - `1`
+ - `0`
+ - :good:`100%`
+ * - lldb/source/API
+ - `75`
+ - `8`
+ - `67`
+ - :part:`10%`
+ * - lldb/source/Breakpoint
+ - `24`
+ - `6`
+ - `18`
+ - :part:`25%`
+ * - lldb/source/Commands
+ - `56`
+ - `48`
+ - `8`
+ - :part:`85%`
+ * - lldb/source/Core
+ - `45`
+ - `24`
+ - `21`
+ - :part:`53%`
+ * - lldb/source/DataFormatters
+ - `16`
+ - `3`
+ - `13`
+ - :part:`18%`
+ * - lldb/source/Expression
+ - `13`
+ - `4`
+ - `9`
+ - :part:`30%`
+ * - lldb/source/Host/android
+ - `2`
+ - `2`
+ - `0`
+ - :good:`100%`
+ * - lldb/source/Host/common
+ - `32`
+ - `17`
+ - `15`
+ - :part:`53%`
+ * - lldb/source/Host/freebsd
+ - `2`
+ - `2`
+ - `0`
+ - :good:`100%`
+ * - lldb/source/Host/linux
+ - `5`
+ - `3`
+ - `2`
+ - :part:`60%`
+ * - lldb/source/Host/macosx/cfcpp
+ - `14`
+ - `12`
+ - `2`
+ - :part:`85%`
+ * - lldb/source/Host/netbsd
+ - `2`
+ - `0`
+ - `2`
+ - :none:`0%`
+ * - lldb/source/Host/openbsd
+ - `2`
+ - `1`
+ - `1`
+ - :part:`50%`
+ * - lldb/source/Host/posix
+ - `9`
+ - `5`
+ - `4`
+ - :part:`55%`
+ * - lldb/source/Host/windows
+ - `12`
+ - `5`
+ - `7`
+ - :part:`41%`
+ * - lldb/source/Initialization
+ - `3`
+ - `3`
+ - `0`
+ - :good:`100%`
+ * - lldb/source/Interpreter
+ - `46`
+ - `25`
+ - `21`
+ - :part:`54%`
+ * - lldb/source/Plugins/ABI/AArch64
+ - `6`
+ - `2`
+ - `4`
+ - :part:`33%`
+ * - lldb/source/Plugins/ABI/ARC
+ - `2`
+ - `0`
+ - `2`
+ - :none:`0%`
+ * - lldb/source/Plugins/ABI/ARM
+ - `6`
+ - `4`
+ - `2`
+ - :part:`66%`
+ * - lldb/source/Plugins/ABI/Hexagon
+ - `2`
+ - `0`
+ - `2`
+ - :none:`0%`
+ * - lldb/source/Plugins/ABI/Mips
+ - `6`
+ - `2`
+ - `4`
+ - :part:`33%`
+ * - lldb/source/Plugins/ABI/PowerPC
+ - `6`
+ - `3`
+ - `3`
+ - :part:`50%`
+ * - lldb/source/Plugins/ABI/SystemZ
+ - `2`
+ - `0`
+ - `2`
+ - :none:`0%`
+ * - lldb/source/Plugins/ABI/X86
+ - `11`
+ - `4`
+ - `7`
+ - :part:`36%`
+ * - lldb/source/Plugins/Architecture/Arm
+ - `2`
+ - `1`
+ - `1`
+ - :part:`50%`
+ * - lldb/source/Plugins/Architecture/Mips
+ - `2`
+ - `0`
+ - `2`
+ - :none:`0%`
+ * - lldb/source/Plugins/Architecture/PPC64
+ - `2`
+ - `2`
+ - `0`
+ - :good:`100%`
+ * - lldb/source/Plugins/Disassembler/LLVMC
+ - `2`
+ - `1`
+ - `1`
+ - :part:`50%`
+ * - lldb/source/Plugins/DynamicLoader/Darwin-Kernel
+ - `2`
+ - `0`
+ - `2`
+ - :none:`0%`
+ * - lldb/source/Plugins/DynamicLoader/Hexagon-DYLD
+ - `4`
+ - `4`
+ - `0`
+ - :good:`100%`
+ * - lldb/source/Plugins/DynamicLoader/MacOSX-DYLD
+ - `6`
+ - `3`
+ - `3`
+ - :part:`50%`
+ * - lldb/source/Plugins/DynamicLoader/POSIX-DYLD
+ - `4`
+ - `2`
+ - `2`
+ - :part:`50%`
+ * - lldb/source/Plugins/DynamicLoader/Static
+ - `2`
+ - `1`
+ - `1`
+ - :part:`50%`
+ * - lldb/source/Plugins/DynamicLoader/wasm-DYLD
+ - `2`
+ - `2`
+ - `0`
+ - :good:`100%`
+ * - lldb/source/Plugins/DynamicLoader/Windows-DYLD
+ - `2`
+ - `1`
+ - `1`
+ - :part:`50%`
+ * - lldb/source/Plugins/ExpressionParser/Clang
+ - `51`
+ - `25`
+ - `26`
+ - :part:`49%`
+ * - lldb/source/Plugins/Instruction/ARM
+ - `4`
+ - `2`
+ - `2`
+ - :part:`50%`
+ * - lldb/source/Plugins/Instruction/ARM64
+ - `2`
+ - `0`
+ - `2`
+ - :none:`0%`
+ * - lldb/source/Plugins/Instruction/MIPS
+ - `2`
+ - `0`
+ - `2`
+ - :none:`0%`
+ * - lldb/source/Plugins/Instruction/MIPS64
+ - `2`
+ - `1`
+ - `1`
+ - :part:`50%`
+ * - lldb/source/Plugins/Instruction/PPC64
+ - `2`
+ - `2`
+ - `0`
+ - :good:`100%`
+ * - lldb/source/Plugins/InstrumentationRuntime/ASan
+ - `2`
+ - `2`
+ - `0`
+ - :good:`100%`
+ * - lldb/source/Plugins/InstrumentationRuntime/MainThreadChecker
+ - `2`
+ - `2`
+ - `0`
+ - :good:`100%`
+ * - lldb/source/Plugins/InstrumentationRuntime/TSan
+ - `2`
+ - `2`
+ - `0`
+ - :good:`100%`
+ * - lldb/source/Plugins/InstrumentationRuntime/UBSan
+ - `2`
+ - `2`
+ - `0`
+ - :good:`100%`
+ * - lldb/source/Plugins/JITLoader/GDB
+ - `2`
+ - `1`
+ - `1`
+ - :part:`50%`
+ * - lldb/source/Plugins/Language/ClangCommon
+ - `2`
+ - `2`
+ - `0`
+ - :good:`100%`
+ * - lldb/source/Plugins/Language/CPlusPlus
+ - `29`
+ - `17`
+ - `12`
+ - :part:`58%`
+ * - lldb/source/Plugins/Language/ObjC
+ - `20`
+ - `13`
+ - `7`
+ - :part:`65%`
+ * - lldb/source/Plugins/Language/ObjCPlusPlus
+ - `2`
+ - `2`
+ - `0`
+ - :good:`100%`
+ * - lldb/source/Plugins/LanguageRuntime/CPlusPlus
+ - `2`
+ - `0`
+ - `2`
+ - :none:`0%`
+ * - lldb/source/Plugins/LanguageRuntime/CPlusPlus/ItaniumABI
+ - `2`
+ - `0`
+ - `2`
+ - :none:`0%`
+ * - lldb/source/Plugins/LanguageRuntime/ObjC
+ - `2`
+ - `1`
+ - `1`
+ - :part:`50%`
+ * - lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime
+ - `16`
+ - `4`
+ - `12`
+ - :part:`25%`
+ * - lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime
+ - `8`
+ - `3`
+ - `5`
+ - :part:`37%`
+ * - lldb/source/Plugins/MemoryHistory/asan
+ - `2`
+ - `2`
+ - `0`
+ - :good:`100%`
+ * - lldb/source/Plugins/ObjectContainer/BSD-Archive
+ - `2`
+ - `0`
+ - `2`
+ - :none:`0%`
+ * - lldb/source/Plugins/ObjectContainer/Universal-Mach-O
+ - `2`
+ - `2`
+ - `0`
+ - :good:`100%`
+ * - lldb/source/Plugins/ObjectFile/Breakpad
+ - `4`
+ - `3`
+ - `1`
+ - :part:`75%`
+ * - lldb/source/Plugins/ObjectFile/ELF
+ - `4`
+ - `1`
+ - `3`
+ - :part:`25%`
+ * - lldb/source/Plugins/ObjectFile/JIT
+ - `2`
+ - `0`
+ - `2`
+ - :none:`0%`
+ * - lldb/source/Plugins/ObjectFile/Mach-O
+ - `2`
+ - `0`
+ - `2`
+ - :none:`0%`
+ * - lldb/source/Plugins/ObjectFile/PECOFF
+ - `6`
+ - `3`
+ - `3`
+ - :part:`50%`
+ * - lldb/source/Plugins/ObjectFile/wasm
+ - `2`
+ - `2`
+ - `0`
+ - :good:`100%`
+ * - lldb/source/Plugins/OperatingSystem/Python
+ - `2`
+ - `2`
+ - `0`
+ - :good:`100%`
+ * - lldb/source/Plugins/Platform/Android
+ - `6`
+ - `3`
+ - `3`
+ - :part:`50%`
+ * - lldb/source/Plugins/Platform/FreeBSD
+ - `2`
+ - `1`
+ - `1`
+ - :part:`50%`
+ * - lldb/source/Plugins/Platform/gdb-server
+ - `2`
+ - `2`
+ - `0`
+ - :good:`100%`
+ * - lldb/source/Plugins/Platform/Linux
+ - `2`
+ - `1`
+ - `1`
+ - :part:`50%`
+ * - lldb/source/Plugins/Platform/MacOSX
+ - `24`
+ - `10`
+ - `14`
+ - :part:`41%`
+ * - lldb/source/Plugins/Platform/MacOSX/objcxx
+ - `1`
+ - `1`
+ - `0`
+ - :good:`100%`
+ * - lldb/source/Plugins/Platform/NetBSD
+ - `2`
+ - `1`
+ - `1`
+ - :part:`50%`
+ * - lldb/source/Plugins/Platform/OpenBSD
+ - `2`
+ - `1`
+ - `1`
+ - :part:`50%`
+ * - lldb/source/Plugins/Platform/POSIX
+ - `2`
+ - `0`
+ - `2`
+ - :none:`0%`
+ * - lldb/source/Plugins/Platform/Windows
+ - `2`
+ - `2`
+ - `0`
+ - :good:`100%`
+ * - lldb/source/Plugins/Process/elf-core
+ - `20`
+ - `18`
+ - `2`
+ - :part:`90%`
+ * - lldb/source/Plugins/Process/FreeBSD
+ - `19`
+ - `11`
+ - `8`
+ - :part:`57%`
+ * - lldb/source/Plugins/Process/gdb-remote
+ - `26`
+ - `16`
+ - `10`
+ - :part:`61%`
+ * - lldb/source/Plugins/Process/Linux
+ - `24`
+ - `12`
+ - `12`
+ - :part:`50%`
+ * - lldb/source/Plugins/Process/mach-core
+ - `4`
+ - `3`
+ - `1`
+ - :part:`75%`
+ * - lldb/source/Plugins/Process/MacOSX-Kernel
+ - `16`
+ - `13`
+ - `3`
+ - :part:`81%`
+ * - lldb/source/Plugins/Process/minidump
+ - `17`
+ - `10`
+ - `7`
+ - :part:`58%`
+ * - lldb/source/Plugins/Process/NetBSD
+ - `8`
+ - `3`
+ - `5`
+ - :part:`37%`
+ * - lldb/source/Plugins/Process/POSIX
+ - `8`
+ - `5`
+ - `3`
+ - :part:`62%`
+ * - lldb/source/Plugins/Process/Utility
+ - `127`
+ - `86`
+ - `41`
+ - :part:`67%`
+ * - lldb/source/Plugins/Process/Windows/Common
+ - `34`
+ - `24`
+ - `10`
+ - :part:`70%`
+ * - lldb/source/Plugins/Process/Windows/Common/arm
+ - `2`
+ - `1`
+ - `1`
+ - :part:`50%`
+ * - lldb/source/Plugins/Process/Windows/Common/arm64
+ - `2`
+ - `1`
+ - `1`
+ - :part:`50%`
+ * - lldb/source/Plugins/Process/Windows/Common/x64
+ - `2`
+ - `0`
+ - `2`
+ - :none:`0%`
+ * - lldb/source/Plugins/Process/Windows/Common/x86
+ - `2`
+ - `0`
+ - `2`
+ - :none:`0%`
+ * - lldb/source/Plugins/ScriptInterpreter/Lua
+ - `4`
+ - `4`
+ - `0`
+ - :good:`100%`
+ * - lldb/source/Plugins/ScriptInterpreter/None
+ - `2`
+ - `2`
+ - `0`
+ - :good:`100%`
+ * - lldb/source/Plugins/ScriptInterpreter/Python
+ - `8`
+ - `3`
+ - `5`
+ - :part:`37%`
+ * - lldb/source/Plugins/StructuredData/DarwinLog
+ - `2`
+ - `0`
+ - `2`
+ - :none:`0%`
+ * - lldb/source/Plugins/SymbolFile/Breakpad
+ - `2`
+ - `0`
+ - `2`
+ - :none:`0%`
+ * - lldb/source/Plugins/SymbolFile/DWARF
+ - `65`
+ - `35`
+ - `30`
+ - :part:`53%`
+ * - lldb/source/Plugins/SymbolFile/NativePDB
+ - `20`
+ - `11`
+ - `9`
+ - :part:`55%`
+ * - lldb/source/Plugins/SymbolFile/PDB
+ - `6`
+ - `4`
+ - `2`
+ - :part:`66%`
+ * - lldb/source/Plugins/SymbolFile/Symtab
+ - `2`
+ - `2`
+ - `0`
+ - :good:`100%`
+ * - lldb/source/Plugins/SymbolVendor/ELF
+ - `2`
+ - `2`
+ - `0`
+ - :good:`100%`
+ * - lldb/source/Plugins/SymbolVendor/MacOSX
+ - `2`
+ - `2`
+ - `0`
+ - :good:`100%`
+ * - lldb/source/Plugins/SymbolVendor/wasm
+ - `2`
+ - `2`
+ - `0`
+ - :good:`100%`
+ * - lldb/source/Plugins/SystemRuntime/MacOSX
+ - `10`
+ - `1`
+ - `9`
+ - :part:`10%`
+ * - lldb/source/Plugins/TypeSystem/Clang
+ - `2`
+ - `0`
+ - `2`
+ - :none:`0%`
+ * - lldb/source/Plugins/UnwindAssembly/InstEmulation
+ - `2`
+ - `1`
+ - `1`
+ - :part:`50%`
+ * - lldb/source/Plugins/UnwindAssembly/x86
+ - `4`
+ - `2`
+ - `2`
+ - :part:`50%`
+ * - lldb/source/Symbol
+ - `32`
+ - `18`
+ - `14`
+ - :part:`56%`
+ * - lldb/source/Target
+ - `61`
+ - `28`
+ - `33`
+ - :part:`45%`
+ * - lldb/source/Utility
+ - `54`
+ - `41`
+ - `13`
+ - :part:`75%`
+ * - lldb/tools/argdumper
+ - `1`
+ - `1`
+ - `0`
+ - :good:`100%`
+ * - lldb/tools/darwin-debug
+ - `1`
+ - `1`
+ - `0`
+ - :good:`100%`
+ * - lldb/tools/debugserver/source
+ - `49`
+ - `38`
+ - `11`
+ - :part:`77%`
+ * - lldb/tools/debugserver/source/MacOSX
+ - `24`
+ - `16`
+ - `8`
+ - :part:`66%`
+ * - lldb/tools/debugserver/source/MacOSX/arm
+ - `2`
+ - `1`
+ - `1`
+ - :part:`50%`
+ * - lldb/tools/debugserver/source/MacOSX/arm64
+ - `2`
+ - `1`
+ - `1`
+ - :part:`50%`
+ * - lldb/tools/debugserver/source/MacOSX/DarwinLog
+ - `20`
+ - `18`
+ - `2`
+ - :part:`90%`
+ * - lldb/tools/debugserver/source/MacOSX/i386
+ - `3`
+ - `1`
+ - `2`
+ - :part:`33%`
+ * - lldb/tools/debugserver/source/MacOSX/x86_64
+ - `3`
+ - `1`
+ - `2`
+ - :part:`33%`
+ * - lldb/tools/driver
+ - `4`
+ - `4`
+ - `0`
+ - :good:`100%`
+ * - lldb/tools/intel-features
+ - `1`
+ - `1`
+ - `0`
+ - :good:`100%`
+ * - lldb/tools/intel-features/intel-mpx
+ - `2`
+ - `2`
+ - `0`
+ - :good:`100%`
+ * - lldb/tools/intel-features/intel-pt
+ - `6`
+ - `6`
+ - `0`
+ - :good:`100%`
+ * - lldb/tools/lldb-instr
+ - `1`
+ - `1`
+ - `0`
+ - :good:`100%`
+ * - lldb/tools/lldb-server
+ - `9`
+ - `4`
+ - `5`
+ - :part:`44%`
+ * - lldb/tools/lldb-test
+ - `5`
+ - `3`
+ - `2`
+ - :part:`60%`
+ * - lldb/tools/lldb-vscode
+ - `19`
+ - `12`
+ - `7`
+ - :part:`63%`
+ * - lldb/unittests
+ - `1`
+ - `1`
+ - `0`
+ - :good:`100%`
+ * - lldb/unittests/API
+ - `1`
+ - `1`
+ - `0`
+ - :good:`100%`
+ * - lldb/unittests/Breakpoint
+ - `1`
+ - `1`
+ - `0`
+ - :good:`100%`
+ * - lldb/unittests/Core
+ - `6`
+ - `5`
+ - `1`
+ - :part:`83%`
+ * - lldb/unittests/DataFormatter
+ - `2`
+ - `2`
+ - `0`
+ - :good:`100%`
+ * - lldb/unittests/debugserver
+ - `3`
+ - `2`
+ - `1`
+ - :part:`66%`
+ * - lldb/unittests/Disassembler
+ - `2`
+ - `0`
+ - `2`
+ - :none:`0%`
+ * - lldb/unittests/Editline
+ - `1`
+ - `1`
+ - `0`
+ - :good:`100%`
+ * - lldb/unittests/Expression
+ - `5`
+ - `3`
+ - `2`
+ - :part:`60%`
+ * - lldb/unittests/Host
+ - `13`
+ - `10`
+ - `3`
+ - :part:`76%`
+ * - lldb/unittests/Host/linux
+ - `2`
+ - `2`
+ - `0`
+ - :good:`100%`
+ * - lldb/unittests/Instruction
+ - `1`
+ - `0`
+ - `1`
+ - :none:`0%`
+ * - lldb/unittests/Interpreter
+ - `2`
+ - `0`
+ - `2`
+ - :none:`0%`
+ * - lldb/unittests/Language/CLanguages
+ - `1`
+ - `1`
+ - `0`
+ - :good:`100%`
+ * - lldb/unittests/Language/CPlusPlus
+ - `1`
+ - `0`
+ - `1`
+ - :none:`0%`
+ * - lldb/unittests/Language/Highlighting
+ - `1`
+ - `1`
+ - `0`
+ - :good:`100%`
+ * - lldb/unittests/ObjectFile/Breakpad
+ - `1`
+ - `1`
+ - `0`
+ - :good:`100%`
+ * - lldb/unittests/ObjectFile/ELF
+ - `1`
+ - `0`
+ - `1`
+ - :none:`0%`
+ * - lldb/unittests/ObjectFile/PECOFF
+ - `1`
+ - `0`
+ - `1`
+ - :none:`0%`
+ * - lldb/unittests/Platform
+ - `1`
+ - `1`
+ - `0`
+ - :good:`100%`
+ * - lldb/unittests/Platform/Android
+ - `1`
+ - `0`
+ - `1`
+ - :none:`0%`
+ * - lldb/unittests/Process
+ - `1`
+ - `1`
+ - `0`
+ - :good:`100%`
+ * - lldb/unittests/Process/gdb-remote
+ - `6`
+ - `5`
+ - `1`
+ - :part:`83%`
+ * - lldb/unittests/Process/Linux
+ - `1`
+ - `0`
+ - `1`
+ - :none:`0%`
+ * - lldb/unittests/Process/minidump
+ - `2`
+ - `0`
+ - `2`
+ - :none:`0%`
+ * - lldb/unittests/Process/minidump/Inputs
+ - `1`
+ - `1`
+ - `0`
+ - :good:`100%`
+ * - lldb/unittests/Process/POSIX
+ - `1`
+ - `1`
+ - `0`
+ - :good:`100%`
+ * - lldb/unittests/ScriptInterpreter/Lua
+ - `2`
+ - `2`
+ - `0`
+ - :good:`100%`
+ * - lldb/unittests/ScriptInterpreter/Python
+ - `3`
+ - `1`
+ - `2`
+ - :part:`33%`
+ * - lldb/unittests/Signals
+ - `1`
+ - `1`
+ - `0`
+ - :good:`100%`
+ * - lldb/unittests/Symbol
+ - `7`
+ - `4`
+ - `3`
+ - :part:`57%`
+ * - lldb/unittests/SymbolFile/DWARF
+ - `3`
+ - `0`
+ - `3`
+ - :none:`0%`
+ * - lldb/unittests/SymbolFile/DWARF/Inputs
+ - `1`
+ - `1`
+ - `0`
+ - :good:`100%`
+ * - lldb/unittests/SymbolFile/NativePDB
+ - `1`
+ - `1`
+ - `0`
+ - :good:`100%`
+ * - lldb/unittests/SymbolFile/PDB
+ - `1`
+ - `0`
+ - `1`
+ - :none:`0%`
+ * - lldb/unittests/SymbolFile/PDB/Inputs
+ - `5`
+ - `5`
+ - `0`
+ - :good:`100%`
+ * - lldb/unittests/Target
+ - `7`
+ - `3`
+ - `4`
+ - :part:`42%`
+ * - lldb/unittests/TestingSupport
+ - `5`
+ - `4`
+ - `1`
+ - :part:`80%`
+ * - lldb/unittests/TestingSupport/Host
+ - `1`
+ - `1`
+ - `0`
+ - :good:`100%`
+ * - lldb/unittests/TestingSupport/Symbol
+ - `3`
+ - `3`
+ - `0`
+ - :good:`100%`
+ * - lldb/unittests/Thread
+ - `1`
+ - `1`
+ - `0`
+ - :good:`100%`
+ * - lldb/unittests/tools/lldb-server/inferior
+ - `2`
+ - `0`
+ - `2`
+ - :none:`0%`
+ * - lldb/unittests/tools/lldb-server/tests
+ - `8`
+ - `1`
+ - `7`
+ - :part:`12%`
+ * - lldb/unittests/UnwindAssembly/ARM64
+ - `1`
+ - `0`
+ - `1`
+ - :none:`0%`
+ * - lldb/unittests/UnwindAssembly/PPC64
+ - `1`
+ - `1`
+ - `0`
+ - :good:`100%`
+ * - lldb/unittests/UnwindAssembly/x86
+ - `1`
+ - `0`
+ - `1`
+ - :none:`0%`
+ * - lldb/unittests/Utility
+ - `44`
+ - `32`
+ - `12`
+ - :part:`72%`
+ * - lldb/utils/lit-cpuid
+ - `1`
+ - `0`
+ - `1`
+ - :none:`0%`
+ * - lldb/utils/TableGen
+ - `6`
+ - `6`
+ - `0`
+ - :good:`100%`
+ * - llvm/benchmarks
+ - `1`
+ - `0`
+ - `1`
+ - :none:`0%`
+ * - llvm/bindings/go/llvm
+ - `6`
+ - `3`
+ - `3`
+ - :part:`50%`
+ * - llvm/cmake
+ - `1`
+ - `1`
+ - `0`
+ - :good:`100%`
+ * - llvm/examples/BrainF
+ - `3`
+ - `0`
+ - `3`
+ - :none:`0%`
+ * - llvm/examples/Bye
+ - `1`
+ - `1`
+ - `0`
+ - :good:`100%`
+ * - llvm/examples/ExceptionDemo
+ - `1`
+ - `0`
+ - `1`
+ - :none:`0%`
+ * - llvm/examples/Fibonacci
+ - `1`
+ - `0`
+ - `1`
+ - :none:`0%`
+ * - llvm/examples/HowToUseJIT
+ - `1`
+ - `0`
+ - `1`
+ - :none:`0%`
+ * - llvm/examples/HowToUseLLJIT
+ - `1`
+ - `1`
+ - `0`
+ - :good:`100%`
+ * - llvm/examples/IRTransforms
+ - `4`
+ - `4`
+ - `0`
+ - :good:`100%`
+ * - llvm/examples/Kaleidoscope/BuildingAJIT/Chapter1
+ - `2`
+ - `1`
+ - `1`
+ - :part:`50%`
+ * - llvm/examples/Kaleidoscope/BuildingAJIT/Chapter2
+ - `2`
+ - `1`
+ - `1`
+ - :part:`50%`
+ * - llvm/examples/Kaleidoscope/BuildingAJIT/Chapter3
+ - `2`
+ - `0`
+ - `2`
+ - :none:`0%`
+ * - llvm/examples/Kaleidoscope/BuildingAJIT/Chapter4
+ - `2`
+ - `0`
+ - `2`
+ - :none:`0%`
+ * - llvm/examples/Kaleidoscope/BuildingAJIT/Chapter5
+ - `3`
+ - `0`
+ - `3`
+ - :none:`0%`
+ * - llvm/examples/Kaleidoscope/BuildingAJIT/Chapter5/Server
+ - `1`
+ - `0`
+ - `1`
+ - :none:`0%`
+ * - llvm/examples/Kaleidoscope/Chapter2
+ - `1`
+ - `0`
+ - `1`
+ - :none:`0%`
+ * - llvm/examples/Kaleidoscope/Chapter3
+ - `1`
+ - `0`
+ - `1`
+ - :none:`0%`
+ * - llvm/examples/Kaleidoscope/Chapter4
+ - `1`
+ - `0`
+ - `1`
+ - :none:`0%`
+ * - llvm/examples/Kaleidoscope/Chapter5
+ - `1`
+ - `0`
+ - `1`
+ - :none:`0%`
+ * - llvm/examples/Kaleidoscope/Chapter6
+ - `1`
+ - `0`
+ - `1`
+ - :none:`0%`
+ * - llvm/examples/Kaleidoscope/Chapter7
+ - `1`
+ - `0`
+ - `1`
+ - :none:`0%`
+ * - llvm/examples/Kaleidoscope/Chapter8
+ - `1`
+ - `0`
+ - `1`
+ - :none:`0%`
+ * - llvm/examples/Kaleidoscope/Chapter9
+ - `1`
+ - `0`
+ - `1`
+ - :none:`0%`
+ * - llvm/examples/Kaleidoscope/include
+ - `1`
+ - `1`
+ - `0`
+ - :good:`100%`
+ * - llvm/examples/Kaleidoscope/MCJIT/cached
+ - `2`
+ - `0`
+ - `2`
+ - :none:`0%`
+ * - llvm/examples/Kaleidoscope/MCJIT/complete
+ - `1`
+ - `0`
+ - `1`
+ - :none:`0%`
+ * - llvm/examples/Kaleidoscope/MCJIT/initial
+ - `1`
+ - `0`
+ - `1`
+ - :none:`0%`
+ * - llvm/examples/Kaleidoscope/MCJIT/lazy
+ - `2`
+ - `0`
+ - `2`
+ - :none:`0%`
+ * - llvm/examples/ModuleMaker
+ - `1`
+ - `0`
+ - `1`
+ - :none:`0%`
+ * - llvm/examples/OrcV2Examples
+ - `1`
+ - `1`
+ - `0`
+ - :good:`100%`
+ * - llvm/examples/OrcV2Examples/LLJITDumpObjects
+ - `1`
+ - `1`
+ - `0`
+ - :good:`100%`
+ * - llvm/examples/OrcV2Examples/LLJITWithCustomObjectLinkingLayer
+ - `1`
+ - `1`
+ - `0`
+ - :good:`100%`
+ * - llvm/examples/OrcV2Examples/LLJITWithGDBRegistrationListener
+ - `1`
+ - `1`
+ - `0`
+ - :good:`100%`
+ * - llvm/examples/OrcV2Examples/LLJITWithInitializers
+ - `1`
+ - `1`
+ - `0`
+ - :good:`100%`
+ * - llvm/examples/OrcV2Examples/LLJITWithLazyReexports
+ - `1`
+ - `1`
+ - `0`
+ - :good:`100%`
+ * - llvm/examples/OrcV2Examples/LLJITWithObjectCache
+ - `1`
+ - `1`
+ - `0`
+ - :good:`100%`
+ * - llvm/examples/OrcV2Examples/LLJITWithObjectLinkingLayerPlugin
+ - `1`
+ - `1`
+ - `0`
+ - :good:`100%`
+ * - llvm/examples/ParallelJIT
+ - `1`
+ - `0`
+ - `1`
+ - :none:`0%`
+ * - llvm/examples/SpeculativeJIT
+ - `1`
+ - `0`
+ - `1`
+ - :none:`0%`
+ * - llvm/examples/ThinLtoJIT
+ - `9`
+ - `8`
+ - `1`
+ - :part:`88%`
+ * - llvm/include/llvm
+ - `8`
+ - `2`
+ - `6`
+ - :part:`25%`
+ * - llvm/include/llvm/ADT
+ - `84`
+ - `24`
+ - `60`
+ - :part:`28%`
+ * - llvm/include/llvm/Analysis
+ - `113`
+ - `34`
+ - `79`
+ - :part:`30%`
+ * - llvm/include/llvm/Analysis/Utils
+ - `1`
+ - `0`
+ - `1`
+ - :none:`0%`
+ * - llvm/include/llvm/AsmParser
+ - `2`
+ - `1`
+ - `1`
+ - :part:`50%`
+ * - llvm/include/llvm/BinaryFormat
+ - `13`
+ - `9`
+ - `4`
+ - :part:`69%`
+ * - llvm/include/llvm/Bitcode
+ - `5`
+ - `1`
+ - `4`
+ - :part:`20%`
+ * - llvm/include/llvm/Bitstream
+ - `3`
+ - `0`
+ - `3`
+ - :none:`0%`
+ * - llvm/include/llvm/CodeGen
+ - `141`
+ - `32`
+ - `109`
+ - :part:`22%`
+ * - llvm/include/llvm/CodeGen/GlobalISel
+ - `27`
+ - `10`
+ - `17`
+ - :part:`37%`
+ * - llvm/include/llvm/CodeGen/MIRParser
+ - `2`
+ - `1`
+ - `1`
+ - :part:`50%`
+ * - llvm/include/llvm/CodeGen/PBQP
+ - `5`
+ - `1`
+ - `4`
+ - :part:`20%`
+ * - llvm/include/llvm/DebugInfo
+ - `1`
+ - `0`
+ - `1`
+ - :none:`0%`
+ * - llvm/include/llvm/DebugInfo/CodeView
+ - `57`
+ - `40`
+ - `17`
+ - :part:`70%`
+ * - llvm/include/llvm/DebugInfo/DWARF
+ - `32`
+ - `17`
+ - `15`
+ - :part:`53%`
+ * - llvm/include/llvm/DebugInfo/GSYM
+ - `14`
+ - `2`
+ - `12`
+ - :part:`14%`
+ * - llvm/include/llvm/DebugInfo/MSF
+ - `5`
+ - `4`
+ - `1`
+ - :part:`80%`
+ * - llvm/include/llvm/DebugInfo/PDB
+ - `50`
+ - `7`
+ - `43`
+ - :part:`14%`
+ * - llvm/include/llvm/DebugInfo/PDB/DIA
+ - `20`
+ - `9`
+ - `11`
+ - :part:`45%`
+ * - llvm/include/llvm/DebugInfo/PDB/Native
+ - `52`
+ - `34`
+ - `18`
+ - :part:`65%`
+ * - llvm/include/llvm/DebugInfo/Symbolize
+ - `3`
+ - `0`
+ - `3`
+ - :none:`0%`
+ * - llvm/include/llvm/Demangle
+ - `7`
+ - `3`
+ - `4`
+ - :part:`42%`
+ * - llvm/include/llvm/DWARFLinker
+ - `4`
+ - `4`
+ - `0`
+ - :good:`100%`
+ * - llvm/include/llvm/ExecutionEngine
+ - `14`
+ - `3`
+ - `11`
+ - :part:`21%`
+ * - llvm/include/llvm/ExecutionEngine/JITLink
+ - `8`
+ - `5`
+ - `3`
+ - :part:`62%`
+ * - llvm/include/llvm/ExecutionEngine/Orc
+ - `32`
+ - `11`
+ - `21`
+ - :part:`34%`
+ * - llvm/include/llvm/ExecutionEngine/Orc/RPC
+ - `3`
+ - `0`
+ - `3`
+ - :none:`0%`
+ * - llvm/include/llvm/Frontend/OpenMP
+ - `4`
+ - `4`
+ - `0`
+ - :good:`100%`
+ * - llvm/include/llvm/FuzzMutate
+ - `6`
+ - `0`
+ - `6`
+ - :none:`0%`
+ * - llvm/include/llvm/IR
+ - `84`
+ - `15`
+ - `69`
+ - :part:`17%`
+ * - llvm/include/llvm/IRReader
+ - `1`
+ - `0`
+ - `1`
+ - :none:`0%`
+ * - llvm/include/llvm/LineEditor
+ - `1`
+ - `0`
+ - `1`
+ - :none:`0%`
+ * - llvm/include/llvm/Linker
+ - `2`
+ - `0`
+ - `2`
+ - :none:`0%`
+ * - llvm/include/llvm/LTO
+ - `5`
+ - `2`
+ - `3`
+ - :part:`40%`
+ * - llvm/include/llvm/LTO/legacy
+ - `4`
+ - `0`
+ - `4`
+ - :none:`0%`
+ * - llvm/include/llvm/MC
+ - `69`
+ - `17`
+ - `52`
+ - :part:`24%`
+ * - llvm/include/llvm/MC/MCDisassembler
+ - `4`
+ - `1`
+ - `3`
+ - :part:`25%`
+ * - llvm/include/llvm/MC/MCParser
+ - `8`
+ - `3`
+ - `5`
+ - :part:`37%`
+ * - llvm/include/llvm/MCA
+ - `8`
+ - `8`
+ - `0`
+ - :good:`100%`
+ * - llvm/include/llvm/MCA/HardwareUnits
+ - `6`
+ - `4`
+ - `2`
+ - :part:`66%`
+ * - llvm/include/llvm/MCA/Stages
+ - `7`
+ - `6`
+ - `1`
+ - :part:`85%`
+ * - llvm/include/llvm/Object
+ - `30`
+ - `10`
+ - `20`
+ - :part:`33%`
+ * - llvm/include/llvm/ObjectYAML
+ - `15`
+ - `13`
+ - `2`
+ - :part:`86%`
+ * - llvm/include/llvm/Option
+ - `5`
+ - `1`
+ - `4`
+ - :part:`20%`
+ * - llvm/include/llvm/Passes
+ - `3`
+ - `1`
+ - `2`
+ - :part:`33%`
+ * - llvm/include/llvm/ProfileData
+ - `8`
+ - `4`
+ - `4`
+ - :part:`50%`
+ * - llvm/include/llvm/ProfileData/Coverage
+ - `3`
+ - `2`
+ - `1`
+ - :part:`66%`
+ * - llvm/include/llvm/Remarks
+ - `11`
+ - `10`
+ - `1`
+ - :part:`90%`
+ * - llvm/include/llvm/Support
+ - `170`
+ - `50`
+ - `120`
+ - :part:`29%`
+ * - llvm/include/llvm/Support/Solaris/sys
+ - `1`
+ - `1`
+ - `0`
+ - :good:`100%`
+ * - llvm/include/llvm/Support/Windows
+ - `1`
+ - `0`
+ - `1`
+ - :none:`0%`
+ * - llvm/include/llvm/TableGen
+ - `7`
+ - `1`
+ - `6`
+ - :part:`14%`
+ * - llvm/include/llvm/Target
+ - `5`
+ - `1`
+ - `4`
+ - :part:`20%`
+ * - llvm/include/llvm/Testing/Support
+ - `3`
+ - `2`
+ - `1`
+ - :part:`66%`
+ * - llvm/include/llvm/TextAPI/ELF
+ - `2`
+ - `0`
+ - `2`
+ - :none:`0%`
+ * - llvm/include/llvm/TextAPI/MachO
+ - `9`
+ - `8`
+ - `1`
+ - :part:`88%`
+ * - llvm/include/llvm/ToolDrivers/llvm-dlltool
+ - `1`
+ - `1`
+ - `0`
+ - :good:`100%`
+ * - llvm/include/llvm/ToolDrivers/llvm-lib
+ - `1`
+ - `0`
+ - `1`
+ - :none:`0%`
+ * - llvm/include/llvm/Transforms
+ - `8`
+ - `2`
+ - `6`
+ - :part:`25%`
+ * - llvm/include/llvm/Transforms/AggressiveInstCombine
+ - `1`
+ - `0`
+ - `1`
+ - :none:`0%`
+ * - llvm/include/llvm/Transforms/Coroutines
+ - `4`
+ - `4`
+ - `0`
+ - :good:`100%`
+ * - llvm/include/llvm/Transforms/InstCombine
+ - `2`
+ - `0`
+ - `2`
+ - :none:`0%`
+ * - llvm/include/llvm/Transforms/Instrumentation
+ - `14`
+ - `8`
+ - `6`
+ - :part:`57%`
+ * - llvm/include/llvm/Transforms/IPO
+ - `29`
+ - `19`
+ - `10`
+ - :part:`65%`
+ * - llvm/include/llvm/Transforms/Scalar
+ - `61`
+ - `32`
+ - `29`
+ - :part:`52%`
+ * - llvm/include/llvm/Transforms/Utils
+ - `57`
+ - `26`
+ - `31`
+ - :part:`45%`
+ * - llvm/include/llvm/Transforms/Vectorize
+ - `5`
+ - `1`
+ - `4`
+ - :part:`20%`
+ * - llvm/include/llvm/WindowsManifest
+ - `1`
+ - `1`
+ - `0`
+ - :good:`100%`
+ * - llvm/include/llvm/WindowsResource
+ - `3`
+ - `1`
+ - `2`
+ - :part:`33%`
+ * - llvm/include/llvm/XRay
+ - `17`
+ - `14`
+ - `3`
+ - :part:`82%`
+ * - llvm/include/llvm-c
+ - `26`
+ - `11`
+ - `15`
+ - :part:`42%`
+ * - llvm/include/llvm-c/Transforms
+ - `8`
+ - `2`
+ - `6`
+ - :part:`25%`
+ * - llvm/lib/Analysis
+ - `109`
+ - `33`
+ - `76`
+ - :part:`30%`
+ * - llvm/lib/AsmParser
+ - `6`
+ - `2`
+ - `4`
+ - :part:`33%`
+ * - llvm/lib/BinaryFormat
+ - `11`
+ - `7`
+ - `4`
+ - :part:`63%`
+ * - llvm/lib/Bitcode/Reader
+ - `7`
+ - `2`
+ - `5`
+ - :part:`28%`
+ * - llvm/lib/Bitcode/Writer
+ - `5`
+ - `0`
+ - `5`
+ - :none:`0%`
+ * - llvm/lib/Bitstream/Reader
+ - `1`
+ - `0`
+ - `1`
+ - :none:`0%`
+ * - llvm/lib/CodeGen
+ - `196`
+ - `31`
+ - `165`
+ - :part:`15%`
+ * - llvm/lib/CodeGen/AsmPrinter
+ - `42`
+ - `14`
+ - `28`
+ - :part:`33%`
+ * - llvm/lib/CodeGen/GlobalISel
+ - `24`
+ - `8`
+ - `16`
+ - :part:`33%`
+ * - llvm/lib/CodeGen/MIRParser
+ - `4`
+ - `1`
+ - `3`
+ - :part:`25%`
+ * - llvm/lib/CodeGen/SelectionDAG
+ - `31`
+ - `2`
+ - `29`
+ - :part:`6%`
+ * - llvm/lib/DebugInfo/CodeView
+ - `40`
+ - `25`
+ - `15`
+ - :part:`62%`
+ * - llvm/lib/DebugInfo/DWARF
+ - `28`
+ - `7`
+ - `21`
+ - :part:`25%`
+ * - llvm/lib/DebugInfo/GSYM
+ - `11`
+ - `1`
+ - `10`
+ - :part:`9%`
+ * - llvm/lib/DebugInfo/MSF
+ - `4`
+ - `4`
+ - `0`
+ - :good:`100%`
+ * - llvm/lib/DebugInfo/PDB
+ - `40`
+ - `34`
+ - `6`
+ - :part:`85%`
+ * - llvm/lib/DebugInfo/PDB/DIA
+ - `18`
+ - `15`
+ - `3`
+ - :part:`83%`
+ * - llvm/lib/DebugInfo/PDB/Native
+ - `48`
+ - `36`
+ - `12`
+ - :part:`75%`
+ * - llvm/lib/DebugInfo/Symbolize
+ - `4`
+ - `1`
+ - `3`
+ - :part:`25%`
+ * - llvm/lib/Demangle
+ - `4`
+ - `2`
+ - `2`
+ - :part:`50%`
+ * - llvm/lib/DWARFLinker
+ - `4`
+ - `3`
+ - `1`
+ - :part:`75%`
+ * - llvm/lib/ExecutionEngine
+ - `5`
+ - `1`
+ - `4`
+ - :part:`20%`
+ * - llvm/lib/ExecutionEngine/IntelJITEvents
+ - `5`
+ - `0`
+ - `5`
+ - :none:`0%`
+ * - llvm/lib/ExecutionEngine/Interpreter
+ - `4`
+ - `0`
+ - `4`
+ - :none:`0%`
+ * - llvm/lib/ExecutionEngine/JITLink
+ - `14`
+ - `9`
+ - `5`
+ - :part:`64%`
+ * - llvm/lib/ExecutionEngine/MCJIT
+ - `2`
+ - `0`
+ - `2`
+ - :none:`0%`
+ * - llvm/lib/ExecutionEngine/OProfileJIT
+ - `2`
+ - `0`
+ - `2`
+ - :none:`0%`
+ * - llvm/lib/ExecutionEngine/Orc
+ - `28`
+ - `15`
+ - `13`
+ - :part:`53%`
+ * - llvm/lib/ExecutionEngine/OrcError
+ - `2`
+ - `0`
+ - `2`
+ - :none:`0%`
+ * - llvm/lib/ExecutionEngine/PerfJITEvents
+ - `1`
+ - `0`
+ - `1`
+ - :none:`0%`
+ * - llvm/lib/ExecutionEngine/RuntimeDyld
+ - `12`
+ - `1`
+ - `11`
+ - :part:`8%`
+ * - llvm/lib/ExecutionEngine/RuntimeDyld/Targets
+ - `10`
+ - `1`
+ - `9`
+ - :part:`10%`
+ * - llvm/lib/Extensions
+ - `1`
+ - `1`
+ - `0`
+ - :good:`100%`
+ * - llvm/lib/Frontend/OpenMP
+ - `3`
+ - `2`
+ - `1`
+ - :part:`66%`
+ * - llvm/lib/FuzzMutate
+ - `5`
+ - `2`
+ - `3`
+ - :part:`40%`
+ * - llvm/lib/IR
+ - `61`
+ - `11`
+ - `50`
+ - :part:`18%`
+ * - llvm/lib/IRReader
+ - `1`
+ - `0`
+ - `1`
+ - :none:`0%`
+ * - llvm/lib/LineEditor
+ - `1`
+ - `0`
+ - `1`
+ - :none:`0%`
+ * - llvm/lib/Linker
+ - `3`
+ - `0`
+ - `3`
+ - :none:`0%`
+ * - llvm/lib/LTO
+ - `8`
+ - `1`
+ - `7`
+ - :part:`12%`
+ * - llvm/lib/MC
+ - `62`
+ - `20`
+ - `42`
+ - :part:`32%`
+ * - llvm/lib/MC/MCDisassembler
+ - `6`
+ - `3`
+ - `3`
+ - :part:`50%`
+ * - llvm/lib/MC/MCParser
+ - `12`
+ - `1`
+ - `11`
+ - :part:`8%`
+ * - llvm/lib/MCA
+ - `7`
+ - `3`
+ - `4`
+ - :part:`42%`
+ * - llvm/lib/MCA/HardwareUnits
+ - `6`
+ - `3`
+ - `3`
+ - :part:`50%`
+ * - llvm/lib/MCA/Stages
+ - `7`
+ - `6`
+ - `1`
+ - :part:`85%`
+ * - llvm/lib/Object
+ - `29`
+ - `10`
+ - `19`
+ - :part:`34%`
+ * - llvm/lib/ObjectYAML
+ - `22`
+ - `13`
+ - `9`
+ - :part:`59%`
+ * - llvm/lib/Option
+ - `4`
+ - `0`
+ - `4`
+ - :none:`0%`
+ * - llvm/lib/Passes
+ - `3`
+ - `2`
+ - `1`
+ - :part:`66%`
+ * - llvm/lib/ProfileData
+ - `8`
+ - `2`
+ - `6`
+ - :part:`25%`
+ * - llvm/lib/ProfileData/Coverage
+ - `3`
+ - `0`
+ - `3`
+ - :none:`0%`
+ * - llvm/lib/Remarks
+ - `13`
+ - `10`
+ - `3`
+ - :part:`76%`
+ * - llvm/lib/Support
+ - `132`
+ - `44`
+ - `88`
+ - :part:`33%`
+ * - llvm/lib/Support/Unix
+ - `1`
+ - `0`
+ - `1`
+ - :none:`0%`
+ * - llvm/lib/TableGen
+ - `11`
+ - `1`
+ - `10`
+ - :part:`9%`
+ * - llvm/lib/Target
+ - `5`
+ - `0`
+ - `5`
+ - :none:`0%`
+ * - llvm/lib/Target/AArch64
+ - `59`
+ - `7`
+ - `52`
+ - :part:`11%`
+ * - llvm/lib/Target/AArch64/AsmParser
+ - `1`
+ - `0`
+ - `1`
+ - :none:`0%`
+ * - llvm/lib/Target/AArch64/Disassembler
+ - `4`
+ - `1`
+ - `3`
+ - :part:`25%`
+ * - llvm/lib/Target/AArch64/GISel
+ - `9`
+ - `0`
+ - `9`
+ - :none:`0%`
+ * - llvm/lib/Target/AArch64/MCTargetDesc
+ - `21`
+ - `6`
+ - `15`
+ - :part:`28%`
+ * - llvm/lib/Target/AArch64/TargetInfo
+ - `2`
+ - `1`
+ - `1`
+ - :part:`50%`
+ * - llvm/lib/Target/AArch64/Utils
+ - `2`
+ - `0`
+ - `2`
+ - :none:`0%`
+ * - llvm/lib/Target/AMDGPU
+ - `146`
+ - `12`
+ - `134`
+ - :part:`8%`
+ * - llvm/lib/Target/AMDGPU/AsmParser
+ - `1`
+ - `0`
+ - `1`
+ - :none:`0%`
+ * - llvm/lib/Target/AMDGPU/Disassembler
+ - `2`
+ - `0`
+ - `2`
+ - :none:`0%`
+ * - llvm/lib/Target/AMDGPU/MCTargetDesc
+ - `18`
+ - `3`
+ - `15`
+ - :part:`16%`
+ * - llvm/lib/Target/AMDGPU/TargetInfo
+ - `2`
+ - `1`
+ - `1`
+ - :part:`50%`
+ * - llvm/lib/Target/AMDGPU/Utils
+ - `9`
+ - `2`
+ - `7`
+ - :part:`22%`
+ * - llvm/lib/Target/ARC
+ - `24`
+ - `19`
+ - `5`
+ - :part:`79%`
+ * - llvm/lib/Target/ARC/Disassembler
+ - `1`
+ - `0`
+ - `1`
+ - :none:`0%`
+ * - llvm/lib/Target/ARC/MCTargetDesc
+ - `7`
+ - `6`
+ - `1`
+ - :part:`85%`
+ * - llvm/lib/Target/ARC/TargetInfo
+ - `2`
+ - `2`
+ - `0`
+ - :good:`100%`
+ * - llvm/lib/Target/ARM
+ - `71`
+ - `7`
+ - `64`
+ - :part:`9%`
+ * - llvm/lib/Target/ARM/AsmParser
+ - `1`
+ - `0`
+ - `1`
+ - :none:`0%`
+ * - llvm/lib/Target/ARM/Disassembler
+ - `1`
+ - `0`
+ - `1`
+ - :none:`0%`
+ * - llvm/lib/Target/ARM/MCTargetDesc
+ - `26`
+ - `2`
+ - `24`
+ - :part:`7%`
+ * - llvm/lib/Target/ARM/TargetInfo
+ - `2`
+ - `2`
+ - `0`
+ - :good:`100%`
+ * - llvm/lib/Target/ARM/Utils
+ - `2`
+ - `0`
+ - `2`
+ - :none:`0%`
+ * - llvm/lib/Target/AVR
+ - `23`
+ - `4`
+ - `19`
+ - :part:`17%`
+ * - llvm/lib/Target/AVR/AsmParser
+ - `1`
+ - `0`
+ - `1`
+ - :none:`0%`
+ * - llvm/lib/Target/AVR/Disassembler
+ - `1`
+ - `0`
+ - `1`
+ - :none:`0%`
+ * - llvm/lib/Target/AVR/MCTargetDesc
+ - `20`
+ - `6`
+ - `14`
+ - :part:`30%`
+ * - llvm/lib/Target/AVR/TargetInfo
+ - `2`
+ - `1`
+ - `1`
+ - :part:`50%`
+ * - llvm/lib/Target/BPF
+ - `28`
+ - `5`
+ - `23`
+ - :part:`17%`
+ * - llvm/lib/Target/BPF/AsmParser
+ - `1`
+ - `0`
+ - `1`
+ - :none:`0%`
+ * - llvm/lib/Target/BPF/Disassembler
+ - `1`
+ - `0`
+ - `1`
+ - :none:`0%`
+ * - llvm/lib/Target/BPF/MCTargetDesc
+ - `8`
+ - `1`
+ - `7`
+ - :part:`12%`
+ * - llvm/lib/Target/BPF/TargetInfo
+ - `2`
+ - `1`
+ - `1`
+ - :part:`50%`
+ * - llvm/lib/Target/Hexagon
+ - `77`
+ - `2`
+ - `75`
+ - :part:`2%`
+ * - llvm/lib/Target/Hexagon/AsmParser
+ - `1`
+ - `0`
+ - `1`
+ - :none:`0%`
+ * - llvm/lib/Target/Hexagon/Disassembler
+ - `1`
+ - `0`
+ - `1`
+ - :none:`0%`
+ * - llvm/lib/Target/Hexagon/MCTargetDesc
+ - `26`
+ - `6`
+ - `20`
+ - :part:`23%`
+ * - llvm/lib/Target/Hexagon/TargetInfo
+ - `2`
+ - `1`
+ - `1`
+ - :part:`50%`
+ * - llvm/lib/Target/Lanai
+ - `28`
+ - `19`
+ - `9`
+ - :part:`67%`
+ * - llvm/lib/Target/Lanai/AsmParser
+ - `1`
+ - `0`
+ - `1`
+ - :none:`0%`
+ * - llvm/lib/Target/Lanai/Disassembler
+ - `2`
+ - `2`
+ - `0`
+ - :good:`100%`
+ * - llvm/lib/Target/Lanai/MCTargetDesc
+ - `13`
+ - `12`
+ - `1`
+ - :part:`92%`
+ * - llvm/lib/Target/Lanai/TargetInfo
+ - `2`
+ - `2`
+ - `0`
+ - :good:`100%`
+ * - llvm/lib/Target/Mips
+ - `69`
+ - `12`
+ - `57`
+ - :part:`17%`
+ * - llvm/lib/Target/Mips/AsmParser
+ - `1`
+ - `0`
+ - `1`
+ - :none:`0%`
+ * - llvm/lib/Target/Mips/Disassembler
+ - `1`
+ - `0`
+ - `1`
+ - :none:`0%`
+ * - llvm/lib/Target/Mips/MCTargetDesc
+ - `25`
+ - `6`
+ - `19`
+ - :part:`24%`
+ * - llvm/lib/Target/Mips/TargetInfo
+ - `2`
+ - `2`
+ - `0`
+ - :good:`100%`
+ * - llvm/lib/Target/MSP430
+ - `20`
+ - `0`
+ - `20`
+ - :none:`0%`
+ * - llvm/lib/Target/MSP430/AsmParser
+ - `1`
+ - `0`
+ - `1`
+ - :none:`0%`
+ * - llvm/lib/Target/MSP430/Disassembler
+ - `1`
+ - `0`
+ - `1`
+ - :none:`0%`
+ * - llvm/lib/Target/MSP430/MCTargetDesc
+ - `11`
+ - `3`
+ - `8`
+ - :part:`27%`
+ * - llvm/lib/Target/MSP430/TargetInfo
+ - `2`
+ - `2`
+ - `0`
+ - :good:`100%`
+ * - llvm/lib/Target/NVPTX
+ - `42`
+ - `7`
+ - `35`
+ - :part:`16%`
+ * - llvm/lib/Target/NVPTX/MCTargetDesc
+ - `9`
+ - `5`
+ - `4`
+ - :part:`55%`
+ * - llvm/lib/Target/NVPTX/TargetInfo
+ - `2`
+ - `2`
+ - `0`
+ - :good:`100%`
+ * - llvm/lib/Target/PowerPC
+ - `53`
+ - `2`
+ - `51`
+ - :part:`3%`
+ * - llvm/lib/Target/PowerPC/AsmParser
+ - `1`
+ - `0`
+ - `1`
+ - :none:`0%`
+ * - llvm/lib/Target/PowerPC/Disassembler
+ - `1`
+ - `0`
+ - `1`
+ - :none:`0%`
+ * - llvm/lib/Target/PowerPC/MCTargetDesc
+ - `18`
+ - `2`
+ - `16`
+ - :part:`11%`
+ * - llvm/lib/Target/PowerPC/TargetInfo
+ - `2`
+ - `2`
+ - `0`
+ - :good:`100%`
+ * - llvm/lib/Target/RISCV
+ - `31`
+ - `13`
+ - `18`
+ - :part:`41%`
+ * - llvm/lib/Target/RISCV/AsmParser
+ - `1`
+ - `0`
+ - `1`
+ - :none:`0%`
+ * - llvm/lib/Target/RISCV/Disassembler
+ - `1`
+ - `0`
+ - `1`
+ - :none:`0%`
+ * - llvm/lib/Target/RISCV/MCTargetDesc
+ - `17`
+ - `8`
+ - `9`
+ - :part:`47%`
+ * - llvm/lib/Target/RISCV/TargetInfo
+ - `2`
+ - `2`
+ - `0`
+ - :good:`100%`
+ * - llvm/lib/Target/RISCV/Utils
+ - `4`
+ - `3`
+ - `1`
+ - :part:`75%`
+ * - llvm/lib/Target/Sparc
+ - `23`
+ - `2`
+ - `21`
+ - :part:`8%`
+ * - llvm/lib/Target/Sparc/AsmParser
+ - `1`
+ - `0`
+ - `1`
+ - :none:`0%`
+ * - llvm/lib/Target/Sparc/Disassembler
+ - `1`
+ - `0`
+ - `1`
+ - :none:`0%`
+ * - llvm/lib/Target/Sparc/MCTargetDesc
+ - `14`
+ - `4`
+ - `10`
+ - :part:`28%`
+ * - llvm/lib/Target/Sparc/TargetInfo
+ - `2`
+ - `2`
+ - `0`
+ - :good:`100%`
+ * - llvm/lib/Target/SystemZ
+ - `40`
+ - `4`
+ - `36`
+ - :part:`10%`
+ * - llvm/lib/Target/SystemZ/AsmParser
+ - `1`
+ - `0`
+ - `1`
+ - :none:`0%`
+ * - llvm/lib/Target/SystemZ/Disassembler
+ - `1`
+ - `0`
+ - `1`
+ - :none:`0%`
+ * - llvm/lib/Target/SystemZ/MCTargetDesc
+ - `10`
+ - `4`
+ - `6`
+ - :part:`40%`
+ * - llvm/lib/Target/SystemZ/TargetInfo
+ - `2`
+ - `2`
+ - `0`
+ - :good:`100%`
+ * - llvm/lib/Target/VE
+ - `19`
+ - `15`
+ - `4`
+ - :part:`78%`
+ * - llvm/lib/Target/VE/AsmParser
+ - `1`
+ - `1`
+ - `0`
+ - :good:`100%`
+ * - llvm/lib/Target/VE/Disassembler
+ - `1`
+ - `1`
+ - `0`
+ - :good:`100%`
+ * - llvm/lib/Target/VE/MCTargetDesc
+ - `14`
+ - `13`
+ - `1`
+ - :part:`92%`
+ * - llvm/lib/Target/VE/TargetInfo
+ - `2`
+ - `1`
+ - `1`
+ - :part:`50%`
+ * - llvm/lib/Target/WebAssembly
+ - `58`
+ - `40`
+ - `18`
+ - :part:`68%`
+ * - llvm/lib/Target/WebAssembly/AsmParser
+ - `1`
+ - `0`
+ - `1`
+ - :none:`0%`
+ * - llvm/lib/Target/WebAssembly/Disassembler
+ - `1`
+ - `1`
+ - `0`
+ - :good:`100%`
+ * - llvm/lib/Target/WebAssembly/MCTargetDesc
+ - `12`
+ - `7`
+ - `5`
+ - :part:`58%`
+ * - llvm/lib/Target/WebAssembly/TargetInfo
+ - `2`
+ - `2`
+ - `0`
+ - :good:`100%`
+ * - llvm/lib/Target/X86
+ - `75`
+ - `11`
+ - `64`
+ - :part:`14%`
+ * - llvm/lib/Target/X86/AsmParser
+ - `3`
+ - `0`
+ - `3`
+ - :none:`0%`
+ * - llvm/lib/Target/X86/Disassembler
+ - `2`
+ - `0`
+ - `2`
+ - :none:`0%`
+ * - llvm/lib/Target/X86/MCTargetDesc
+ - `25`
+ - `6`
+ - `19`
+ - :part:`24%`
+ * - llvm/lib/Target/X86/TargetInfo
+ - `2`
+ - `1`
+ - `1`
+ - :part:`50%`
+ * - llvm/lib/Target/XCore
+ - `27`
+ - `2`
+ - `25`
+ - :part:`7%`
+ * - llvm/lib/Target/XCore/Disassembler
+ - `1`
+ - `0`
+ - `1`
+ - :none:`0%`
+ * - llvm/lib/Target/XCore/MCTargetDesc
+ - `6`
+ - `3`
+ - `3`
+ - :part:`50%`
+ * - llvm/lib/Target/XCore/TargetInfo
+ - `2`
+ - `1`
+ - `1`
+ - :part:`50%`
+ * - llvm/lib/Testing/Support
+ - `3`
+ - `3`
+ - `0`
+ - :good:`100%`
+ * - llvm/lib/TextAPI/ELF
+ - `2`
+ - `1`
+ - `1`
+ - :part:`50%`
+ * - llvm/lib/TextAPI/MachO
+ - `11`
+ - `8`
+ - `3`
+ - :part:`72%`
+ * - llvm/lib/ToolDrivers/llvm-dlltool
+ - `1`
+ - `0`
+ - `1`
+ - :none:`0%`
+ * - llvm/lib/ToolDrivers/llvm-lib
+ - `1`
+ - `0`
+ - `1`
+ - :none:`0%`
+ * - llvm/lib/Transforms/AggressiveInstCombine
+ - `3`
+ - `0`
+ - `3`
+ - :none:`0%`
+ * - llvm/lib/Transforms/CFGuard
+ - `1`
+ - `1`
+ - `0`
+ - :good:`100%`
+ * - llvm/lib/Transforms/Coroutines
+ - `8`
+ - `0`
+ - `8`
+ - :none:`0%`
+ * - llvm/lib/Transforms/Hello
+ - `1`
+ - `0`
+ - `1`
+ - :none:`0%`
+ * - llvm/lib/Transforms/InstCombine
+ - `16`
+ - `1`
+ - `15`
+ - :part:`6%`
+ * - llvm/lib/Transforms/Instrumentation
+ - `21`
+ - `3`
+ - `18`
+ - :part:`14%`
+ * - llvm/lib/Transforms/IPO
+ - `39`
+ - `5`
+ - `34`
+ - :part:`12%`
+ * - llvm/lib/Transforms/ObjCARC
+ - `15`
+ - `3`
+ - `12`
+ - :part:`20%`
+ * - llvm/lib/Transforms/Scalar
+ - `75`
+ - `10`
+ - `65`
+ - :part:`13%`
+ * - llvm/lib/Transforms/Utils
+ - `72`
+ - `14`
+ - `58`
+ - :part:`19%`
+ * - llvm/lib/Transforms/Vectorize
+ - `22`
+ - `14`
+ - `8`
+ - :part:`63%`
+ * - llvm/lib/WindowsManifest
+ - `1`
+ - `1`
+ - `0`
+ - :good:`100%`
+ * - llvm/lib/XRay
+ - `14`
+ - `12`
+ - `2`
+ - :part:`85%`
+ * - llvm/tools/bugpoint
+ - `12`
+ - `1`
+ - `11`
+ - :part:`8%`
+ * - llvm/tools/bugpoint-passes
+ - `1`
+ - `0`
+ - `1`
+ - :none:`0%`
+ * - llvm/tools/dsymutil
+ - `18`
+ - `15`
+ - `3`
+ - :part:`83%`
+ * - llvm/tools/gold
+ - `1`
+ - `0`
+ - `1`
+ - :none:`0%`
+ * - llvm/tools/llc
+ - `1`
+ - `0`
+ - `1`
+ - :none:`0%`
+ * - llvm/tools/lli
+ - `2`
+ - `0`
+ - `2`
+ - :none:`0%`
+ * - llvm/tools/lli/ChildTarget
+ - `1`
+ - `1`
+ - `0`
+ - :good:`100%`
+ * - llvm/tools/llvm-ar
+ - `1`
+ - `0`
+ - `1`
+ - :none:`0%`
+ * - llvm/tools/llvm-as
+ - `1`
+ - `0`
+ - `1`
+ - :none:`0%`
+ * - llvm/tools/llvm-as-fuzzer
+ - `1`
+ - `0`
+ - `1`
+ - :none:`0%`
+ * - llvm/tools/llvm-bcanalyzer
+ - `1`
+ - `1`
+ - `0`
+ - :good:`100%`
+ * - llvm/tools/llvm-c-test
+ - `2`
+ - `0`
+ - `2`
+ - :none:`0%`
+ * - llvm/tools/llvm-cat
+ - `1`
+ - `0`
+ - `1`
+ - :none:`0%`
+ * - llvm/tools/llvm-cfi-verify
+ - `1`
+ - `0`
+ - `1`
+ - :none:`0%`
+ * - llvm/tools/llvm-cfi-verify/lib
+ - `4`
+ - `1`
+ - `3`
+ - :part:`25%`
+ * - llvm/tools/llvm-config
+ - `1`
+ - `0`
+ - `1`
+ - :none:`0%`
+ * - llvm/tools/llvm-cov
+ - `23`
+ - `12`
+ - `11`
+ - :part:`52%`
+ * - llvm/tools/llvm-cvtres
+ - `1`
+ - `0`
+ - `1`
+ - :none:`0%`
+ * - llvm/tools/llvm-cxxdump
+ - `4`
+ - `2`
+ - `2`
+ - :part:`50%`
+ * - llvm/tools/llvm-cxxfilt
+ - `1`
+ - `0`
+ - `1`
+ - :none:`0%`
+ * - llvm/tools/llvm-cxxmap
+ - `1`
+ - `0`
+ - `1`
+ - :none:`0%`
+ * - llvm/tools/llvm-diff
+ - `7`
+ - `0`
+ - `7`
+ - :none:`0%`
+ * - llvm/tools/llvm-dis
+ - `1`
+ - `0`
+ - `1`
+ - :none:`0%`
+ * - llvm/tools/llvm-dwarfdump
+ - `4`
+ - `2`
+ - `2`
+ - :part:`50%`
+ * - llvm/tools/llvm-dwarfdump/fuzzer
+ - `1`
+ - `0`
+ - `1`
+ - :none:`0%`
+ * - llvm/tools/llvm-dwp
+ - `4`
+ - `1`
+ - `3`
+ - :part:`25%`
+ * - llvm/tools/llvm-elfabi
+ - `5`
+ - `2`
+ - `3`
+ - :part:`40%`
+ * - llvm/tools/llvm-exegesis
+ - `1`
+ - `1`
+ - `0`
+ - :good:`100%`
+ * - llvm/tools/llvm-exegesis/lib
+ - `44`
+ - `35`
+ - `9`
+ - :part:`79%`
+ * - llvm/tools/llvm-exegesis/lib/AArch64
+ - `1`
+ - `1`
+ - `0`
+ - :good:`100%`
+ * - llvm/tools/llvm-exegesis/lib/Mips
+ - `1`
+ - `0`
+ - `1`
+ - :none:`0%`
+ * - llvm/tools/llvm-exegesis/lib/PowerPC
+ - `1`
+ - `1`
+ - `0`
+ - :good:`100%`
+ * - llvm/tools/llvm-exegesis/lib/X86
+ - `1`
+ - `1`
+ - `0`
+ - :good:`100%`
+ * - llvm/tools/llvm-extract
+ - `1`
+ - `0`
+ - `1`
+ - :none:`0%`
+ * - llvm/tools/llvm-gsymutil
+ - `1`
+ - `0`
+ - `1`
+ - :none:`0%`
+ * - llvm/tools/llvm-ifs
+ - `1`
+ - `1`
+ - `0`
+ - :good:`100%`
+ * - llvm/tools/llvm-isel-fuzzer
+ - `2`
+ - `1`
+ - `1`
+ - :part:`50%`
+ * - llvm/tools/llvm-itanium-demangle-fuzzer
+ - `2`
+ - `1`
+ - `1`
+ - :part:`50%`
+ * - llvm/tools/llvm-jitlink
+ - `4`
+ - `2`
+ - `2`
+ - :part:`50%`
+ * - llvm/tools/llvm-jitlistener
+ - `1`
+ - `0`
+ - `1`
+ - :none:`0%`
+ * - llvm/tools/llvm-link
+ - `1`
+ - `0`
+ - `1`
+ - :none:`0%`
+ * - llvm/tools/llvm-lipo
+ - `1`
+ - `0`
+ - `1`
+ - :none:`0%`
+ * - llvm/tools/llvm-lto
+ - `1`
+ - `0`
+ - `1`
+ - :none:`0%`
+ * - llvm/tools/llvm-lto2
+ - `1`
+ - `0`
+ - `1`
+ - :none:`0%`
+ * - llvm/tools/llvm-mc
+ - `3`
+ - `1`
+ - `2`
+ - :part:`33%`
+ * - llvm/tools/llvm-mc-assemble-fuzzer
+ - `1`
+ - `0`
+ - `1`
+ - :none:`0%`
+ * - llvm/tools/llvm-mc-disassemble-fuzzer
+ - `1`
+ - `0`
+ - `1`
+ - :none:`0%`
+ * - llvm/tools/llvm-mca
+ - `7`
+ - `6`
+ - `1`
+ - :part:`85%`
+ * - llvm/tools/llvm-mca/Views
+ - `20`
+ - `15`
+ - `5`
+ - :part:`75%`
+ * - llvm/tools/llvm-microsoft-demangle-fuzzer
+ - `2`
+ - `2`
+ - `0`
+ - :good:`100%`
+ * - llvm/tools/llvm-ml
+ - `3`
+ - `1`
+ - `2`
+ - :part:`33%`
+ * - llvm/tools/llvm-modextract
+ - `1`
+ - `1`
+ - `0`
+ - :good:`100%`
+ * - llvm/tools/llvm-mt
+ - `1`
+ - `0`
+ - `1`
+ - :none:`0%`
+ * - llvm/tools/llvm-nm
+ - `1`
+ - `0`
+ - `1`
+ - :none:`0%`
+ * - llvm/tools/llvm-objcopy
+ - `6`
+ - `4`
+ - `2`
+ - :part:`66%`
+ * - llvm/tools/llvm-objcopy/COFF
+ - `8`
+ - `7`
+ - `1`
+ - :part:`87%`
+ * - llvm/tools/llvm-objcopy/ELF
+ - `6`
+ - `3`
+ - `3`
+ - :part:`50%`
+ * - llvm/tools/llvm-objcopy/MachO
+ - `10`
+ - `10`
+ - `0`
+ - :good:`100%`
+ * - llvm/tools/llvm-objcopy/wasm
+ - `8`
+ - `8`
+ - `0`
+ - :good:`100%`
+ * - llvm/tools/llvm-objdump
+ - `12`
+ - `8`
+ - `4`
+ - :part:`66%`
+ * - llvm/tools/llvm-opt-fuzzer
+ - `2`
+ - `0`
+ - `2`
+ - :none:`0%`
+ * - llvm/tools/llvm-opt-report
+ - `1`
+ - `0`
+ - `1`
+ - :none:`0%`
+ * - llvm/tools/llvm-pdbutil
+ - `47`
+ - `16`
+ - `31`
+ - :part:`34%`
+ * - llvm/tools/llvm-profdata
+ - `1`
+ - `0`
+ - `1`
+ - :none:`0%`
+ * - llvm/tools/llvm-rc
+ - `12`
+ - `7`
+ - `5`
+ - :part:`58%`
+ * - llvm/tools/llvm-readobj
+ - `21`
+ - `3`
+ - `18`
+ - :part:`14%`
+ * - llvm/tools/llvm-reduce
+ - `4`
+ - `2`
+ - `2`
+ - :part:`50%`
+ * - llvm/tools/llvm-reduce/deltas
+ - `14`
+ - `8`
+ - `6`
+ - :part:`57%`
+ * - llvm/tools/llvm-rtdyld
+ - `1`
+ - `0`
+ - `1`
+ - :none:`0%`
+ * - llvm/tools/llvm-shlib
+ - `1`
+ - `1`
+ - `0`
+ - :good:`100%`
+ * - llvm/tools/llvm-size
+ - `1`
+ - `0`
+ - `1`
+ - :none:`0%`
+ * - llvm/tools/llvm-special-case-list-fuzzer
+ - `2`
+ - `2`
+ - `0`
+ - :good:`100%`
+ * - llvm/tools/llvm-split
+ - `1`
+ - `0`
+ - `1`
+ - :none:`0%`
+ * - llvm/tools/llvm-stress
+ - `1`
+ - `0`
+ - `1`
+ - :none:`0%`
+ * - llvm/tools/llvm-strings
+ - `1`
+ - `0`
+ - `1`
+ - :none:`0%`
+ * - llvm/tools/llvm-symbolizer
+ - `1`
+ - `0`
+ - `1`
+ - :none:`0%`
+ * - llvm/tools/llvm-undname
+ - `1`
+ - `1`
+ - `0`
+ - :good:`100%`
+ * - llvm/tools/llvm-xray
+ - `19`
+ - `16`
+ - `3`
+ - :part:`84%`
+ * - llvm/tools/llvm-yaml-numeric-parser-fuzzer
+ - `2`
+ - `2`
+ - `0`
+ - :good:`100%`
+ * - llvm/tools/lto
+ - `2`
+ - `1`
+ - `1`
+ - :part:`50%`
+ * - llvm/tools/obj2yaml
+ - `11`
+ - `4`
+ - `7`
+ - :part:`36%`
+ * - llvm/tools/opt
+ - `10`
+ - `2`
+ - `8`
+ - :part:`20%`
+ * - llvm/tools/remarks-shlib
+ - `1`
+ - `0`
+ - `1`
+ - :none:`0%`
+ * - llvm/tools/sancov
+ - `1`
+ - `0`
+ - `1`
+ - :none:`0%`
+ * - llvm/tools/sanstats
+ - `1`
+ - `1`
+ - `0`
+ - :good:`100%`
+ * - llvm/tools/verify-uselistorder
+ - `1`
+ - `0`
+ - `1`
+ - :none:`0%`
+ * - llvm/tools/vfabi-demangle-fuzzer
+ - `1`
+ - `1`
+ - `0`
+ - :good:`100%`
+ * - llvm/tools/yaml2obj
+ - `1`
+ - `1`
+ - `0`
+ - :good:`100%`
+ * - llvm/unittests/ADT
+ - `74`
+ - `29`
+ - `45`
+ - :part:`39%`
+ * - llvm/unittests/Analysis
+ - `34`
+ - `11`
+ - `23`
+ - :part:`32%`
+ * - llvm/unittests/AsmParser
+ - `1`
+ - `1`
+ - `0`
+ - :good:`100%`
+ * - llvm/unittests/BinaryFormat
+ - `6`
+ - `5`
+ - `1`
+ - :part:`83%`
+ * - llvm/unittests/Bitcode
+ - `2`
+ - `1`
+ - `1`
+ - :part:`50%`
+ * - llvm/unittests/Bitstream
+ - `2`
+ - `1`
+ - `1`
+ - :part:`50%`
+ * - llvm/unittests/CodeGen
+ - `10`
+ - `2`
+ - `8`
+ - :part:`20%`
+ * - llvm/unittests/CodeGen/GlobalISel
+ - `11`
+ - `1`
+ - `10`
+ - :part:`9%`
+ * - llvm/unittests/DebugInfo/CodeView
+ - `3`
+ - `1`
+ - `2`
+ - :part:`33%`
+ * - llvm/unittests/DebugInfo/DWARF
+ - `13`
+ - `8`
+ - `5`
+ - :part:`61%`
+ * - llvm/unittests/DebugInfo/GSYM
+ - `1`
+ - `0`
+ - `1`
+ - :none:`0%`
+ * - llvm/unittests/DebugInfo/MSF
+ - `3`
+ - `2`
+ - `1`
+ - :part:`66%`
+ * - llvm/unittests/DebugInfo/PDB
+ - `5`
+ - `3`
+ - `2`
+ - :part:`60%`
+ * - llvm/unittests/DebugInfo/PDB/Inputs
+ - `1`
+ - `1`
+ - `0`
+ - :good:`100%`
+ * - llvm/unittests/Demangle
+ - `3`
+ - `2`
+ - `1`
+ - :part:`66%`
+ * - llvm/unittests/ExecutionEngine
+ - `1`
+ - `0`
+ - `1`
+ - :none:`0%`
+ * - llvm/unittests/ExecutionEngine/JITLink
+ - `1`
+ - `1`
+ - `0`
+ - :good:`100%`
+ * - llvm/unittests/ExecutionEngine/MCJIT
+ - `7`
+ - `0`
+ - `7`
+ - :none:`0%`
+ * - llvm/unittests/ExecutionEngine/Orc
+ - `20`
+ - `4`
+ - `16`
+ - :part:`20%`
+ * - llvm/unittests/Frontend
+ - `2`
+ - `1`
+ - `1`
+ - :part:`50%`
+ * - llvm/unittests/FuzzMutate
+ - `4`
+ - `0`
+ - `4`
+ - :none:`0%`
+ * - llvm/unittests/IR
+ - `35`
+ - `7`
+ - `28`
+ - :part:`20%`
+ * - llvm/unittests/LineEditor
+ - `1`
+ - `0`
+ - `1`
+ - :none:`0%`
+ * - llvm/unittests/Linker
+ - `1`
+ - `0`
+ - `1`
+ - :none:`0%`
+ * - llvm/unittests/MC
+ - `6`
+ - `3`
+ - `3`
+ - :part:`50%`
+ * - llvm/unittests/MC/AMDGPU
+ - `1`
+ - `1`
+ - `0`
+ - :good:`100%`
+ * - llvm/unittests/MI
+ - `1`
+ - `0`
+ - `1`
+ - :none:`0%`
+ * - llvm/unittests/Object
+ - `8`
+ - `7`
+ - `1`
+ - :part:`87%`
+ * - llvm/unittests/ObjectYAML
+ - `4`
+ - `2`
+ - `2`
+ - :part:`50%`
+ * - llvm/unittests/Option
+ - `1`
+ - `0`
+ - `1`
+ - :none:`0%`
+ * - llvm/unittests/Passes
+ - `3`
+ - `3`
+ - `0`
+ - :good:`100%`
+ * - llvm/unittests/ProfileData
+ - `3`
+ - `0`
+ - `3`
+ - :none:`0%`
+ * - llvm/unittests/Remarks
+ - `8`
+ - `5`
+ - `3`
+ - :part:`62%`
+ * - llvm/unittests/Support
+ - `89`
+ - `24`
+ - `65`
+ - :part:`26%`
+ * - llvm/unittests/Support/DynamicLibrary
+ - `4`
+ - `0`
+ - `4`
+ - :none:`0%`
+ * - llvm/unittests/TableGen
+ - `2`
+ - `0`
+ - `2`
+ - :none:`0%`
+ * - llvm/unittests/Target/AArch64
+ - `2`
+ - `1`
+ - `1`
+ - :part:`50%`
+ * - llvm/unittests/Target/AMDGPU
+ - `1`
+ - `1`
+ - `0`
+ - :good:`100%`
+ * - llvm/unittests/Target/ARM
+ - `1`
+ - `0`
+ - `1`
+ - :none:`0%`
+ * - llvm/unittests/Target/PowerPC
+ - `1`
+ - `1`
+ - `0`
+ - :good:`100%`
+ * - llvm/unittests/Target/WebAssembly
+ - `1`
+ - `0`
+ - `1`
+ - :none:`0%`
+ * - llvm/unittests/Target/X86
+ - `1`
+ - `0`
+ - `1`
+ - :none:`0%`
+ * - llvm/unittests/TextAPI
+ - `6`
+ - `3`
+ - `3`
+ - :part:`50%`
+ * - llvm/unittests/tools/llvm-cfi-verify
+ - `2`
+ - `1`
+ - `1`
+ - :part:`50%`
+ * - llvm/unittests/tools/llvm-exegesis
+ - `5`
+ - `4`
+ - `1`
+ - :part:`80%`
+ * - llvm/unittests/tools/llvm-exegesis/AArch64
+ - `1`
+ - `1`
+ - `0`
+ - :good:`100%`
+ * - llvm/unittests/tools/llvm-exegesis/ARM
+ - `1`
+ - `1`
+ - `0`
+ - :good:`100%`
+ * - llvm/unittests/tools/llvm-exegesis/Common
+ - `1`
+ - `1`
+ - `0`
+ - :good:`100%`
+ * - llvm/unittests/tools/llvm-exegesis/Mips
+ - `5`
+ - `4`
+ - `1`
+ - :part:`80%`
+ * - llvm/unittests/tools/llvm-exegesis/PowerPC
+ - `2`
+ - `0`
+ - `2`
+ - :none:`0%`
+ * - llvm/unittests/tools/llvm-exegesis/X86
+ - `9`
+ - `8`
+ - `1`
+ - :part:`88%`
+ * - llvm/unittests/Transforms/IPO
+ - `2`
+ - `0`
+ - `2`
+ - :none:`0%`
+ * - llvm/unittests/Transforms/Scalar
+ - `2`
+ - `0`
+ - `2`
+ - :none:`0%`
+ * - llvm/unittests/Transforms/Utils
+ - `17`
+ - `7`
+ - `10`
+ - :part:`41%`
+ * - llvm/unittests/Transforms/Vectorize
+ - `7`
+ - `7`
+ - `0`
+ - :good:`100%`
+ * - llvm/unittests/XRay
+ - `8`
+ - `7`
+ - `1`
+ - :part:`87%`
+ * - llvm/utils/benchmark/cmake
+ - `5`
+ - `3`
+ - `2`
+ - :part:`60%`
+ * - llvm/utils/benchmark/include/benchmark
+ - `1`
+ - `0`
+ - `1`
+ - :none:`0%`
+ * - llvm/utils/benchmark/src
+ - `19`
+ - `0`
+ - `19`
+ - :none:`0%`
+ * - llvm/utils/FileCheck
+ - `1`
+ - `0`
+ - `1`
+ - :none:`0%`
+ * - llvm/utils/fpcmp
+ - `1`
+ - `0`
+ - `1`
+ - :none:`0%`
+ * - llvm/utils/KillTheDoctor
+ - `1`
+ - `0`
+ - `1`
+ - :none:`0%`
+ * - llvm/utils/not
+ - `1`
+ - `1`
+ - `0`
+ - :good:`100%`
+ * - llvm/utils/PerfectShuffle
+ - `1`
+ - `0`
+ - `1`
+ - :none:`0%`
+ * - llvm/utils/release/llvm_package_355249/llvm/tools/clang/tools/extra/change-namespace
+ - `2`
+ - `2`
+ - `0`
+ - :good:`100%`
+ * - llvm/utils/release/llvm_package_355249/llvm/tools/clang/tools/extra/change-namespace/tool
+ - `1`
+ - `1`
+ - `0`
+ - :good:`100%`
+ * - llvm/utils/release/llvm_package_355249/llvm/tools/clang/tools/extra/clang-apply-replacements/include/clang-apply-replacements/Tooling
+ - `1`
+ - `1`
+ - `0`
+ - :good:`100%`
+ * - llvm/utils/release/llvm_package_355249/llvm/tools/clang/tools/extra/clang-apply-replacements/lib/Tooling
+ - `1`
+ - `1`
+ - `0`
+ - :good:`100%`
+ * - llvm/utils/release/llvm_package_355249/llvm/tools/clang/tools/extra/clang-apply-replacements/tool
+ - `1`
+ - `1`
+ - `0`
+ - :good:`100%`
+ * - llvm/utils/release/llvm_package_355249/llvm/tools/clang/tools/extra/clang-doc
+ - `16`
+ - `16`
+ - `0`
+ - :good:`100%`
+ * - llvm/utils/release/llvm_package_355249/llvm/tools/clang/tools/extra/clang-doc/tool
+ - `1`
+ - `1`
+ - `0`
+ - :good:`100%`
+ * - llvm/utils/release/llvm_package_355249/llvm/tools/clang/tools/extra/clang-move
+ - `4`
+ - `4`
+ - `0`
+ - :good:`100%`
+ * - llvm/utils/release/llvm_package_355249/llvm/tools/clang/tools/extra/clang-move/tool
+ - `1`
+ - `1`
+ - `0`
+ - :good:`100%`
+ * - llvm/utils/release/llvm_package_355249/llvm/tools/clang/tools/extra/clang-query
+ - `5`
+ - `5`
+ - `0`
+ - :good:`100%`
+ * - llvm/utils/release/llvm_package_355249/llvm/tools/clang/tools/extra/clang-query/tool
+ - `1`
+ - `1`
+ - `0`
+ - :good:`100%`
+ * - llvm/utils/release/llvm_package_355249/llvm/tools/clang/tools/extra/clang-reorder-fields
+ - `2`
+ - `2`
+ - `0`
+ - :good:`100%`
+ * - llvm/utils/release/llvm_package_355249/llvm/tools/clang/tools/extra/clang-reorder-fields/tool
+ - `1`
+ - `1`
+ - `0`
+ - :good:`100%`
+ * - llvm/utils/release/llvm_package_355249/llvm/tools/clang/tools/extra/clang-tidy
+ - `12`
+ - `12`
+ - `0`
+ - :good:`100%`
+ * - llvm/utils/release/llvm_package_355249/llvm/tools/clang/tools/extra/clang-tidy/abseil
+ - `36`
+ - `36`
+ - `0`
+ - :good:`100%`
+ * - llvm/utils/release/llvm_package_355249/llvm/tools/clang/tools/extra/clang-tidy/android
+ - `29`
+ - `29`
+ - `0`
+ - :good:`100%`
+ * - llvm/utils/release/llvm_package_355249/llvm/tools/clang/tools/extra/clang-tidy/boost
+ - `3`
+ - `3`
+ - `0`
+ - :good:`100%`
+ * - llvm/utils/release/llvm_package_355249/llvm/tools/clang/tools/extra/clang-tidy/bugprone
+ - `81`
+ - `81`
+ - `0`
+ - :good:`100%`
+ * - llvm/utils/release/llvm_package_355249/llvm/tools/clang/tools/extra/clang-tidy/cert
+ - `23`
+ - `23`
+ - `0`
+ - :good:`100%`
+ * - llvm/utils/release/llvm_package_355249/llvm/tools/clang/tools/extra/clang-tidy/cppcoreguidelines
+ - `37`
+ - `37`
+ - `0`
+ - :good:`100%`
+ * - llvm/utils/release/llvm_package_355249/llvm/tools/clang/tools/extra/clang-tidy/fuchsia
+ - `15`
+ - `15`
+ - `0`
+ - :good:`100%`
+ * - llvm/utils/release/llvm_package_355249/llvm/tools/clang/tools/extra/clang-tidy/google
+ - `31`
+ - `31`
+ - `0`
+ - :good:`100%`
+ * - llvm/utils/release/llvm_package_355249/llvm/tools/clang/tools/extra/clang-tidy/hicpp
+ - `9`
+ - `9`
+ - `0`
+ - :good:`100%`
+ * - llvm/utils/release/llvm_package_355249/llvm/tools/clang/tools/extra/clang-tidy/llvm
+ - `7`
+ - `7`
+ - `0`
+ - :good:`100%`
+ * - llvm/utils/release/llvm_package_355249/llvm/tools/clang/tools/extra/clang-tidy/misc
+ - `27`
+ - `27`
+ - `0`
+ - :good:`100%`
+ * - llvm/utils/release/llvm_package_355249/llvm/tools/clang/tools/extra/clang-tidy/modernize
+ - `63`
+ - `63`
+ - `0`
+ - :good:`100%`
+ * - llvm/utils/release/llvm_package_355249/llvm/tools/clang/tools/extra/clang-tidy/mpi
+ - `5`
+ - `5`
+ - `0`
+ - :good:`100%`
+ * - llvm/utils/release/llvm_package_355249/llvm/tools/clang/tools/extra/clang-tidy/objc
+ - `9`
+ - `9`
+ - `0`
+ - :good:`100%`
+ * - llvm/utils/release/llvm_package_355249/llvm/tools/clang/tools/extra/clang-tidy/performance
+ - `25`
+ - `25`
+ - `0`
+ - :good:`100%`
+ * - llvm/utils/release/llvm_package_355249/llvm/tools/clang/tools/extra/clang-tidy/plugin
+ - `1`
+ - `1`
+ - `0`
+ - :good:`100%`
+ * - llvm/utils/release/llvm_package_355249/llvm/tools/clang/tools/extra/clang-tidy/portability
+ - `3`
+ - `3`
+ - `0`
+ - :good:`100%`
+ * - llvm/utils/release/llvm_package_355249/llvm/tools/clang/tools/extra/clang-tidy/readability
+ - `67`
+ - `67`
+ - `0`
+ - :good:`100%`
+ * - llvm/utils/release/llvm_package_355249/llvm/tools/clang/tools/extra/clang-tidy/tool
+ - `1`
+ - `1`
+ - `0`
+ - :good:`100%`
+ * - llvm/utils/release/llvm_package_355249/llvm/tools/clang/tools/extra/clang-tidy/utils
+ - `29`
+ - `29`
+ - `0`
+ - :good:`100%`
+ * - llvm/utils/release/llvm_package_355249/llvm/tools/clang/tools/extra/clang-tidy/zircon
+ - `3`
+ - `3`
+ - `0`
+ - :good:`100%`
+ * - llvm/utils/release/llvm_package_355249/llvm/tools/clang/tools/extra/clangd
+ - `66`
+ - `66`
+ - `0`
+ - :good:`100%`
+ * - llvm/utils/release/llvm_package_355249/llvm/tools/clang/tools/extra/clangd/benchmarks
+ - `1`
+ - `1`
+ - `0`
+ - :good:`100%`
+ * - llvm/utils/release/llvm_package_355249/llvm/tools/clang/tools/extra/clangd/fuzzer
+ - `1`
+ - `1`
+ - `0`
+ - :good:`100%`
+ * - llvm/utils/release/llvm_package_355249/llvm/tools/clang/tools/extra/clangd/index
+ - `30`
+ - `30`
+ - `0`
+ - :good:`100%`
+ * - llvm/utils/release/llvm_package_355249/llvm/tools/clang/tools/extra/clangd/index/dex
+ - `9`
+ - `9`
+ - `0`
+ - :good:`100%`
+ * - llvm/utils/release/llvm_package_355249/llvm/tools/clang/tools/extra/clangd/index/dex/dexp
+ - `1`
+ - `1`
+ - `0`
+ - :good:`100%`
+ * - llvm/utils/release/llvm_package_355249/llvm/tools/clang/tools/extra/clangd/indexer
+ - `1`
+ - `1`
+ - `0`
+ - :good:`100%`
+ * - llvm/utils/release/llvm_package_355249/llvm/tools/clang/tools/extra/clangd/refactor
+ - `2`
+ - `2`
+ - `0`
+ - :good:`100%`
+ * - llvm/utils/release/llvm_package_355249/llvm/tools/clang/tools/extra/clangd/refactor/tweaks
+ - `1`
+ - `1`
+ - `0`
+ - :good:`100%`
+ * - llvm/utils/release/llvm_package_355249/llvm/tools/clang/tools/extra/clangd/tool
+ - `1`
+ - `1`
+ - `0`
+ - :good:`100%`
+ * - llvm/utils/release/llvm_package_355249/llvm/tools/clang/tools/extra/clangd/xpc
+ - `3`
+ - `3`
+ - `0`
+ - :good:`100%`
+ * - llvm/utils/release/llvm_package_355249/llvm/tools/clang/tools/extra/clangd/xpc/framework
+ - `1`
+ - `1`
+ - `0`
+ - :good:`100%`
+ * - llvm/utils/release/llvm_package_355249/llvm/tools/clang/tools/extra/clangd/xpc/test-client
+ - `1`
+ - `1`
+ - `0`
+ - :good:`100%`
+ * - llvm/utils/release/llvm_package_355249/llvm/tools/clang/tools/extra/include-fixer
+ - `13`
+ - `13`
+ - `0`
+ - :good:`100%`
+ * - llvm/utils/release/llvm_package_355249/llvm/tools/clang/tools/extra/include-fixer/find-all-symbols
+ - `17`
+ - `17`
+ - `0`
+ - :good:`100%`
+ * - llvm/utils/release/llvm_package_355249/llvm/tools/clang/tools/extra/include-fixer/find-all-symbols/tool
+ - `1`
+ - `1`
+ - `0`
+ - :good:`100%`
+ * - llvm/utils/release/llvm_package_355249/llvm/tools/clang/tools/extra/include-fixer/plugin
+ - `1`
+ - `1`
+ - `0`
+ - :good:`100%`
+ * - llvm/utils/release/llvm_package_355249/llvm/tools/clang/tools/extra/include-fixer/tool
+ - `1`
+ - `1`
+ - `0`
+ - :good:`100%`
+ * - llvm/utils/release/llvm_package_355249/llvm/tools/clang/tools/extra/modularize
+ - `9`
+ - `9`
+ - `0`
+ - :good:`100%`
+ * - llvm/utils/release/llvm_package_355249/llvm/tools/clang/tools/extra/pp-trace
+ - `3`
+ - `3`
+ - `0`
+ - :good:`100%`
+ * - llvm/utils/release/llvm_package_355249/llvm/tools/clang/tools/extra/tool-template
+ - `1`
+ - `1`
+ - `0`
+ - :good:`100%`
+ * - llvm/utils/release/llvm_package_355249/llvm/tools/clang/tools/extra/unittests/change-namespace
+ - `1`
+ - `1`
+ - `0`
+ - :good:`100%`
+ * - llvm/utils/release/llvm_package_355249/llvm/tools/clang/tools/extra/unittests/clang-apply-replacements
+ - `1`
+ - `1`
+ - `0`
+ - :good:`100%`
+ * - llvm/utils/release/llvm_package_355249/llvm/tools/clang/tools/extra/unittests/clang-doc
+ - `7`
+ - `7`
+ - `0`
+ - :good:`100%`
+ * - llvm/utils/release/llvm_package_355249/llvm/tools/clang/tools/extra/unittests/clang-move
+ - `1`
+ - `1`
+ - `0`
+ - :good:`100%`
+ * - llvm/utils/release/llvm_package_355249/llvm/tools/clang/tools/extra/unittests/clang-query
+ - `2`
+ - `2`
+ - `0`
+ - :good:`100%`
+ * - llvm/utils/release/llvm_package_355249/llvm/tools/clang/tools/extra/unittests/clang-tidy
+ - `11`
+ - `11`
+ - `0`
+ - :good:`100%`
+ * - llvm/utils/release/llvm_package_355249/llvm/tools/clang/tools/extra/unittests/clangd
+ - `47`
+ - `47`
+ - `0`
+ - :good:`100%`
+ * - llvm/utils/release/llvm_package_355249/llvm/tools/clang/tools/extra/unittests/clangd/xpc
+ - `1`
+ - `1`
+ - `0`
+ - :good:`100%`
+ * - llvm/utils/release/llvm_package_355249/llvm/tools/clang/tools/extra/unittests/include/common
+ - `1`
+ - `1`
+ - `0`
+ - :good:`100%`
+ * - llvm/utils/release/llvm_package_355249/llvm/tools/clang/tools/extra/unittests/include-fixer
+ - `2`
+ - `2`
+ - `0`
+ - :good:`100%`
+ * - llvm/utils/release/llvm_package_355249/llvm/tools/clang/tools/extra/unittests/include-fixer/find-all-symbols
+ - `1`
+ - `1`
+ - `0`
+ - :good:`100%`
+ * - llvm/utils/TableGen
+ - `75`
+ - `9`
+ - `66`
+ - :part:`12%`
+ * - llvm/utils/TableGen/GlobalISel
+ - `17`
+ - `8`
+ - `9`
+ - :part:`47%`
+ * - llvm/utils/unittest/googlemock/include/gmock
+ - `11`
+ - `0`
+ - `11`
+ - :none:`0%`
+ * - llvm/utils/unittest/googlemock/include/gmock/internal
+ - `3`
+ - `0`
+ - `3`
+ - :none:`0%`
+ * - llvm/utils/unittest/googlemock/include/gmock/internal/custom
+ - `3`
+ - `0`
+ - `3`
+ - :none:`0%`
+ * - llvm/utils/unittest/googletest/include/gtest
+ - `10`
+ - `0`
+ - `10`
+ - :none:`0%`
+ * - llvm/utils/unittest/googletest/include/gtest/internal
+ - `11`
+ - `0`
+ - `11`
+ - :none:`0%`
+ * - llvm/utils/unittest/googletest/include/gtest/internal/custom
+ - `4`
+ - `0`
+ - `4`
+ - :none:`0%`
+ * - llvm/utils/unittest/googletest/src
+ - `1`
+ - `0`
+ - `1`
+ - :none:`0%`
+ * - llvm/utils/unittest/UnitTestMain
+ - `1`
+ - `0`
+ - `1`
+ - :none:`0%`
+ * - llvm/utils/yaml-bench
+ - `1`
+ - `0`
+ - `1`
+ - :none:`0%`
+ * - mlir/examples/standalone/include/Standalone
+ - `2`
+ - `2`
+ - `0`
+ - :good:`100%`
+ * - mlir/examples/standalone/lib/Standalone
+ - `2`
+ - `2`
+ - `0`
+ - :good:`100%`
+ * - mlir/examples/standalone/standalone-opt
+ - `1`
+ - `1`
+ - `0`
+ - :good:`100%`
+ * - mlir/examples/standalone/standalone-translate
+ - `1`
+ - `1`
+ - `0`
+ - :good:`100%`
+ * - mlir/examples/toy/Ch1
+ - `1`
+ - `1`
+ - `0`
+ - :good:`100%`
+ * - mlir/examples/toy/Ch1/include/toy
+ - `3`
+ - `3`
+ - `0`
+ - :good:`100%`
+ * - mlir/examples/toy/Ch1/parser
+ - `1`
+ - `0`
+ - `1`
+ - :none:`0%`
+ * - mlir/examples/toy/Ch2
+ - `1`
+ - `1`
+ - `0`
+ - :good:`100%`
+ * - mlir/examples/toy/Ch2/include/toy
+ - `5`
+ - `5`
+ - `0`
+ - :good:`100%`
+ * - mlir/examples/toy/Ch2/mlir
+ - `2`
+ - `2`
+ - `0`
+ - :good:`100%`
+ * - mlir/examples/toy/Ch2/parser
+ - `1`
+ - `0`
+ - `1`
+ - :none:`0%`
+ * - mlir/examples/toy/Ch3
+ - `1`
+ - `1`
+ - `0`
+ - :good:`100%`
+ * - mlir/examples/toy/Ch3/include/toy
+ - `5`
+ - `5`
+ - `0`
+ - :good:`100%`
+ * - mlir/examples/toy/Ch3/mlir
+ - `3`
+ - `3`
+ - `0`
+ - :good:`100%`
+ * - mlir/examples/toy/Ch3/parser
+ - `1`
+ - `0`
+ - `1`
+ - :none:`0%`
+ * - mlir/examples/toy/Ch4
+ - `1`
+ - `1`
+ - `0`
+ - :good:`100%`
+ * - mlir/examples/toy/Ch4/include/toy
+ - `7`
+ - `7`
+ - `0`
+ - :good:`100%`
+ * - mlir/examples/toy/Ch4/mlir
+ - `4`
+ - `4`
+ - `0`
+ - :good:`100%`
+ * - mlir/examples/toy/Ch4/parser
+ - `1`
+ - `0`
+ - `1`
+ - :none:`0%`
+ * - mlir/examples/toy/Ch5
+ - `1`
+ - `1`
+ - `0`
+ - :good:`100%`
+ * - mlir/examples/toy/Ch5/include/toy
+ - `7`
+ - `7`
+ - `0`
+ - :good:`100%`
+ * - mlir/examples/toy/Ch5/mlir
+ - `5`
+ - `4`
+ - `1`
+ - :part:`80%`
+ * - mlir/examples/toy/Ch5/parser
+ - `1`
+ - `0`
+ - `1`
+ - :none:`0%`
+ * - mlir/examples/toy/Ch6
+ - `1`
+ - `1`
+ - `0`
+ - :good:`100%`
+ * - mlir/examples/toy/Ch6/include/toy
+ - `7`
+ - `7`
+ - `0`
+ - :good:`100%`
+ * - mlir/examples/toy/Ch6/mlir
+ - `6`
+ - `5`
+ - `1`
+ - :part:`83%`
+ * - mlir/examples/toy/Ch6/parser
+ - `1`
+ - `0`
+ - `1`
+ - :none:`0%`
+ * - mlir/examples/toy/Ch7
+ - `1`
+ - `1`
+ - `0`
+ - :good:`100%`
+ * - mlir/examples/toy/Ch7/include/toy
+ - `7`
+ - `7`
+ - `0`
+ - :good:`100%`
+ * - mlir/examples/toy/Ch7/mlir
+ - `6`
+ - `5`
+ - `1`
+ - :part:`83%`
+ * - mlir/examples/toy/Ch7/parser
+ - `1`
+ - `0`
+ - `1`
+ - :none:`0%`
+ * - mlir/include/mlir
+ - `5`
+ - `5`
+ - `0`
+ - :good:`100%`
+ * - mlir/include/mlir/Analysis
+ - `8`
+ - `7`
+ - `1`
+ - :part:`87%`
+ * - mlir/include/mlir/Conversion/AffineToStandard
+ - `1`
+ - `1`
+ - `0`
+ - :good:`100%`
+ * - mlir/include/mlir/Conversion/AVX512ToLLVM
+ - `1`
+ - `0`
+ - `1`
+ - :none:`0%`
+ * - mlir/include/mlir/Conversion/GPUCommon
+ - `1`
+ - `1`
+ - `0`
+ - :good:`100%`
+ * - mlir/include/mlir/Conversion/GPUToNVVM
+ - `1`
+ - `0`
+ - `1`
+ - :none:`0%`
+ * - mlir/include/mlir/Conversion/GPUToROCDL
+ - `1`
+ - `1`
+ - `0`
+ - :good:`100%`
+ * - mlir/include/mlir/Conversion/GPUToSPIRV
+ - `2`
+ - `1`
+ - `1`
+ - :part:`50%`
+ * - mlir/include/mlir/Conversion/GPUToVulkan
+ - `1`
+ - `0`
+ - `1`
+ - :none:`0%`
+ * - mlir/include/mlir/Conversion/LinalgToLLVM
+ - `1`
+ - `0`
+ - `1`
+ - :none:`0%`
+ * - mlir/include/mlir/Conversion/LinalgToSPIRV
+ - `2`
+ - `2`
+ - `0`
+ - :good:`100%`
+ * - mlir/include/mlir/Conversion/LinalgToStandard
+ - `1`
+ - `1`
+ - `0`
+ - :good:`100%`
+ * - mlir/include/mlir/Conversion/SCFToGPU
+ - `2`
+ - `2`
+ - `0`
+ - :good:`100%`
+ * - mlir/include/mlir/Conversion/SCFToStandard
+ - `1`
+ - `1`
+ - `0`
+ - :good:`100%`
+ * - mlir/include/mlir/Conversion/ShapeToSCF
+ - `1`
+ - `1`
+ - `0`
+ - :good:`100%`
+ * - mlir/include/mlir/Conversion/ShapeToStandard
+ - `1`
+ - `1`
+ - `0`
+ - :good:`100%`
+ * - mlir/include/mlir/Conversion/SPIRVToLLVM
+ - `2`
+ - `2`
+ - `0`
+ - :good:`100%`
+ * - mlir/include/mlir/Conversion/StandardToLLVM
+ - `2`
+ - `1`
+ - `1`
+ - :part:`50%`
+ * - mlir/include/mlir/Conversion/StandardToSPIRV
+ - `2`
+ - `2`
+ - `0`
+ - :good:`100%`
+ * - mlir/include/mlir/Conversion/VectorToLLVM
+ - `1`
+ - `1`
+ - `0`
+ - :good:`100%`
+ * - mlir/include/mlir/Conversion/VectorToROCDL
+ - `1`
+ - `1`
+ - `0`
+ - :good:`100%`
+ * - mlir/include/mlir/Conversion/VectorToSCF
+ - `1`
+ - `1`
+ - `0`
+ - :good:`100%`
+ * - mlir/include/mlir/Dialect
+ - `2`
+ - `2`
+ - `0`
+ - :good:`100%`
+ * - mlir/include/mlir/Dialect/Affine
+ - `2`
+ - `1`
+ - `1`
+ - :part:`50%`
+ * - mlir/include/mlir/Dialect/Affine/EDSC
+ - `2`
+ - `2`
+ - `0`
+ - :good:`100%`
+ * - mlir/include/mlir/Dialect/Affine/IR
+ - `3`
+ - `3`
+ - `0`
+ - :good:`100%`
+ * - mlir/include/mlir/Dialect/AVX512
+ - `1`
+ - `1`
+ - `0`
+ - :good:`100%`
+ * - mlir/include/mlir/Dialect/GPU
+ - `5`
+ - `4`
+ - `1`
+ - :part:`80%`
+ * - mlir/include/mlir/Dialect/Linalg
+ - `1`
+ - `0`
+ - `1`
+ - :none:`0%`
+ * - mlir/include/mlir/Dialect/Linalg/Analysis
+ - `1`
+ - `1`
+ - `0`
+ - :good:`100%`
+ * - mlir/include/mlir/Dialect/Linalg/EDSC
+ - `3`
+ - `3`
+ - `0`
+ - :good:`100%`
+ * - mlir/include/mlir/Dialect/Linalg/IR
+ - `3`
+ - `2`
+ - `1`
+ - :part:`66%`
+ * - mlir/include/mlir/Dialect/Linalg/Transforms
+ - `2`
+ - `1`
+ - `1`
+ - :part:`50%`
+ * - mlir/include/mlir/Dialect/Linalg/Utils
+ - `1`
+ - `1`
+ - `0`
+ - :good:`100%`
+ * - mlir/include/mlir/Dialect/LLVMIR
+ - `4`
+ - `4`
+ - `0`
+ - :good:`100%`
+ * - mlir/include/mlir/Dialect/LLVMIR/Transforms
+ - `1`
+ - `1`
+ - `0`
+ - :good:`100%`
+ * - mlir/include/mlir/Dialect/OpenMP
+ - `1`
+ - `1`
+ - `0`
+ - :good:`100%`
+ * - mlir/include/mlir/Dialect/Quant
+ - `6`
+ - `5`
+ - `1`
+ - :part:`83%`
+ * - mlir/include/mlir/Dialect/SCF
+ - `4`
+ - `4`
+ - `0`
+ - :good:`100%`
+ * - mlir/include/mlir/Dialect/SCF/EDSC
+ - `2`
+ - `2`
+ - `0`
+ - :good:`100%`
+ * - mlir/include/mlir/Dialect/SDBM
+ - `3`
+ - `2`
+ - `1`
+ - :part:`66%`
+ * - mlir/include/mlir/Dialect/Shape/IR
+ - `1`
+ - `1`
+ - `0`
+ - :good:`100%`
+ * - mlir/include/mlir/Dialect/Shape/Transforms
+ - `1`
+ - `1`
+ - `0`
+ - :good:`100%`
+ * - mlir/include/mlir/Dialect/SPIRV
+ - `11`
+ - `10`
+ - `1`
+ - :part:`90%`
+ * - mlir/include/mlir/Dialect/StandardOps/EDSC
+ - `2`
+ - `2`
+ - `0`
+ - :good:`100%`
+ * - mlir/include/mlir/Dialect/StandardOps/IR
+ - `1`
+ - `1`
+ - `0`
+ - :good:`100%`
+ * - mlir/include/mlir/Dialect/StandardOps/Transforms
+ - `2`
+ - `2`
+ - `0`
+ - :good:`100%`
+ * - mlir/include/mlir/Dialect/Utils
+ - `1`
+ - `1`
+ - `0`
+ - :good:`100%`
+ * - mlir/include/mlir/Dialect/Vector
+ - `3`
+ - `3`
+ - `0`
+ - :good:`100%`
+ * - mlir/include/mlir/Dialect/Vector/EDSC
+ - `2`
+ - `2`
+ - `0`
+ - :good:`100%`
+ * - mlir/include/mlir/EDSC
+ - `1`
+ - `1`
+ - `0`
+ - :good:`100%`
+ * - mlir/include/mlir/ExecutionEngine
+ - `5`
+ - `2`
+ - `3`
+ - :part:`40%`
+ * - mlir/include/mlir/Interfaces
+ - `7`
+ - `6`
+ - `1`
+ - :part:`85%`
+ * - mlir/include/mlir/IR
+ - `42`
+ - `9`
+ - `33`
+ - :part:`21%`
+ * - mlir/include/mlir/Pass
+ - `6`
+ - `0`
+ - `6`
+ - :none:`0%`
+ * - mlir/include/mlir/Support
+ - `10`
+ - `4`
+ - `6`
+ - :part:`40%`
+ * - mlir/include/mlir/TableGen
+ - `18`
+ - `17`
+ - `1`
+ - :part:`94%`
+ * - mlir/include/mlir/Target
+ - `3`
+ - `3`
+ - `0`
+ - :good:`100%`
+ * - mlir/include/mlir/Target/LLVMIR
+ - `1`
+ - `1`
+ - `0`
+ - :good:`100%`
+ * - mlir/include/mlir/Transforms
+ - `12`
+ - `7`
+ - `5`
+ - :part:`58%`
+ * - mlir/include/mlir-c
+ - `1`
+ - `1`
+ - `0`
+ - :good:`100%`
+ * - mlir/lib/Analysis
+ - `8`
+ - `7`
+ - `1`
+ - :part:`87%`
+ * - mlir/lib/Conversion
+ - `1`
+ - `1`
+ - `0`
+ - :good:`100%`
+ * - mlir/lib/Conversion/AffineToStandard
+ - `1`
+ - `0`
+ - `1`
+ - :none:`0%`
+ * - mlir/lib/Conversion/AVX512ToLLVM
+ - `1`
+ - `1`
+ - `0`
+ - :good:`100%`
+ * - mlir/lib/Conversion/GPUCommon
+ - `5`
+ - `5`
+ - `0`
+ - :good:`100%`
+ * - mlir/lib/Conversion/GPUToNVVM
+ - `1`
+ - `0`
+ - `1`
+ - :none:`0%`
+ * - mlir/lib/Conversion/GPUToROCDL
+ - `1`
+ - `1`
+ - `0`
+ - :good:`100%`
+ * - mlir/lib/Conversion/GPUToSPIRV
+ - `2`
+ - `2`
+ - `0`
+ - :good:`100%`
+ * - mlir/lib/Conversion/GPUToVulkan
+ - `2`
+ - `2`
+ - `0`
+ - :good:`100%`
+ * - mlir/lib/Conversion/LinalgToLLVM
+ - `1`
+ - `1`
+ - `0`
+ - :good:`100%`
+ * - mlir/lib/Conversion/LinalgToSPIRV
+ - `2`
+ - `2`
+ - `0`
+ - :good:`100%`
+ * - mlir/lib/Conversion/LinalgToStandard
+ - `1`
+ - `1`
+ - `0`
+ - :good:`100%`
+ * - mlir/lib/Conversion/SCFToGPU
+ - `2`
+ - `2`
+ - `0`
+ - :good:`100%`
+ * - mlir/lib/Conversion/SCFToStandard
+ - `1`
+ - `1`
+ - `0`
+ - :good:`100%`
+ * - mlir/lib/Conversion/ShapeToSCF
+ - `1`
+ - `1`
+ - `0`
+ - :good:`100%`
+ * - mlir/lib/Conversion/ShapeToStandard
+ - `1`
+ - `1`
+ - `0`
+ - :good:`100%`
+ * - mlir/lib/Conversion/SPIRVToLLVM
+ - `2`
+ - `1`
+ - `1`
+ - :part:`50%`
+ * - mlir/lib/Conversion/StandardToLLVM
+ - `1`
+ - `1`
+ - `0`
+ - :good:`100%`
+ * - mlir/lib/Conversion/StandardToSPIRV
+ - `3`
+ - `3`
+ - `0`
+ - :good:`100%`
+ * - mlir/lib/Conversion/VectorToLLVM
+ - `1`
+ - `1`
+ - `0`
+ - :good:`100%`
+ * - mlir/lib/Conversion/VectorToROCDL
+ - `1`
+ - `1`
+ - `0`
+ - :good:`100%`
+ * - mlir/lib/Conversion/VectorToSCF
+ - `1`
+ - `1`
+ - `0`
+ - :good:`100%`
+ * - mlir/lib/Dialect
+ - `1`
+ - `1`
+ - `0`
+ - :good:`100%`
+ * - mlir/lib/Dialect/Affine/EDSC
+ - `1`
+ - `1`
+ - `0`
+ - :good:`100%`
+ * - mlir/lib/Dialect/Affine/IR
+ - `3`
+ - `3`
+ - `0`
+ - :good:`100%`
+ * - mlir/lib/Dialect/Affine/Transforms
+ - `8`
+ - `8`
+ - `0`
+ - :good:`100%`
+ * - mlir/lib/Dialect/Affine/Utils
+ - `1`
+ - `1`
+ - `0`
+ - :good:`100%`
+ * - mlir/lib/Dialect/AVX512/IR
+ - `1`
+ - `0`
+ - `1`
+ - :none:`0%`
+ * - mlir/lib/Dialect/GPU/IR
+ - `1`
+ - `0`
+ - `1`
+ - :none:`0%`
+ * - mlir/lib/Dialect/GPU/Transforms
+ - `5`
+ - `4`
+ - `1`
+ - :part:`80%`
+ * - mlir/lib/Dialect/Linalg/Analysis
+ - `1`
+ - `0`
+ - `1`
+ - :none:`0%`
+ * - mlir/lib/Dialect/Linalg/EDSC
+ - `1`
+ - `1`
+ - `0`
+ - :good:`100%`
+ * - mlir/lib/Dialect/Linalg/IR
+ - `2`
+ - `2`
+ - `0`
+ - :good:`100%`
+ * - mlir/lib/Dialect/Linalg/Transforms
+ - `11`
+ - `10`
+ - `1`
+ - :part:`90%`
+ * - mlir/lib/Dialect/Linalg/Utils
+ - `1`
+ - `1`
+ - `0`
+ - :good:`100%`
+ * - mlir/lib/Dialect/LLVMIR/IR
+ - `4`
+ - `1`
+ - `3`
+ - :part:`25%`
+ * - mlir/lib/Dialect/LLVMIR/Transforms
+ - `2`
+ - `2`
+ - `0`
+ - :good:`100%`
+ * - mlir/lib/Dialect/OpenMP/IR
+ - `1`
+ - `1`
+ - `0`
+ - :good:`100%`
+ * - mlir/lib/Dialect/Quant/IR
+ - `4`
+ - `4`
+ - `0`
+ - :good:`100%`
+ * - mlir/lib/Dialect/Quant/Transforms
+ - `3`
+ - `3`
+ - `0`
+ - :good:`100%`
+ * - mlir/lib/Dialect/Quant/Utils
+ - `3`
+ - `3`
+ - `0`
+ - :good:`100%`
+ * - mlir/lib/Dialect/SCF
+ - `1`
+ - `1`
+ - `0`
+ - :good:`100%`
+ * - mlir/lib/Dialect/SCF/EDSC
+ - `1`
+ - `1`
+ - `0`
+ - :good:`100%`
+ * - mlir/lib/Dialect/SCF/Transforms
+ - `5`
+ - `5`
+ - `0`
+ - :good:`100%`
+ * - mlir/lib/Dialect/SDBM
+ - `4`
+ - `4`
+ - `0`
+ - :good:`100%`
+ * - mlir/lib/Dialect/Shape/IR
+ - `1`
+ - `1`
+ - `0`
+ - :good:`100%`
+ * - mlir/lib/Dialect/Shape/Transforms
+ - `3`
+ - `3`
+ - `0`
+ - :good:`100%`
+ * - mlir/lib/Dialect/SPIRV
+ - `8`
+ - `6`
+ - `2`
+ - :part:`75%`
+ * - mlir/lib/Dialect/SPIRV/Serialization
+ - `4`
+ - `2`
+ - `2`
+ - :part:`50%`
+ * - mlir/lib/Dialect/SPIRV/Transforms
+ - `5`
+ - `5`
+ - `0`
+ - :good:`100%`
+ * - mlir/lib/Dialect/StandardOps/EDSC
+ - `2`
+ - `2`
+ - `0`
+ - :good:`100%`
+ * - mlir/lib/Dialect/StandardOps/IR
+ - `1`
+ - `1`
+ - `0`
+ - :good:`100%`
+ * - mlir/lib/Dialect/StandardOps/Transforms
+ - `4`
+ - `4`
+ - `0`
+ - :good:`100%`
+ * - mlir/lib/Dialect/Vector
+ - `3`
+ - `2`
+ - `1`
+ - :part:`66%`
+ * - mlir/lib/Dialect/Vector/EDSC
+ - `1`
+ - `1`
+ - `0`
+ - :good:`100%`
+ * - mlir/lib/EDSC
+ - `2`
+ - `1`
+ - `1`
+ - :part:`50%`
+ * - mlir/lib/ExecutionEngine
+ - `5`
+ - `5`
+ - `0`
+ - :good:`100%`
+ * - mlir/lib/Interfaces
+ - `7`
+ - `7`
+ - `0`
+ - :good:`100%`
+ * - mlir/lib/IR
+ - `32`
+ - `32`
+ - `0`
+ - :good:`100%`
+ * - mlir/lib/Parser
+ - `12`
+ - `12`
+ - `0`
+ - :good:`100%`
+ * - mlir/lib/Pass
+ - `7`
+ - `6`
+ - `1`
+ - :part:`85%`
+ * - mlir/lib/Support
+ - `4`
+ - `4`
+ - `0`
+ - :good:`100%`
+ * - mlir/lib/TableGen
+ - `16`
+ - `16`
+ - `0`
+ - :good:`100%`
+ * - mlir/lib/Target/LLVMIR
+ - `8`
+ - `8`
+ - `0`
+ - :good:`100%`
+ * - mlir/lib/Transforms
+ - `19`
+ - `16`
+ - `3`
+ - :part:`84%`
+ * - mlir/lib/Transforms/Utils
+ - `7`
+ - `6`
+ - `1`
+ - :part:`85%`
+ * - mlir/lib/Translation
+ - `1`
+ - `1`
+ - `0`
+ - :good:`100%`
+ * - mlir/tools/mlir-cpu-runner
+ - `1`
+ - `1`
+ - `0`
+ - :good:`100%`
+ * - mlir/tools/mlir-cuda-runner
+ - `2`
+ - `2`
+ - `0`
+ - :good:`100%`
+ * - mlir/tools/mlir-linalg-ods-gen
+ - `1`
+ - `1`
+ - `0`
+ - :good:`100%`
+ * - mlir/tools/mlir-opt
+ - `1`
+ - `0`
+ - `1`
+ - :none:`0%`
+ * - mlir/tools/mlir-rocm-runner
+ - `2`
+ - `2`
+ - `0`
+ - :good:`100%`
+ * - mlir/tools/mlir-shlib
+ - `1`
+ - `1`
+ - `0`
+ - :good:`100%`
+ * - mlir/tools/mlir-tblgen
+ - `16`
+ - `16`
+ - `0`
+ - :good:`100%`
+ * - mlir/tools/mlir-translate
+ - `1`
+ - `1`
+ - `0`
+ - :good:`100%`
+ * - mlir/tools/mlir-vulkan-runner
+ - `4`
+ - `4`
+ - `0`
+ - :good:`100%`
+ * - mlir/unittests/Dialect
+ - `1`
+ - `1`
+ - `0`
+ - :good:`100%`
+ * - mlir/unittests/Dialect/Quant
+ - `1`
+ - `1`
+ - `0`
+ - :good:`100%`
+ * - mlir/unittests/Dialect/SPIRV
+ - `2`
+ - `2`
+ - `0`
+ - :good:`100%`
+ * - mlir/unittests/IR
+ - `3`
+ - `3`
+ - `0`
+ - :good:`100%`
+ * - mlir/unittests/Pass
+ - `1`
+ - `1`
+ - `0`
+ - :good:`100%`
+ * - mlir/unittests/SDBM
+ - `1`
+ - `1`
+ - `0`
+ - :good:`100%`
+ * - mlir/unittests/TableGen
+ - `3`
+ - `3`
+ - `0`
+ - :good:`100%`
+ * - openmp/libomptarget/deviceRTLs
+ - `1`
+ - `0`
+ - `1`
+ - :none:`0%`
+ * - openmp/libomptarget/deviceRTLs/amdgcn/src
+ - `3`
+ - `3`
+ - `0`
+ - :good:`100%`
+ * - openmp/libomptarget/deviceRTLs/common
+ - `8`
+ - `4`
+ - `4`
+ - :part:`50%`
+ * - openmp/libomptarget/deviceRTLs/nvptx/src
+ - `2`
+ - `1`
+ - `1`
+ - :part:`50%`
+ * - openmp/libomptarget/include
+ - `2`
+ - `1`
+ - `1`
+ - :part:`50%`
+ * - openmp/libomptarget/plugins/cuda/src
+ - `1`
+ - `0`
+ - `1`
+ - :none:`0%`
+ * - openmp/libomptarget/plugins/generic-elf-64bit/src
+ - `1`
+ - `0`
+ - `1`
+ - :none:`0%`
+ * - openmp/libomptarget/plugins/ve/src
+ - `1`
+ - `0`
+ - `1`
+ - :none:`0%`
+ * - openmp/libomptarget/src
+ - `8`
+ - `0`
+ - `8`
+ - :none:`0%`
+ * - openmp/runtime/doc/doxygen
+ - `1`
+ - `0`
+ - `1`
+ - :none:`0%`
+ * - openmp/runtime/src
+ - `74`
+ - `37`
+ - `37`
+ - :part:`50%`
+ * - openmp/runtime/src/thirdparty/ittnotify
+ - `6`
+ - `0`
+ - `6`
+ - :none:`0%`
+ * - openmp/runtime/src/thirdparty/ittnotify/legacy
+ - `1`
+ - `0`
+ - `1`
+ - :none:`0%`
+ * - openmp/tools/archer
+ - `1`
+ - `0`
+ - `1`
+ - :none:`0%`
+ * - openmp/tools/archer/tests/ompt
+ - `1`
+ - `1`
+ - `0`
+ - :good:`100%`
+ * - openmp/tools/multiplex
+ - `1`
+ - `1`
+ - `0`
+ - :good:`100%`
+ * - openmp/tools/multiplex/tests
+ - `1`
+ - `1`
+ - `0`
+ - :good:`100%`
+ * - openmp/tools/multiplex/tests/custom_data_storage
+ - `2`
+ - `2`
+ - `0`
+ - :good:`100%`
+ * - openmp/tools/multiplex/tests/print
+ - `2`
+ - `2`
+ - `0`
+ - :good:`100%`
+ * - parallel-libs/acxxel
+ - `6`
+ - `4`
+ - `2`
+ - :part:`66%`
+ * - parallel-libs/acxxel/examples
+ - `1`
+ - `1`
+ - `0`
+ - :good:`100%`
+ * - parallel-libs/acxxel/tests
+ - `5`
+ - `4`
+ - `1`
+ - :part:`80%`
+ * - polly/include/polly
+ - `22`
+ - `22`
+ - `0`
+ - :good:`100%`
+ * - polly/include/polly/CodeGen
+ - `14`
+ - `14`
+ - `0`
+ - :good:`100%`
+ * - polly/include/polly/Support
+ - `11`
+ - `11`
+ - `0`
+ - :good:`100%`
+ * - polly/lib/Analysis
+ - `9`
+ - `9`
+ - `0`
+ - :good:`100%`
+ * - polly/lib/CodeGen
+ - `15`
+ - `15`
+ - `0`
+ - :good:`100%`
+ * - polly/lib/Exchange
+ - `1`
+ - `1`
+ - `0`
+ - :good:`100%`
+ * - polly/lib/External/isl
+ - `67`
+ - `1`
+ - `66`
+ - :part:`1%`
+ * - polly/lib/External/isl/imath
+ - `3`
+ - `0`
+ - `3`
+ - :none:`0%`
+ * - polly/lib/External/isl/imath_wrap
+ - `4`
+ - `0`
+ - `4`
+ - :none:`0%`
+ * - polly/lib/External/isl/include/isl
+ - `62`
+ - `8`
+ - `54`
+ - :part:`12%`
+ * - polly/lib/External/isl/interface
+ - `5`
+ - `1`
+ - `4`
+ - :part:`20%`
+ * - polly/lib/External/pet/include
+ - `1`
+ - `0`
+ - `1`
+ - :none:`0%`
+ * - polly/lib/External/ppcg
+ - `17`
+ - `0`
+ - `17`
+ - :none:`0%`
+ * - polly/lib/Plugin
+ - `1`
+ - `1`
+ - `0`
+ - :good:`100%`
+ * - polly/lib/Support
+ - `10`
+ - `10`
+ - `0`
+ - :good:`100%`
+ * - polly/lib/Transform
+ - `14`
+ - `14`
+ - `0`
+ - :good:`100%`
+ * - polly/tools/GPURuntime
+ - `1`
+ - `1`
+ - `0`
+ - :good:`100%`
+ * - polly/unittests/DeLICM
+ - `1`
+ - `1`
+ - `0`
+ - :good:`100%`
+ * - polly/unittests/Flatten
+ - `1`
+ - `1`
+ - `0`
+ - :good:`100%`
+ * - polly/unittests/Isl
+ - `1`
+ - `1`
+ - `0`
+ - :good:`100%`
+ * - polly/unittests/ScheduleOptimizer
+ - `1`
+ - `1`
+ - `0`
+ - :good:`100%`
+ * - polly/unittests/ScopPassManager
+ - `1`
+ - `1`
+ - `0`
+ - :good:`100%`
+ * - polly/unittests/Support
+ - `1`
+ - `1`
+ - `0`
+ - :good:`100%`
+ * - pstl/include/pstl/internal
+ - `22`
+ - `18`
+ - `4`
+ - :part:`81%`
+ * - Total
+ - :total:`14021`
+ - :total:`6759`
+ - :total:`7262`
+ - :total:`48%`
diff --git a/gnu/llvm/clang/docs/ClangPlugins.rst b/gnu/llvm/clang/docs/ClangPlugins.rst
index 23e037e197c..4194491d396 100644
--- a/gnu/llvm/clang/docs/ClangPlugins.rst
+++ b/gnu/llvm/clang/docs/ClangPlugins.rst
@@ -63,6 +63,56 @@ registering it using ``PragmaHandlerRegistry::Add<>``:
static PragmaHandlerRegistry::Add Y("example_pragma","example pragma description");
+Defining attributes
+===================
+
+Plugins can define attributes by declaring a ``ParsedAttrInfo`` and registering
+it using ``ParsedAttrInfoRegister::Add<>``:
+
+.. code-block:: c++
+
+ class ExampleAttrInfo : public ParsedAttrInfo {
+ public:
+ ExampleAttrInfo() {
+ Spellings.push_back({ParsedAttr::AS_GNU,"example"});
+ }
+ AttrHandling handleDeclAttribute(Sema &S, Decl *D,
+ const ParsedAttr &Attr) const override {
+ // Handle the attribute
+ return AttributeApplied;
+ }
+ };
+
+ static ParsedAttrInfoRegistry::Add Z("example_attr","example attribute description");
+
+The members of ``ParsedAttrInfo`` that a plugin attribute must define are:
+
+ * ``Spellings``, which must be populated with every `Spelling
+ `_ of the
+ attribute, each of which consists of an attribute syntax and how the
+ attribute name is spelled for that syntax. If the syntax allows a scope then
+ the spelling must be "scope::attr" if a scope is present or "::attr" if not.
+ * ``handleDeclAttribute``, which is the function that applies the attribute to
+ a declaration. It is responsible for checking that the attribute's arguments
+ are valid, and typically applies the attribute by adding an ``Attr`` to the
+ ``Decl``. It returns either ``AttributeApplied``, to indicate that the
+ attribute was successfully applied, or ``AttributeNotApplied`` if it wasn't.
+
+The members of ``ParsedAttrInfo`` that may need to be defined, depending on the
+attribute, are:
+
+ * ``NumArgs`` and ``OptArgs``, which set the number of required and optional
+ arguments to the attribute.
+ * ``diagAppertainsToDecl``, which checks if the attribute has been used on the
+ right kind of declaration and issues a diagnostic if not.
+ * ``diagLangOpts``, which checks if the attribute is permitted for the current
+ language mode and issues a diagnostic if not.
+ * ``existsInTarget``, which checks if the attribute is permitted for the given
+ target.
+
+To see a working example of an attribute plugin, see `the Attribute.cpp example
+`_.
+
Putting it all together
=======================
diff --git a/gnu/llvm/clang/docs/CommandGuide/clang.rst b/gnu/llvm/clang/docs/CommandGuide/clang.rst
index 8b9f4854691..2dfeafd1817 100644
--- a/gnu/llvm/clang/docs/CommandGuide/clang.rst
+++ b/gnu/llvm/clang/docs/CommandGuide/clang.rst
@@ -1,5 +1,5 @@
-clang, clang++, clang-cpp - the Clang C, C++, and Objective-C compiler
-======================================================================
+clang - the Clang C, C++, and Objective-C compiler
+==================================================
SYNOPSIS
--------
@@ -146,7 +146,7 @@ Language Selection and Mode Options
ISO C 2017 with GNU extensions
- The default C language standard is ``gnu11``, except on PS4, where it is
+ The default C language standard is ``gnu17``, except on PS4, where it is
``gnu99``.
Supported values for the C++ language are:
@@ -246,7 +246,9 @@ Language Selection and Mode Options
.. option:: -ffreestanding
Indicate that the file should be compiled for a freestanding, not a hosted,
- environment.
+ environment. Note that it is assumed that a freestanding environment will
+ additionally provide `memcpy`, `memmove`, `memset` and `memcmp`
+ implementations, as these are needed for efficient codegen for many programs.
.. option:: -fno-builtin
@@ -383,7 +385,7 @@ Code Generation Options
:option:`-Og` Like :option:`-O1`. In future versions, this option might
disable different optimizations in order to improve debuggability.
- :option:`-O` Equivalent to :option:`-O2`.
+ :option:`-O` Equivalent to :option:`-O1`.
:option:`-O4` and higher
@@ -472,6 +474,16 @@ Code Generation Options
optimization. With "thin", :doc:`ThinLTO <../ThinLTO>`
compilation is invoked instead.
+ .. note::
+
+ On Darwin, when using :option:`-flto` along with :option:`-g` and
+ compiling and linking in separate steps, you also need to pass
+ ``-Wl,-object_path_lto,.o`` at the linking step to instruct the
+ ld64 linker not to delete the temporary object file generated during Link
+ Time Optimization (this flag is automatically passed to the linker by Clang
+ if compilation and linking are done in a single step). This allows debugging
+ the executable as well as generating the ``.dSYM`` bundle using :manpage:`dsymutil(1)`.
+
Driver Options
~~~~~~~~~~~~~~
@@ -651,4 +663,4 @@ output of the compiler, along with information to reproduce.
SEE ALSO
--------
-:manpage:`as(1)`, :manpage:`clang-local(1)`, :manpage:`ld(1)`
+:manpage:`as(1)`, :manpage:`ld(1)`
diff --git a/gnu/llvm/clang/docs/ConstantInterpreter.rst b/gnu/llvm/clang/docs/ConstantInterpreter.rst
index a86161c8fa0..eba637585b8 100644
--- a/gnu/llvm/clang/docs/ConstantInterpreter.rst
+++ b/gnu/llvm/clang/docs/ConstantInterpreter.rst
@@ -8,129 +8,256 @@ Constant Interpreter
Introduction
============
-The constexpr interpreter aims to replace the existing tree evaluator in clang, improving performance on constructs which are executed inefficiently by the evaluator. The interpreter is activated using the following flags:
+The constexpr interpreter aims to replace the existing tree evaluator in
+clang, improving performance on constructs which are executed inefficiently
+by the evaluator. The interpreter is activated using the following flags:
-* ``-fexperimental-new-constant-interpreter`` enables the interpreter, emitting an error if an unsupported feature is encountered
+* ``-fexperimental-new-constant-interpreter`` enables the interpreter,
+ emitting an error if an unsupported feature is encountered
Bytecode Compilation
====================
-Bytecode compilation is handled in ``ByteCodeStmtGen.h`` for statements and ``ByteCodeExprGen.h`` for expressions. The compiler has two different backends: one to generate bytecode for functions (``ByteCodeEmitter``) and one to directly evaluate expressions as they are compiled, without generating bytecode (``EvalEmitter``). All functions are compiled to bytecode, while toplevel expressions used in constant contexts are directly evaluated since the bytecode would never be reused. This mechanism aims to pave the way towards replacing the evaluator, improving its performance on functions and loops, while being just as fast on single-use toplevel expressions.
-
-The interpreter relies on stack-based, strongly-typed opcodes. The glue logic between the code generator, along with the enumeration and description of opcodes, can be found in ``Opcodes.td``. The opcodes are implemented as generic template methods in ``Interp.h`` and instantiated with the relevant primitive types by the interpreter loop or by the evaluating emitter.
+Bytecode compilation is handled in ``ByteCodeStmtGen.h`` for statements
+and ``ByteCodeExprGen.h`` for expressions. The compiler has two different
+backends: one to generate bytecode for functions (``ByteCodeEmitter``) and
+one to directly evaluate expressions as they are compiled, without
+generating bytecode (``EvalEmitter``). All functions are compiled to
+bytecode, while toplevel expressions used in constant contexts are directly
+evaluated since the bytecode would never be reused. This mechanism aims to
+pave the way towards replacing the evaluator, improving its performance on
+functions and loops, while being just as fast on single-use toplevel
+expressions.
+
+The interpreter relies on stack-based, strongly-typed opcodes. The glue
+logic between the code generator, along with the enumeration and
+description of opcodes, can be found in ``Opcodes.td``. The opcodes are
+implemented as generic template methods in ``Interp.h`` and instantiated
+with the relevant primitive types by the interpreter loop or by the
+evaluating emitter.
Primitive Types
---------------
* ``PT_{U|S}int{8|16|32|64}``
- Signed or unsigned integers of a specific bit width, implemented using the ```Integral``` type.
+ Signed or unsigned integers of a specific bit width, implemented using
+ the ```Integral``` type.
* ``PT_{U|S}intFP``
- Signed or unsigned integers of an arbitrary, but fixed width used to implement
- integral types which are required by the target, but are not supported by the host.
- Under the hood, they rely on APValue. The ``Integral`` specialisation for these
- types is required by opcodes to share an implementation with fixed integrals.
+ Signed or unsigned integers of an arbitrary, but fixed width used to
+ implement integral types which are required by the target, but are not
+ supported by the host. Under the hood, they rely on APValue. The
+ ``Integral`` specialisation for these types is required by opcodes to
+ share an implementation with fixed integrals.
* ``PT_Bool``
- Representation for boolean types, essentially a 1-bit unsigned ``Integral``.
+ Representation for boolean types, essentially a 1-bit unsigned
+ ``Integral``.
* ``PT_RealFP``
- Arbitrary, but fixed precision floating point numbers. Could be specialised in
- the future similarly to integers in order to improve floating point performance.
+ Arbitrary, but fixed precision floating point numbers. Could be
+ specialised in the future similarly to integers in order to improve
+ floating point performance.
* ``PT_Ptr``
- Pointer type, defined in ``"Pointer.h"``.
+ Pointer type, defined in ``"Pointer.h"``. A pointer can be either null,
+ reference interpreter-allocated memory (``BlockPointer``) or point to an
+ address which can be derived, but not accessed (``ExternPointer``).
* ``PT_FnPtr``
- Function pointer type, can also be a null function pointer. Defined in ``"Pointer.h"``.
+ Function pointer type, can also be a null function pointer. Defined
+ in ``"FnPointer.h"``.
* ``PT_MemPtr``
- Member pointer type, can also be a null member pointer. Defined in ``"Pointer.h"``
+ Member pointer type, can also be a null member pointer. Defined
+ in ``"MemberPointer.h"``
+
+* ``PT_VoidPtr``
+
+ Void pointer type, can be used for rount-trip casts. Represented as
+ the union of all pointers which can be cast to void.
+ Defined in ``"VoidPointer.h"``.
+
+* ``PT_ObjCBlockPtr``
+
+ Pointer type for ObjC blocks. Defined in ``"ObjCBlockPointer.h"``.
Composite types
---------------
-The interpreter distinguishes two kinds of composite types: arrays and records. Unions are represented as records, except a single field can be marked as active. The contents of inactive fields are kept until they
-are reactivated and overwritten.
+The interpreter distinguishes two kinds of composite types: arrays and
+records (structs and classes). Unions are represented as records, except
+at most a single field can be marked as active. The contents of inactive
+fields are kept until they are reactivated and overwritten.
+Complex numbers (``_Complex``) and vectors
+(``__attribute((vector_size(16)))``) are treated as arrays.
Bytecode Execution
==================
-Bytecode is executed using a stack-based interpreter. The execution context consists of an ``InterpStack``, along with a chain of ``InterpFrame`` objects storing the call frames. Frames are built by call instructions and destroyed by return instructions. They perform one allocation to reserve space for all locals in a single block. These objects store all the required information to emit stack traces whenever evaluation fails.
+Bytecode is executed using a stack-based interpreter. The execution
+context consists of an ``InterpStack``, along with a chain of
+``InterpFrame`` objects storing the call frames. Frames are built by
+call instructions and destroyed by return instructions. They perform
+one allocation to reserve space for all locals in a single block.
+These objects store all the required information to emit stack traces
+whenever evaluation fails.
Memory Organisation
===================
Memory management in the interpreter relies on 3 data structures: ``Block``
-object which store the data and associated inline metadata, ``Pointer`` objects
-which refer to or into blocks, and ``Descriptor`` structures which describe
-blocks and subobjects nested inside blocks.
+objects which store the data and associated inline metadata, ``Pointer``
+objects which refer to or into blocks, and ``Descriptor`` structures which
+describe blocks and subobjects nested inside blocks.
Blocks
------
-Blocks contain data interleaved with metadata. They are allocated either statically
-in the code generator (globals, static members, dummy parameter values etc.) or
-dynamically in the interpreter, when creating the frame containing the local variables
-of a function. Blocks are associated with a descriptor that characterises the entire
-allocation, along with a few additional attributes:
-
-* ``IsStatic`` indicates whether the block has static duration in the interpreter, i.e. it is not a local in a frame.
-
-* ``IsExtern`` indicates that the block was created for an extern and the storage cannot be read or written.
+Blocks contain data interleaved with metadata. They are allocated either
+statically in the code generator (globals, static members, dummy parameter
+values etc.) or dynamically in the interpreter, when creating the frame
+containing the local variables of a function. Blocks are associated with a
+descriptor that characterises the entire allocation, along with a few
+additional attributes:
+
+* ``IsStatic`` indicates whether the block has static duration in the
+ interpreter, i.e. it is not a local in a frame.
+
+* ``DeclID`` identifies each global declaration (it is set to an invalid
+ and irrelevant value for locals) in order to prevent illegal writes and
+ reads involving globals and temporaries with static storage duration.
+
+Static blocks are never deallocated, but local ones might be deallocated
+even when there are live pointers to them. Pointers are only valid as
+long as the blocks they point to are valid, so a block with pointers to
+it whose lifetime ends is kept alive until all pointers to it go out of
+scope. Since the frame is destroyed on function exit, such blocks are
+turned into a ``DeadBlock`` and copied to storage managed by the
+interpreter itself, not the frame. Reads and writes to these blocks are
+illegal and cause an appropriate diagnostic to be emitted. When the last
+pointer goes out of scope, dead blocks are also deallocated.
+
+The lifetime of blocks is managed through 3 methods stored in the
+descriptor of the block:
+
+* **CtorFn**: initializes the metadata which is store in the block,
+ alongside actual data. Invokes the default constructors of objects
+ which are not trivial (``Pointer``, ``RealFP``, etc.)
-* ``DeclID`` identifies each global declaration (it is set to an invalid and irrelevant value for locals) in order to prevent illegal writes and reads involving globals and temporaries with static storage duration.
-
-Static blocks are never deallocated, but local ones might be deallocated even when there are live pointers to them. Pointers are only valid as long as the blocks they point to are valid, so a block with pointers to it whose lifetime ends is kept alive until all pointers to it go out of scope. Since the frame is destroyed on function exit, such blocks are turned into a ``DeadBlock`` and copied to storage managed by the interpreter itself, not the frame. Reads and writes to these blocks are illegal and cause an appropriate diagnostic to be emitted. When the last pointer goes out of scope, dead blocks are also deallocated.
-
-The lifetime of blocks is managed through 3 methods stored in the descriptor of the block:
-
-* **CtorFn**: initializes the metadata which is store in the block, alongside actual data. Invokes the default constructors of objects which are not trivial (``Pointer``, ``RealFP``, etc.)
* **DtorFn**: invokes the destructors of non-trivial objects.
-* **MoveFn**: moves a block to dead storage.
-Non-static blocks track all the pointers into them through an intrusive doubly-linked list, this is required in order to adjust all pointers when transforming a block into a dead block.
+* **MoveFn**: moves a block to dead storage.
-Descriptors
------------
+Non-static blocks track all the pointers into them through an intrusive
+doubly-linked list, required to adjust and invalidate all pointers when
+transforming a block into a dead block. If the lifetime of an object ends,
+all pointers to it are invalidated, emitting the appropriate diagnostics when
+dereferenced.
-Descriptor are generated at bytecode compilation time and contain information required to determine if a particular memory access is allowed in constexpr. Even though there is a single descriptor object, it encodes information for several kinds of objects:
+The interpreter distinguishes 3 different kinds of blocks:
* **Primitives**
- A block containing a primitive reserved storage only for the primitive.
+ A block containing a single primitive with no additional metadata.
* **Arrays of primitives**
- An array of primitives contains a pointer to an ``InitMap`` storage as its first field: the initialisation map is a bit map indicating all elements of the array which were initialised. If the pointer is null, no elements were initialised, while a value of ``(InitMap)-1`` indicates that the object was fully initialised. when all fields are initialised, the map is deallocated and replaced with that token.
+ An array of primitives contains a pointer to an ``InitMap`` storage as its
+ first field: the initialisation map is a bit map indicating all elements of
+ the array which were initialised. If the pointer is null, no elements were
+ initialised, while a value of ``(InitMap*)-1`` indicates that the object was
+ fully initialised. When all fields are initialised, the map is deallocated
+ and replaced with that token.
- Array elements are stored sequentially, without padding, after the pointer to the map.
+ Array elements are stored sequentially, without padding, after the pointer
+ to the map.
* **Arrays of composites and records**
- Each element in an array of composites is preceded by an ``InlineDescriptor``. Descriptors and elements are stored sequentially in the block. Records are laid out identically to arrays of composites: each field and base class is preceded by an inline descriptor. The ``InlineDescriptor`` has the following field:
+ Each element in an array of composites is preceded by an ``InlineDescriptor``
+ which stores the attributes specific to the field and not the whole
+ allocation site. Descriptors and elements are stored sequentially in the
+ block.
+ Records are laid out identically to arrays of composites: each field and base
+ class is preceded by an inline descriptor. The ``InlineDescriptor``
+ has the following fields:
+
+ * **Offset**: byte offset into the array or record, used to step back to the
+ parent array or record.
+ * **IsConst**: flag indicating if the field is const-qualified.
+ * **IsInitialized**: flag indicating whether the field or element was
+ initialized. For non-primitive fields, this is only relevant to determine
+ the dynamic type of objects during construction.
+ * **IsBase**: flag indicating whether the record is a base class. In that
+ case, the offset can be used to identify the derived class.
+ * **IsActive**: indicates if the field is the active field of a union.
+ * **IsMutable**: indicates if the field is marked as mutable.
+
+Inline descriptors are filled in by the `CtorFn` of blocks, which leaves storage
+in an uninitialised, but valid state.
- * **Offset**: byte offset into the array or record, used to step back to the parent array or record.
- * **IsConst**: flag indicating if the field is const-qualified.
- * **IsInitialized**: flag indicating whether the field or element was initialized. For non-primitive fields, this is only relevant for base classes.
- * **IsBase**: flag indicating whether the record is a base class. In that case, the offset can be used to identify the derived class.
- * **IsActive**: indicates if the field is the active field of a union.
- * **IsMutable**: indicates if the field is marked as mutable.
+Descriptors
+-----------
-Inline descriptors are filled in by the `CtorFn` of blocks, which leaves storage in an uninitialised, but valid state.
+Descriptors are generated at bytecode compilation time and contain information
+required to determine if a particular memory access is allowed in constexpr.
+They also carry all the information required to emit a diagnostic involving
+a memory access, such as the declaration which originates the block.
+Currently there is a single kind of descriptor encoding information for all
+block types.
Pointers
--------
-Pointers track a ``Pointee``, the block to which they point or ``nullptr`` for null pointers, along with a ``Base`` and an ``Offset``. The base identifies the innermost field, while the offset points to an array element relative to the base (including one-past-end pointers). Most subobject the pointer points to in block, while the offset identifies the array element the pointer points to. These two fields allow all pointers to be uniquely identified and disambiguated.
+Pointers, implemented in ``Pointer.h`` are represented as a tagged union.
+Some of these may not yet be available in upstream ``clang``.
+
+ * **BlockPointer**: used to reference memory allocated and managed by the
+ interpreter, being the only pointer kind which allows dereferencing in the
+ interpreter
+ * **ExternPointer**: points to memory which can be addressed, but not read by
+ the interpreter. It is equivalent to APValue, tracking a declaration and a path
+ of fields and indices into that allocation.
+ * **TargetPointer**: represents a target address derived from a base address
+ through pointer arithmetic, such as ``((int *)0x100)[20]``. Null pointers are
+ target pointers with a zero offset.
+ * **TypeInfoPointer**: tracks information for the opaque type returned by
+ ``typeid``
+ * **InvalidPointer**: is dummy pointer created by an invalid operation which
+ allows the interpreter to continue execution. Does not allow pointer
+ arithmetic or dereferencing.
+
+Besides the previously mentioned union, a number of other pointer-like types
+have their own type:
+
+ * **ObjCBlockPointer** tracks Objective-C blocks
+ * **FnPointer** tracks functions and lazily caches their compiled version
+ * **MemberPointer** tracks C++ object members
+
+Void pointers, which can be built by casting any of the aforementioned
+pointers, are implemented as a union of all pointer types. The ``BitCast``
+opcode is responsible for performing all legal conversions between these
+types and primitive integers.
+
+BlockPointer
+~~~~~~~~~~~~
+
+Block pointers track a ``Pointee``, the block to which they point, along
+with a ``Base`` and an ``Offset``. The base identifies the innermost field,
+while the offset points to an array element relative to the base (including
+one-past-end pointers). The offset identifies the array element or field
+which is referenced, while the base points to the outer object or array which
+contains the field. These two fields allow all pointers to be uniquely
+identified, disambiguated and characterised.
As an example, consider the following structure:
@@ -149,9 +276,14 @@ As an example, consider the following structure:
};
constexpr A a;
-On the target, ``&a`` and ``&a.b.x`` are equal. So are ``&a.c[0]`` and ``&a.c[0].a``. In the interpreter, all these pointers must be distinguished since the are all allowed to address distinct range of memory.
+On the target, ``&a`` and ``&a.b.x`` are equal. So are ``&a.c[0]`` and
+``&a.c[0].a``. In the interpreter, all these pointers must be
+distinguished since the are all allowed to address distinct range of
+memory.
-In the interpreter, the object would require 240 bytes of storage and would have its field interleaved with metadata. The pointers which can be derived to the object are illustrated in the following diagram:
+In the interpreter, the object would require 240 bytes of storage and
+would have its field interleaved with metadata. The pointers which can
+be derived to the object are illustrated in the following diagram:
::
@@ -164,9 +296,63 @@ In the interpreter, the object would require 240 bytes of storage and would have
a |&a.b.x &a.y &a.c |&a.c[0].a |&a.c[1].a |
&a.b &a.c[0] &a.c[1] &a.z
-The ``Base`` offset of all pointers points to the start of a field or an array and is preceded by an inline descriptor (unless ``Base == 0``, pointing to the root). All the relevant attributes can be read from either the inline descriptor or the descriptor of the block.
+The ``Base`` offset of all pointers points to the start of a field or
+an array and is preceded by an inline descriptor (unless ``Base`` is
+zero, pointing to the root). All the relevant attributes can be read
+from either the inline descriptor or the descriptor of the block.
+
+
+Array elements are identified by the ``Offset`` field of pointers,
+pointing to past the inline descriptors for composites and before
+the actual data in the case of primitive arrays. The ``Offset``
+points to the offset where primitives can be read from. As an example,
+``a.c + 1`` would have the same base as ``a.c`` since it is an element
+of ``a.c``, but its offset would point to ``&a.c[1]``. The
+array-to-pointer decay operation adjusts a pointer to an array (where
+the offset is equal to the base) to a pointer to the first element.
+
+ExternPointer
+~~~~~~~~~~~~~
+
+Extern pointers can be derived, pointing into symbols which are not
+readable from constexpr. An external pointer consists of a base
+declaration, along with a path designating a subobject, similar to
+the ``LValuePath`` of an APValue. Extern pointers can be converted
+to block pointers if the underlying variable is defined after the
+pointer is created, as is the case in the following example:
+
+.. code-block:: c
+
+ extern const int a;
+ constexpr const int *p = &a;
+ const int a = 5;
+ static_assert(*p == 5, "x");
+
+TargetPointer
+~~~~~~~~~~~~~
+
+While null pointer arithmetic or integer-to-pointer conversion is
+banned in constexpr, some expressions on target offsets must be folded,
+replicating the behaviour of the ``offsetof`` builtin. Target pointers
+are characterised by 3 offsets: a field offset, an array offset and a
+base offset, along with a descriptor specifying the type the pointer is
+supposed to refer to. Array indexing adjusts the array offset, while the
+field offset is adjusted when a pointer to a member is created. Casting
+an integer to a pointer sets the value of the base offset. As a special
+case, null pointers are target pointers with all offsets set to 0.
+
+TypeInfoPointer
+~~~~~~~~~~~~~~~
+
+``TypeInfoPointer`` tracks two types: the type assigned to
+``std::type_info`` and the type which was passed to ``typeinfo``.
+
+InvalidPointer
+~~~~~~~~~~~~~~
-Array elements are identified by the ``Offset`` field of pointers, pointing to past the inline descriptors for composites and before the actual data in the case of primitive arrays. The ``Offset`` points to the offset where primitives can be read from. As an example, ``a.c + 1`` would have the same base as ``a.c`` since it is an element of ``a.c``, but its offset would point to ``&a.c[1]``. The ``*`` operation narrows the scope of the pointer, adjusting the base to ``&a.c[1]``. The reverse operator, ``&``, expands the scope of ``&a.c[1]``, turning it into ``a.c + 1``. When a one-past-end pointer is narrowed, its offset is set to ``-1`` to indicate that it is an invalid value (expanding returns the past-the-end pointer). As a special case, narrowing ``&a.c`` results in ``&a.c[0]``. The `narrow` and `expand` methods can be used to follow the chain of equivalent pointers.
+Such pointers are built by operations which cannot generate valid
+pointers, allowing the interpreter to continue execution after emitting
+a warning. Inspecting such a pointer stops execution.
TODO
====
@@ -174,20 +360,24 @@ TODO
Missing Language Features
-------------------------
-* Definition of externs must override previous declaration
* Changing the active field of unions
-* Union copy constructors
-* ``typeid``
* ``volatile``
* ``__builtin_constant_p``
-* ``std::initializer_list``
-* lambdas
-* range-based for loops
-* ``vector_size``
* ``dynamic_cast``
+* ``new`` and ``delete``
+* Fixed Point numbers and arithmetic on Complex numbers
+* Several builtin methods, including string operations and
+ ``__builtin_bit_cast``
+* Continue-after-failure: a form of exception handling at the bytecode
+ level should be implemented to allow execution to resume. As an example,
+ argument evaluation should resume after the computation of an argument fails.
+* Pointer-to-Integer conversions
+* Lazy descriptors: the interpreter creates a ``Record`` and ``Descriptor``
+ when it encounters a type: ones which are not yet defined should be lazily
+ created when required
Known Bugs
----------
-* Pointer comparison for equality needs to narrow/expand pointers
-* If execution fails, memory storing APInts and APFloats is leaked when the stack is cleared
+* If execution fails, memory storing APInts and APFloats is leaked when the
+ stack is cleared
diff --git a/gnu/llvm/clang/docs/DataFlowSanitizer.rst b/gnu/llvm/clang/docs/DataFlowSanitizer.rst
index e0e9d74efde..44956037490 100644
--- a/gnu/llvm/clang/docs/DataFlowSanitizer.rst
+++ b/gnu/llvm/clang/docs/DataFlowSanitizer.rst
@@ -20,6 +20,32 @@ specific class of bugs on its own. Instead, it provides a generic
dynamic data flow analysis framework to be used by clients to help
detect application-specific issues within their own code.
+How to build libc++ with DFSan
+==============================
+
+DFSan requires either all of your code to be instrumented or for uninstrumented
+functions to be listed as ``uninstrumented`` in the `ABI list`_.
+
+If you'd like to have instrumented libc++ functions, then you need to build it
+with DFSan instrumentation from source. Here is an example of how to build
+libc++ and the libc++ ABI with data flow sanitizer instrumentation.
+
+.. code-block:: console
+
+ cd libcxx-build
+
+ # An example using ninja
+ cmake -GNinja path/to/llvm-project/llvm \
+ -DCMAKE_C_COMPILER=clang \
+ -DCMAKE_CXX_COMPILER=clang++ \
+ -DLLVM_USE_SANITIZER="DataFlow" \
+ -DLLVM_ENABLE_LIBCXX=ON \
+ -DLLVM_ENABLE_PROJECTS="libcxx;libcxxabi"
+
+ ninja cxx cxxabi
+
+Note: Ensure you are building with a sufficiently new version of Clang.
+
Usage
=====
@@ -33,6 +59,8 @@ The APIs are defined in the header file ``sanitizer/dfsan_interface.h``.
For further information about each function, please refer to the header
file.
+.. _ABI list:
+
ABI List
--------
diff --git a/gnu/llvm/clang/docs/DiagnosticsReference.rst b/gnu/llvm/clang/docs/DiagnosticsReference.rst
index afd38929fb6..2fab8b5f302 100644
--- a/gnu/llvm/clang/docs/DiagnosticsReference.rst
+++ b/gnu/llvm/clang/docs/DiagnosticsReference.rst
@@ -314,9 +314,13 @@ This diagnostic is enabled by default.
**Diagnostic text:**
-+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
-|:warning:`warning:` |nbsp| :diagtext:`ISO C++20 considers use of overloaded operator '`:placeholder:`A`:diagtext:`' (with operand types` |nbsp| :placeholder:`B` |nbsp| :diagtext:`and` |nbsp| :placeholder:`C`:diagtext:`) to be ambiguous despite there being a unique best viable function`|
-+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
++----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------+
+|:warning:`warning:` |nbsp| :diagtext:`ISO C++20 considers use of overloaded operator '`:placeholder:`A`:diagtext:`' (with operand types` |nbsp| :placeholder:`B` |nbsp| :diagtext:`and` |nbsp| :placeholder:`C`:diagtext:`) to be ambiguous despite there being a unique best viable function`|+-----------------------------------------------+|
+| || |nbsp| :diagtext:`with non-reversed arguments`||
+| |+-----------------------------------------------+|
+| || ||
+| |+-----------------------------------------------+|
++----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------+
-Wanalyzer-incompatible-plugin
@@ -555,24 +559,7 @@ This diagnostic is enabled by default.
-Wasm
-----
-This diagnostic is enabled by default.
-
-Controls `-Wasm-ignored-qualifier`_, `-Wasm-operand-widths`_.
-
-
--Wasm-ignored-qualifier
------------------------
-This diagnostic is enabled by default.
-
-**Diagnostic text:**
-
-+----------------------------------------------------------------------------------------------------------+
-|:warning:`warning:` |nbsp| :diagtext:`ignored` |nbsp| :placeholder:`A` |nbsp| :diagtext:`qualifier on asm`|
-+----------------------------------------------------------------------------------------------------------+
-
-+-------------------------------------------------------------------------------------+
-|:warning:`warning:` |nbsp| :diagtext:`meaningless 'volatile' on asm outside function`|
-+-------------------------------------------------------------------------------------+
+Synonym for `-Wasm-operand-widths`_.
-Wasm-operand-widths
@@ -1045,9 +1032,13 @@ This diagnostic is enabled by default.
**Diagnostic text:**
-+-----------------------------------------------------------------------+
-|:warning:`warning:` |nbsp| :diagtext:`braces around scalar initializer`|
-+-----------------------------------------------------------------------+
++------------------------------------------------------------+----------------------------+-----------------------+
+|:warning:`warning:` |nbsp| :diagtext:`braces around` |nbsp| |+--------------------------+|:diagtext:`initializer`|
+| ||:diagtext:`scalar` |nbsp| || |
+| |+--------------------------+| |
+| || || |
+| |+--------------------------+| |
++------------------------------------------------------------+----------------------------+-----------------------+
-Wbridge-cast
@@ -1642,6 +1633,10 @@ Some of the diagnostics controlled by this flag are enabled by default.
**Diagnostic text:**
++-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
+|:warning:`warning:` |nbsp| :diagtext:`aggregate initialization of type` |nbsp| :placeholder:`A` |nbsp| :diagtext:`with user-declared constructors is incompatible with C++20`|
++-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
+
+------------------------------------------------------------------------------------------------------------+
|:warning:`warning:` |nbsp| :diagtext:`'consteval' specifier is incompatible with C++ standards before C++20`|
+------------------------------------------------------------------------------------------------------------+
@@ -1650,10 +1645,6 @@ Some of the diagnostics controlled by this flag are enabled by default.
|:warning:`warning:` |nbsp| :diagtext:`'constinit' specifier is incompatible with C++ standards before C++20`|
+------------------------------------------------------------------------------------------------------------+
-+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
-|:warning:`warning:` |nbsp| :diagtext:`aggregate initialization of type` |nbsp| :placeholder:`A` |nbsp| :diagtext:`with user-declared constructors is incompatible with C++20`|
-+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
-
+------------------------------------------------------------------------------------------------+
|:warning:`warning:` |nbsp| :diagtext:`this expression will be parsed as explicit(bool) in C++20`|
+------------------------------------------------------------------------------------------------+
@@ -2164,6 +2155,10 @@ Also controls `-Wc++98-c++11-c++14-c++17-compat`_, `-Wc++98-c++11-c++14-compat`_
|:warning:`warning:` |nbsp| :diagtext:`scalar initialized from empty initializer list is incompatible with C++98`|
+----------------------------------------------------------------------------------------------------------------+
++--------------------------------------------------------------------------------------------------------------------------------------------------------+
+|:warning:`warning:` |nbsp| :diagtext:`initializing` |nbsp| :placeholder:`A` |nbsp| :diagtext:`from an empty initializer list is incompatible with C++98`|
++--------------------------------------------------------------------------------------------------------------------------------------------------------+
+
+-----------------------------------------------------------------------------------------------------------------+
|:warning:`warning:` |nbsp| :diagtext:`enumeration types with a fixed underlying type are incompatible with C++98`|
+-----------------------------------------------------------------------------------------------------------------+
@@ -2519,6 +2514,17 @@ Also controls `-Wc++98-c++11-c++14-c++17-compat-pedantic`_, `-Wc++98-c++11-c++14
+----------------------------------------------------------------------------------------+
+-Wc2x-extensions
+----------------
+This diagnostic is enabled by default.
+
+**Diagnostic text:**
+
++--------------------------------------------------------------------------------------------------------------+
+|:warning:`warning:` |nbsp| :diagtext:`omitting the parameter name in a function definition is a C2x extension`|
++--------------------------------------------------------------------------------------------------------------+
+
+
-Wc99-compat
------------
Some of the diagnostics controlled by this flag are enabled by default.
@@ -2779,6 +2785,23 @@ Also controls `-Wnon-pod-varargs`_.
+---------------------------------------------------------------------------------------------------------------------------------------+-------------------------+----------------------------------------------------------------------+
+-Wcmse-union-leak
+-----------------
+This diagnostic is enabled by default.
+
+**Diagnostic text:**
+
++-----------------------------------------------------------------------------------------+-------------------------------------------------+----------------------------------------+
+|:warning:`warning:` |nbsp| :diagtext:`passing union across security boundary via` |nbsp| |+-----------------------------------------------+| |nbsp| :diagtext:`may leak information`|
+| ||+---------------------------------------------+|| |
+| |||:diagtext:`parameter` |nbsp| :placeholder:`B`||| |
+| ||+---------------------------------------------+|| |
+| |+-----------------------------------------------+| |
+| ||:diagtext:`return value` || |
+| |+-----------------------------------------------+| |
++-----------------------------------------------------------------------------------------+-------------------------------------------------+----------------------------------------+
+
+
-Wcomma
-------
**Diagnostic text:**
@@ -2940,9 +2963,9 @@ This diagnostic is enabled by default.
----------
**Diagnostic text:**
-+-----------------------------------------------------------------------------------------------------------------------------------------------------------------+
-|:warning:`warning:` |nbsp| :diagtext:`consumed analysis attribute is attached to member of class '`:placeholder:`A`:diagtext:`' which isn't marked as consumable`|
-+-----------------------------------------------------------------------------------------------------------------------------------------------------------------+
++-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
+|:warning:`warning:` |nbsp| :diagtext:`consumed analysis attribute is attached to member of class` |nbsp| :placeholder:`A` |nbsp| :diagtext:`which isn't marked as consumable`|
++-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
+--------------------------------------------------------------------------------------------------------------------------------+
|:warning:`warning:` |nbsp| :diagtext:`state of variable '`:placeholder:`A`:diagtext:`' must match at the entry and exit of loop`|
@@ -4093,6 +4116,40 @@ Also controls `-Wdocumentation-unknown-command`_.
+--------------------------------------------------------------------------------------------------------------------------------------------------------------------+
+-Wdtor-name
+-----------
+Some of the diagnostics controlled by this flag are enabled by default.
+
+**Diagnostic text:**
+
++----------------------------------------------------------------------------------------------------+
+|:warning:`warning:` |nbsp| :diagtext:`ISO C++ considers this destructor name lookup to be ambiguous`|
++----------------------------------------------------------------------------------------------------+
+
++-----------------------------------------------------------------------------------------------------------------------------------+
+|:warning:`warning:` |nbsp| :diagtext:`ISO C++ requires the name after '::~' to be found in the same scope as the name before '::~'`|
++-----------------------------------------------------------------------------------------------------------------------------------+
+
++-------------------------------------------------------------------------------------------------------------------------------------------------------------+
+|:warning:`warning:` |nbsp| :diagtext:`qualified destructor name only found in lexical scope; omit the qualifier to find this type name by unqualified lookup`|
++-------------------------------------------------------------------------------------------------------------------------------------------------------------+
+
+
+-Wdtor-typedef
+--------------
+This diagnostic is an error by default, but the flag ``-Wno-dtor-typedef`` can be used to disable the error.
+
+**Diagnostic text:**
+
++--------------------------------------------------------------------------------+------------------------+-------------------------------------------------------------+
+|:error:`error:` |nbsp| :diagtext:`destructor cannot be declared using a` |nbsp| |+----------------------+| |nbsp| :placeholder:`A` |nbsp| :diagtext:`of the class name`|
+| ||:diagtext:`typedef` || |
+| |+----------------------+| |
+| ||:diagtext:`type alias`|| |
+| |+----------------------+| |
++--------------------------------------------------------------------------------+------------------------+-------------------------------------------------------------+
+
+
-Wduplicate-decl-specifier
--------------------------
Some of the diagnostics controlled by this flag are enabled by default.
@@ -4432,6 +4489,39 @@ This diagnostic is enabled by default.
+-----------------------------------------------------------------------------------------------------------------------------+
+-Wexcess-initializers
+---------------------
+This diagnostic is enabled by default.
+
+**Diagnostic text:**
+
++-----------------------------------------------------------------+--------------------+-------------------------------+
+|:warning:`warning:` |nbsp| :diagtext:`excess elements in` |nbsp| |+------------------+| |nbsp| :diagtext:`initializer`|
+| ||:diagtext:`array` || |
+| |+------------------+| |
+| ||:diagtext:`vector`|| |
+| |+------------------+| |
+| ||:diagtext:`scalar`|| |
+| |+------------------+| |
+| ||:diagtext:`union` || |
+| |+------------------+| |
+| ||:diagtext:`struct`|| |
+| |+------------------+| |
++-----------------------------------------------------------------+--------------------+-------------------------------+
+
++---------------------------------------------------------------------------------------------------------------------------+
+|:warning:`warning:` |nbsp| :diagtext:`excess elements in initializer for indivisible sizeless type` |nbsp| :placeholder:`A`|
++---------------------------------------------------------------------------------------------------------------------------+
+
++--------------------------------------------------------------------------------+
+|:warning:`warning:` |nbsp| :diagtext:`excess elements in char array initializer`|
++--------------------------------------------------------------------------------+
+
++------------------------------------------------------------------------------------+
+|:warning:`warning:` |nbsp| :diagtext:`initializer-string for char array is too long`|
++------------------------------------------------------------------------------------+
+
+
-Wexit-time-destructors
-----------------------
**Diagnostic text:**
@@ -4456,21 +4546,6 @@ Some of the diagnostics controlled by this flag are enabled by default.
+-------------------------------------------------------------------------------------------------+
--Wexperimental-isel
--------------------
-This diagnostic is enabled by default.
-
-**Diagnostic text:**
-
-+------------------------------------------------------------------------------------------------------------------------------------+
-|:warning:`warning:` |nbsp| :diagtext:`-fexperimental-isel support for the '`:placeholder:`A`:diagtext:`' architecture is incomplete`|
-+------------------------------------------------------------------------------------------------------------------------------------+
-
-+----------------------------------------------------------------------------------------------------------------------------------------+
-|:warning:`warning:` |nbsp| :diagtext:`-fexperimental-isel support is incomplete for this architecture at the current optimization level`|
-+----------------------------------------------------------------------------------------------------------------------------------------+
-
-
-Wexplicit-initialize-call
--------------------------
This diagnostic is enabled by default.
@@ -5024,6 +5099,10 @@ This diagnostic is enabled by default.
**Diagnostic text:**
++--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
+|:warning:`warning:` |nbsp| :diagtext:`'`:placeholder:`A`:diagtext:`' will always overflow; destination buffer has size` |nbsp| :placeholder:`B`:diagtext:`, but format string expands to at least` |nbsp| :placeholder:`C`|
++--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
+
+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|:warning:`warning:` |nbsp| :diagtext:`'`:placeholder:`A`:diagtext:`' will always overflow; destination buffer has size` |nbsp| :placeholder:`B`:diagtext:`, but size argument is` |nbsp| :placeholder:`C`|
+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
@@ -5042,6 +5121,15 @@ This diagnostic is enabled by default.
+-------------------------------------------------------------------------+
+-Wframe-address
+---------------
+**Diagnostic text:**
+
++---------------------------------------------------------------------------------------------------------------+
+|:warning:`warning:` |nbsp| :diagtext:`calling '`:placeholder:`A`:diagtext:`' with a nonzero argument is unsafe`|
++---------------------------------------------------------------------------------------------------------------+
+
+
-Wframe-larger-than=
--------------------
This diagnostic is enabled by default.
@@ -5156,6 +5244,21 @@ Some of the diagnostics controlled by this flag are enabled by default.
+-------------------------------------------------------------------------------+
+-Wglobal-isel
+-------------
+This diagnostic is enabled by default.
+
+**Diagnostic text:**
+
++------------------------------------------------------------------------------------------------------------------------------+
+|:warning:`warning:` |nbsp| :diagtext:`-fglobal-isel support for the '`:placeholder:`A`:diagtext:`' architecture is incomplete`|
++------------------------------------------------------------------------------------------------------------------------------+
+
++----------------------------------------------------------------------------------------------------------------------------------+
+|:warning:`warning:` |nbsp| :diagtext:`-fglobal-isel support is incomplete for this architecture at the current optimization level`|
++----------------------------------------------------------------------------------------------------------------------------------+
+
+
-Wgnu
-----
Some of the diagnostics controlled by this flag are enabled by default.
@@ -5552,6 +5655,10 @@ This diagnostic is enabled by default.
|:warning:`warning:` |nbsp| :diagtext:`attribute` |nbsp| :placeholder:`A` |nbsp| :diagtext:`after definition is ignored`|
+-----------------------------------------------------------------------------------------------------------------------+
++--------------------------------------------------------------------------------------------------------------------+
+|:warning:`warning:` |nbsp| :diagtext:`'cmse\_nonsecure\_entry' cannot be applied to functions with internal linkage`|
++--------------------------------------------------------------------------------------------------------------------+
+
+---------------------------------------------------------------------------------------------------------+
|:warning:`warning:` |nbsp| :diagtext:`'dllexport' attribute ignored on explicit instantiation definition`|
+---------------------------------------------------------------------------------------------------------+
@@ -6218,6 +6325,17 @@ Controls `-Wimplicit-function-declaration`_, `-Wimplicit-int`_.
+----------------------------------------------------------------------------+
+-Wimplicit-const-int-float-conversion
+-------------------------------------
+This diagnostic is enabled by default.
+
+**Diagnostic text:**
+
++-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
+|:warning:`warning:` |nbsp| :diagtext:`implicit conversion from` |nbsp| :placeholder:`C` |nbsp| :diagtext:`to` |nbsp| :placeholder:`D` |nbsp| :diagtext:`changes value from` |nbsp| :placeholder:`A` |nbsp| :diagtext:`to` |nbsp| :placeholder:`B`|
++-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
+
+
-Wimplicit-conversion-floating-point-to-bool
--------------------------------------------
This diagnostic is enabled by default.
@@ -6349,16 +6467,14 @@ Also controls `-Wobjc-signed-char-bool-implicit-int-conversion`_.
-------------------------------
Some of the diagnostics controlled by this flag are enabled by default.
+Also controls `-Wimplicit-const-int-float-conversion`_.
+
**Diagnostic text:**
+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|:warning:`warning:` |nbsp| :diagtext:`implicit conversion from` |nbsp| :placeholder:`A` |nbsp| :diagtext:`to` |nbsp| :placeholder:`B` |nbsp| :diagtext:`may lose precision`|
+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
-+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
-|:warning:`warning:` |nbsp| :diagtext:`implicit conversion from` |nbsp| :placeholder:`C` |nbsp| :diagtext:`to` |nbsp| :placeholder:`D` |nbsp| :diagtext:`changes value from` |nbsp| :placeholder:`A` |nbsp| :diagtext:`to` |nbsp| :placeholder:`B`|
-+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
-
-Wimplicit-retain-self
----------------------
@@ -6924,13 +7040,13 @@ This diagnostic is an error by default, but the flag ``-Wno-invalid-constexpr``
**Diagnostic text:**
-+----------------------------------------------------+-------------------------+--------------------------------------------------------+
-|:error:`error:` |nbsp| :diagtext:`constexpr` |nbsp| |+-----------------------+| |nbsp| :diagtext:`never produces a constant expression`|
-| ||:diagtext:`function` || |
-| |+-----------------------+| |
-| ||:diagtext:`constructor`|| |
-| |+-----------------------+| |
-+----------------------------------------------------+-------------------------+--------------------------------------------------------+
++-----------------------+-----------------------+--------+-------------------------+--------------------------------------------------------+
+|:error:`error:` |nbsp| |+---------------------+| |nbsp| |+-----------------------+| |nbsp| :diagtext:`never produces a constant expression`|
+| ||:diagtext:`constexpr`|| ||:diagtext:`function` || |
+| |+---------------------+| |+-----------------------+| |
+| ||:diagtext:`consteval`|| ||:diagtext:`constructor`|| |
+| |+---------------------+| |+-----------------------+| |
++-----------------------+-----------------------+--------+-------------------------+--------------------------------------------------------+
-Winvalid-iboutlet
@@ -7325,10 +7441,54 @@ This diagnostic is enabled by default.
**Diagnostic text:**
-+--------------------------------------------------------------------------------+
-|:warning:`warning:` |nbsp| :diagtext:`too many braces around scalar initializer`|
-+--------------------------------------------------------------------------------+
++---------------------------------------------------------------------+----------------------------+-----------------------+
+|:warning:`warning:` |nbsp| :diagtext:`too many braces around` |nbsp| |+--------------------------+|:diagtext:`initializer`|
+| ||:diagtext:`scalar` |nbsp| || |
+| |+--------------------------+| |
+| || || |
+| |+--------------------------+| |
++---------------------------------------------------------------------+----------------------------+-----------------------+
+
+
+-Wmax-tokens
+------------
+This diagnostic is enabled by default.
+
+**Diagnostic text:**
+
++----------------------------------------------------------------------------------------------------------------------------------------------------------------------+
+|:warning:`warning:` |nbsp| :diagtext:`the number of preprocessor source tokens (`:placeholder:`A`:diagtext:`) exceeds this token limit (`:placeholder:`B`:diagtext:`)`|
++----------------------------------------------------------------------------------------------------------------------------------------------------------------------+
+
++---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
+|:warning:`warning:` |nbsp| :diagtext:`the total number of preprocessor source tokens (`:placeholder:`A`:diagtext:`) exceeds the token limit (`:placeholder:`B`:diagtext:`)`|
++---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
+
+
+The warning is issued if the number of pre-processor tokens exceeds
+the token limit, which can be set in three ways:
+
+1. As a limit at a specific point in a file, using the ``clang max_tokens_here``
+ pragma:
+
+ .. code-block: c++
+ #pragma clang max_tokens_here 1234
+
+2. As a per-translation unit limit, using the ``-fmax-tokens=`` command-line
+ flag:
+
+ .. code-block: console
+ clang -c a.cpp -fmax-tokens=1234
+
+3. As a per-translation unit limit using the ``clang max_tokens_total`` pragma,
+ which works like and overrides the ``-fmax-tokens=`` flag:
+
+ .. code-block: c++
+ #pragma clang max_tokens_total 1234
+
+These limits can be helpful in limiting code growth through included files.
+Setting a token limit of zero means no limit.
-Wmax-unsigned-zero
-------------------
@@ -8174,7 +8334,7 @@ This diagnostic is an error by default, but the flag ``-Wno-modules-import-neste
------
Some of the diagnostics controlled by this flag are enabled by default.
-Controls `-Wcast-of-sel-type`_, `-Wchar-subscripts`_, `-Wcomment`_, `-Wdelete-non-virtual-dtor`_, `-Wextern-c-compat`_, `-Wfor-loop-analysis`_, `-Wformat`_, `-Wimplicit`_, `-Winfinite-recursion`_, `-Wint-in-bool-context`_, `-Wmismatched-tags`_, `-Wmissing-braces`_, `-Wmove`_, `-Wmultichar`_, `-Wobjc-designated-initializers`_, `-Wobjc-flexible-array`_, `-Wobjc-missing-super-calls`_, `-Woverloaded-virtual`_, `-Wprivate-extern`_, `-Wrange-loop-construct`_, `-Wreorder`_, `-Wreturn-type`_, `-Wself-assign`_, `-Wself-move`_, `-Wsizeof-array-argument`_, `-Wsizeof-array-decay`_, `-Wstring-plus-int`_, `-Wtautological-compare`_, `-Wtrigraphs`_, `-Wuninitialized`_, `-Wunknown-pragmas`_, `-Wunused`_, `-Wuser-defined-warnings`_, `-Wvolatile-register-var`_.
+Controls `-Wcast-of-sel-type`_, `-Wchar-subscripts`_, `-Wcomment`_, `-Wdelete-non-virtual-dtor`_, `-Wextern-c-compat`_, `-Wfor-loop-analysis`_, `-Wformat`_, `-Wframe-address`_, `-Wimplicit`_, `-Winfinite-recursion`_, `-Wint-in-bool-context`_, `-Wmismatched-tags`_, `-Wmissing-braces`_, `-Wmove`_, `-Wmultichar`_, `-Wobjc-designated-initializers`_, `-Wobjc-flexible-array`_, `-Wobjc-missing-super-calls`_, `-Woverloaded-virtual`_, `-Wprivate-extern`_, `-Wrange-loop-construct`_, `-Wreorder`_, `-Wreturn-type`_, `-Wself-assign`_, `-Wself-move`_, `-Wsizeof-array-argument`_, `-Wsizeof-array-decay`_, `-Wstring-plus-int`_, `-Wtautological-compare`_, `-Wtrigraphs`_, `-Wuninitialized`_, `-Wunknown-pragmas`_, `-Wunused`_, `-Wuser-defined-warnings`_, `-Wvolatile-register-var`_.
-Wmove
@@ -8294,6 +8454,21 @@ This diagnostic is enabled by default.
Synonym for `-Wc++17-compat-mangling`_.
+-Wnon-c-typedef-for-linkage
+---------------------------
+This diagnostic is enabled by default.
+
+**Diagnostic text:**
+
++-----------------------------------------------------------------------------------------------------------------+---------------------+----------------------------------------------------+
+|:warning:`warning:` |nbsp| :diagtext:`anonymous non-C-compatible type given name for linkage purposes by` |nbsp| |+-------------------+| |nbsp| :diagtext:`declaration; add a tag name here`|
+| ||:diagtext:`typedef`|| |
+| |+-------------------+| |
+| ||:diagtext:`alias` || |
+| |+-------------------+| |
++-----------------------------------------------------------------------------------------------------------------+---------------------+----------------------------------------------------+
+
+
-Wnon-gcc
---------
Some of the diagnostics controlled by this flag are enabled by default.
@@ -8371,6 +8546,17 @@ This diagnostic is an error by default, but the flag ``-Wno-non-pod-varargs`` ca
+--------------------------------------------------------------------------------------------------------------------------+
+-Wnon-power-of-two-alignment
+----------------------------
+This diagnostic is enabled by default.
+
+**Diagnostic text:**
+
++------------------------------------------------------------------------------+
+|:warning:`warning:` |nbsp| :diagtext:`requested alignment is not a power of 2`|
++------------------------------------------------------------------------------+
+
+
-Wnon-virtual-dtor
------------------
**Diagnostic text:**
@@ -9319,9 +9505,57 @@ This diagnostic is enabled by default.
|:warning:`warning:` |nbsp| :diagtext:`allocator with the 'thread' trait access has unspecified behavior on '`:placeholder:`A`:diagtext:`' directive`|
+----------------------------------------------------------------------------------------------------------------------------------------------------+
-+------------------------------------------------------------------------------------------------------------------------------------------------------------------+
-|:warning:`warning:` |nbsp| :diagtext:`unknown context selector in '`:placeholder:`A`:diagtext:`' context selector set of 'omp declare variant' directive, ignored`|
-+------------------------------------------------------------------------------------------------------------------------------------------------------------------+
++------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
+|:warning:`warning:` |nbsp| :diagtext:`the context property '`:placeholder:`A`:diagtext:`' is not valid for the context selector '`:placeholder:`B`:diagtext:`' and the context set '`:placeholder:`C`:diagtext:`'; property ignored`|
++------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
+
++----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
+|:warning:`warning:` |nbsp| :diagtext:`the context selector '`:placeholder:`A`:diagtext:`' in the context set '`:placeholder:`B`:diagtext:`' cannot have a score ('`:placeholder:`C`:diagtext:`'); score ignored`|
++----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
+
++----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
+|:warning:`warning:` |nbsp| :diagtext:`the context selector '`:placeholder:`A`:diagtext:`' is not valid for the context set '`:placeholder:`B`:diagtext:`'; selector ignored`|
++----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
+
++-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
+|:warning:`warning:` |nbsp| :diagtext:`the context selector '`:placeholder:`A`:diagtext:`' in context set '`:placeholder:`B`:diagtext:`' requires a context property defined in parentheses; selector ignored`|
++-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
+
++----------------------------------------------------------+----------------------+------------------------------------------------------------------------------------------------------------------------+----------------------+---------------------------+
+|:warning:`warning:` |nbsp| :diagtext:`the context` |nbsp| |+--------------------+| |nbsp| :diagtext:`'`:placeholder:`B`:diagtext:`' was used already in the same 'omp declare variant' directive;` |nbsp| |+--------------------+| |nbsp| :diagtext:`ignored`|
+| ||:diagtext:`set` || ||:diagtext:`set` || |
+| |+--------------------+| |+--------------------+| |
+| ||:diagtext:`selector`|| ||:diagtext:`selector`|| |
+| |+--------------------+| |+--------------------+| |
+| ||:diagtext:`property`|| ||:diagtext:`property`|| |
+| |+--------------------+| |+--------------------+| |
++----------------------------------------------------------+----------------------+------------------------------------------------------------------------------------------------------------------------+----------------------+---------------------------+
+
++----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
+|:warning:`warning:` |nbsp| :diagtext:`'`:placeholder:`A`:diagtext:`' is not a valid context property for the context selector '`:placeholder:`B`:diagtext:`' and the context set '`:placeholder:`C`:diagtext:`'; property ignored`|
++----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
+
++--------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
+|:warning:`warning:` |nbsp| :diagtext:`'`:placeholder:`A`:diagtext:`' is not a valid context selector for the context set '`:placeholder:`B`:diagtext:`'; selector ignored`|
++--------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
+
++--------------------------------------------------------------------------------------------------------------------------------------+
+|:warning:`warning:` |nbsp| :diagtext:`'`:placeholder:`A`:diagtext:`' is not a valid context set in a \`declare variant\`; set ignored`|
++--------------------------------------------------------------------------------------------------------------------------------------+
+
++--------------------------------------------------------------------------------------------------------------------------------------------------------------------+
+|:warning:`warning:` |nbsp| :diagtext:`expected '`:placeholder:`A`:diagtext:`' after the` |nbsp| :placeholder:`B`:diagtext:`; '`:placeholder:`A`:diagtext:`' assumed`|
++--------------------------------------------------------------------------------------------------------------------------------------------------------------------+
+
++---------------------------------------------------------------------------------------------------------+----------------------+---------------------+----------------------+---------------------------+
+|:warning:`warning:` |nbsp| :diagtext:`expected identifier or string literal describing a context` |nbsp| |+--------------------+|:diagtext:`;` |nbsp| |+--------------------+| |nbsp| :diagtext:`skipped`|
+| ||:diagtext:`set` || ||:diagtext:`set` || |
+| |+--------------------+| |+--------------------+| |
+| ||:diagtext:`selector`|| ||:diagtext:`selector`|| |
+| |+--------------------+| |+--------------------+| |
+| ||:diagtext:`property`|| ||:diagtext:`property`|| |
+| |+--------------------+| |+--------------------+| |
++---------------------------------------------------------------------------------------------------------+----------------------+---------------------+----------------------+---------------------------+
+---------------------------------------------------------------------------------+---------------------------------------------------+-------------------------------------+
|:warning:`warning:` |nbsp| :diagtext:`zero linear step (`:placeholder:`A` |nbsp| |+-------------------------------------------------+|:diagtext:`should probably be const)`|
@@ -9431,6 +9665,10 @@ This diagnostic is enabled by default.
| |+-----------------------------+| |
+-----------------------------------------------------------------------------------------------------------------------+-------------------------------+----------------------------------------------+
++-----------------------------------------------------------------------------------------------------------+
+|:warning:`warning:` |nbsp| :diagtext:`ignoring '-msmall-data-limit=' with -mcmodel=large for -fpic or RV64`|
++-----------------------------------------------------------------------------------------------------------+
+
+----------------------------------------------------------------------------------------------+
|:warning:`warning:` |nbsp| :diagtext:`auto-vectorization requires HVX, use -mhvx to enable it`|
+----------------------------------------------------------------------------------------------+
@@ -9763,6 +10001,14 @@ Also controls `-Wc++11-extra-semi`_, `-Wc++11-long-long`_, `-Wc++14-binary-liter
| |+------------------+| |
+--------------------------------------------------------+--------------------+------------------------------------------------------------+
++-----------------------------------------------------------------------------------------------------------------------------------+
+|:warning:`warning:` |nbsp| :diagtext:`ISO C++ requires the name after '::~' to be found in the same scope as the name before '::~'`|
++-----------------------------------------------------------------------------------------------------------------------------------+
+
++----------------------------------------------------------------------------------------------------+
+|:warning:`warning:` |nbsp| :diagtext:`ISO C++ considers this destructor name lookup to be ambiguous`|
++----------------------------------------------------------------------------------------------------+
+
+--------------------------------------------------------------------+------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+
|:warning:`warning:` |nbsp| :diagtext:`no viable constructor` |nbsp| |+----------------------------------------------------+| |nbsp| :diagtext:`of type` |nbsp| :placeholder:`B`:diagtext:`; C++98 requires a copy constructor when binding a reference to a temporary`|
| ||:diagtext:`copying variable` || |
@@ -10297,9 +10543,44 @@ This diagnostic is enabled by default.
+---------------------------+----------------------------------------------------------------+----------------------------------------------------------------------------------+
+-Wpointer-to-enum-cast
+----------------------
+This diagnostic is enabled by default.
+
+Also controls `-Wvoid-pointer-to-enum-cast`_.
+
+**Diagnostic text:**
+
++-------------------------------------------------------------------------------------------------------------------------------------------+
+|:warning:`warning:` |nbsp| :diagtext:`cast to smaller integer type` |nbsp| :placeholder:`B` |nbsp| :diagtext:`from` |nbsp| :placeholder:`A`|
++-------------------------------------------------------------------------------------------------------------------------------------------+
+
+
-Wpointer-to-int-cast
---------------------
-This diagnostic flag exists for GCC compatibility, and has no effect in Clang.
+This diagnostic is enabled by default.
+
+Also controls `-Wpointer-to-enum-cast`_, `-Wvoid-pointer-to-int-cast`_.
+
+**Diagnostic text:**
+
++-------------------------------------------------------------------------------------------------------------------------------------------+
+|:warning:`warning:` |nbsp| :diagtext:`cast to smaller integer type` |nbsp| :placeholder:`B` |nbsp| :diagtext:`from` |nbsp| :placeholder:`A`|
++-------------------------------------------------------------------------------------------------------------------------------------------+
+
+
+-Wpointer-to-int-cast
+---------------------
+This diagnostic is enabled by default.
+
+Also controls `-Wpointer-to-enum-cast`_, `-Wvoid-pointer-to-int-cast`_.
+
+**Diagnostic text:**
+
++-------------------------------------------------------------------------------------------------------------------------------------------+
+|:warning:`warning:` |nbsp| :diagtext:`cast to smaller integer type` |nbsp| :placeholder:`B` |nbsp| :diagtext:`from` |nbsp| :placeholder:`A`|
++-------------------------------------------------------------------------------------------------------------------------------------------+
+
-Wpointer-type-mismatch
-----------------------
@@ -10608,22 +10889,22 @@ Controls `-Wrange-loop-bind-reference`_, `-Wrange-loop-construct`_.
---------------------------
**Diagnostic text:**
-+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
-|:warning:`warning:` |nbsp| :diagtext:`loop variable` |nbsp| :placeholder:`A` |nbsp| :diagtext:`is always a copy because the range of type` |nbsp| :placeholder:`B` |nbsp| :diagtext:`does not return a reference`|
-+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
++------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
+|:warning:`warning:` |nbsp| :diagtext:`loop variable` |nbsp| :placeholder:`A` |nbsp| :diagtext:`binds to a temporary value produced by a range of type` |nbsp| :placeholder:`B`|
++------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
-Wrange-loop-construct
----------------------
**Diagnostic text:**
-+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
-|:warning:`warning:` |nbsp| :diagtext:`loop variable` |nbsp| :placeholder:`A` |nbsp| |nbsp| :diagtext:`is initialized with a value of a different type` |nbsp| :diagtext:`resulting in a copy`|
-+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
++------------------------------------------------------------------------------------------------------------------------------------------------------+
+|:warning:`warning:` |nbsp| :diagtext:`loop variable` |nbsp| :placeholder:`A` |nbsp| :diagtext:`binds to a temporary constructed from a different type`|
++------------------------------------------------------------------------------------------------------------------------------------------------------+
-+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
-|:warning:`warning:` |nbsp| :diagtext:`loop variable` |nbsp| :placeholder:`A` |nbsp| :diagtext:`of type` |nbsp| :placeholder:`B` |nbsp| :diagtext:`creates a copy from type` |nbsp| :placeholder:`C`|
-+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
++------------------------------------------------------------------------------------------------------------------------------------------------+
+|:warning:`warning:` |nbsp| :diagtext:`loop variable` |nbsp| :placeholder:`A` |nbsp| :diagtext:`creates a copy from type` |nbsp| :placeholder:`B`|
++------------------------------------------------------------------------------------------------------------------------------------------------+
-Wreadonly-iboutlet-property
@@ -10948,6 +11229,17 @@ This diagnostic is enabled by default.
+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
+-Wrewrite-not-bool
+------------------
+This diagnostic is enabled by default.
+
+**Diagnostic text:**
+
++---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
+|:warning:`warning:` |nbsp| :diagtext:`ISO C++20 requires return type of selected 'operator==' function for rewritten '`:placeholder:`B`:diagtext:`' comparison to be 'bool', not` |nbsp| :placeholder:`A`|
++---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
+
+
-Rsanitize-address
------------------
**Diagnostic text:**
@@ -11481,6 +11773,10 @@ Some of the diagnostics controlled by this flag are enabled by default.
**Diagnostic text:**
++-----------------------------------------------------------------------------------------------------------------------------+
+|:warning:`warning:` |nbsp| :diagtext:`nesting \`omp begin/end declare variant\` is not supported yet; nested context ignored`|
++-----------------------------------------------------------------------------------------------------------------------------+
+
+--------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|:warning:`warning:` |nbsp| :diagtext:`'#pragma omp declare variant' cannot be applied to the function that was defined already; the original function might be used`|
+--------------------------------------------------------------------------------------------------------------------------------------------------------------------+
@@ -11493,6 +11789,10 @@ Some of the diagnostics controlled by this flag are enabled by default.
|:warning:`warning:` |nbsp| :diagtext:`variant function in '#pragma omp declare variant' is itself marked as '#pragma omp declare variant'`|
+------------------------------------------------------------------------------------------------------------------------------------------+
++----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
+|:warning:`warning:` |nbsp| :diagtext:`score expressions in the OpenMP context selector need to be constant;` |nbsp| :placeholder:`A` |nbsp| :diagtext:`is not and will be ignored`|
++----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
+
+------------------------------------------------------------------------------------------------------------------------------+
|:warning:`warning:` |nbsp| :diagtext:`OpenMP only allows an ordered construct with the simd clause nested in a simd construct`|
+------------------------------------------------------------------------------------------------------------------------------+
@@ -11524,7 +11824,25 @@ This diagnostic is enabled by default.
-Wstack-protector
-----------------
-This diagnostic flag exists for GCC compatibility, and has no effect in Clang.
+This diagnostic is enabled by default.
+
+**Diagnostic text:**
+
++-------------------------------------------------------------------------------------------------------------------+
+|:warning:`warning:` |nbsp| :diagtext:`Unable to protect inline asm that clobbers stack pointer against stack clash`|
++-------------------------------------------------------------------------------------------------------------------+
+
+
+-Wstack-protector
+-----------------
+This diagnostic is enabled by default.
+
+**Diagnostic text:**
+
++-------------------------------------------------------------------------------------------------------------------+
+|:warning:`warning:` |nbsp| :diagtext:`Unable to protect inline asm that clobbers stack pointer against stack clash`|
++-------------------------------------------------------------------------------------------------------------------+
+
-Wstatic-float-init
-------------------
@@ -12229,17 +12547,13 @@ Controls `-Wthread-safety-analysis`_, `-Wthread-safety-attributes`_, `-Wthread-s
--------------------------
**Diagnostic text:**
-+----------------------------------------------------------------------------------------------------------------------------------------+
-|:warning:`warning:` |nbsp| :diagtext:`invalid capability name '`:placeholder:`A`:diagtext:`'; capability name must be 'mutex' or 'role'`|
-+----------------------------------------------------------------------------------------------------------------------------------------+
-
+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|:warning:`warning:` |nbsp| :placeholder:`A` |nbsp| :diagtext:`attribute requires arguments whose type is annotated with 'capability' attribute; type here is` |nbsp| :placeholder:`B`|
+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
-+--------------------------------------------------------------------------------------------------------------------------------------------------------+
-|:warning:`warning:` |nbsp| :placeholder:`A` |nbsp| :diagtext:`attribute can only be applied in a context annotated with 'capability("mutex")' attribute`|
-+--------------------------------------------------------------------------------------------------------------------------------------------------------+
++-----------------------------------------------------------------------------------------------------------------------------------------------+
+|:warning:`warning:` |nbsp| :placeholder:`A` |nbsp| :diagtext:`attribute can only be applied in a context annotated with 'capability' attribute`|
++-----------------------------------------------------------------------------------------------------------------------------------------------+
+----------------------------------------------------------------------------------------------------------------------------------+
|:warning:`warning:` |nbsp| :placeholder:`A` |nbsp| :diagtext:`only applies to pointer types; type here is` |nbsp| :placeholder:`B`|
@@ -13584,6 +13898,30 @@ This diagnostic is enabled by default.
+-------------------------------------------------------------------------------+
+-Wvoid-pointer-to-enum-cast
+---------------------------
+This diagnostic is enabled by default.
+
+**Diagnostic text:**
+
++-------------------------------------------------------------------------------------------------------------------------------------------+
+|:warning:`warning:` |nbsp| :diagtext:`cast to smaller integer type` |nbsp| :placeholder:`B` |nbsp| :diagtext:`from` |nbsp| :placeholder:`A`|
++-------------------------------------------------------------------------------------------------------------------------------------------+
+
+
+-Wvoid-pointer-to-int-cast
+--------------------------
+This diagnostic is enabled by default.
+
+Also controls `-Wvoid-pointer-to-enum-cast`_.
+
+**Diagnostic text:**
+
++-------------------------------------------------------------------------------------------------------------------------------------------+
+|:warning:`warning:` |nbsp| :diagtext:`cast to smaller integer type` |nbsp| :placeholder:`B` |nbsp| :diagtext:`from` |nbsp| :placeholder:`A`|
++-------------------------------------------------------------------------------------------------------------------------------------------+
+
+
-Wvoid-ptr-dereference
----------------------
This diagnostic is enabled by default.
@@ -13672,3 +14010,10 @@ This diagnostic is enabled by default.
+------------------------------------------------------------------------+
+-Wwasm-exception-spec
+---------------------
+**Diagnostic text:**
+
++----------------------------------------------------------------------------------------------------------------+
+|:warning:`warning:` |nbsp| :diagtext:`dynamic exception specifications with types are currently ignored in wasm`|
++----------------------------------------------------------------------------------------------------------------+
diff --git a/gnu/llvm/clang/docs/HardwareAssistedAddressSanitizerDesign.rst b/gnu/llvm/clang/docs/HardwareAssistedAddressSanitizerDesign.rst
index d02dc00057f..0e6c6902cfb 100644
--- a/gnu/llvm/clang/docs/HardwareAssistedAddressSanitizerDesign.rst
+++ b/gnu/llvm/clang/docs/HardwareAssistedAddressSanitizerDesign.rst
@@ -67,43 +67,59 @@ Instrumentation
Memory Accesses
---------------
-All memory accesses are prefixed with an inline instruction sequence that
-verifies the tags. Currently, the following sequence is used:
+In the majority of cases, memory accesses are prefixed with a call to
+an outlined instruction sequence that verifies the tags. The code size
+and performance overhead of the call is reduced by using a custom calling
+convention that
+
+* preserves most registers, and
+* is specialized to the register containing the address, and the type and
+ size of the memory access.
+
+Currently, the following sequence is used:
.. code-block:: none
// int foo(int *a) { return *a; }
- // clang -O2 --target=aarch64-linux -fsanitize=hwaddress -fsanitize-recover=hwaddress -c load.c
+ // clang -O2 --target=aarch64-linux-android30 -fsanitize=hwaddress -S -o - load.c
+ [...]
foo:
- 0: 90000008 adrp x8, 0 <__hwasan_shadow>
- 4: f9400108 ldr x8, [x8] // shadow base (to be resolved by the loader)
- 8: d344dc09 ubfx x9, x0, #4, #52 // shadow offset
- c: 38696909 ldrb w9, [x8, x9] // load shadow tag
- 10: d378fc08 lsr x8, x0, #56 // extract address tag
- 14: 6b09011f cmp w8, w9 // compare tags
- 18: 54000061 b.ne 24 // jump to short tag handler on mismatch
- 1c: b9400000 ldr w0, [x0] // original load
- 20: d65f03c0 ret
- 24: 7100413f cmp w9, #0x10 // is this a short tag?
- 28: 54000142 b.cs 50 // if not, trap
- 2c: 12000c0a and w10, w0, #0xf // find the address's position in the short granule
- 30: 11000d4a add w10, w10, #0x3 // adjust to the position of the last byte loaded
- 34: 6b09015f cmp w10, w9 // check that position is in bounds
- 38: 540000c2 b.cs 50 // if not, trap
- 3c: 9240dc09 and x9, x0, #0xffffffffffffff
- 40: b2400d29 orr x9, x9, #0xf // compute address of last byte of granule
- 44: 39400129 ldrb w9, [x9] // load tag from it
- 48: 6b09011f cmp w8, w9 // compare with pointer tag
- 4c: 54fffe80 b.eq 1c // if so, continue
- 50: d4212440 brk #0x922 // otherwise trap
- 54: b9400000 ldr w0, [x0] // tail duplicated original load (to handle recovery)
- 58: d65f03c0 ret
-
-Alternatively, memory accesses are prefixed with a function call.
-On AArch64, a function call is used by default in trapping mode. The code size
-and performance overhead of the call is reduced by using a custom calling
-convention that preserves most registers and is specialized to the register
-containing the address and the type and size of the memory access.
+ str x30, [sp, #-16]!
+ adrp x9, :got:__hwasan_shadow // load shadow address from GOT into x9
+ ldr x9, [x9, :got_lo12:__hwasan_shadow]
+ bl __hwasan_check_x0_2_short // call outlined tag check
+ // (arguments: x0 = address, x9 = shadow base;
+ // "2" encodes the access type and size)
+ ldr w0, [x0] // inline load
+ ldr x30, [sp], #16
+ ret
+
+ [...]
+ __hwasan_check_x0_2_short:
+ ubfx x16, x0, #4, #52 // shadow offset
+ ldrb w16, [x9, x16] // load shadow tag
+ cmp x16, x0, lsr #56 // extract address tag, compare with shadow tag
+ b.ne .Ltmp0 // jump to short tag handler on mismatch
+ .Ltmp1:
+ ret
+ .Ltmp0:
+ cmp w16, #15 // is this a short tag?
+ b.hi .Ltmp2 // if not, error
+ and x17, x0, #0xf // find the address's position in the short granule
+ add x17, x17, #3 // adjust to the position of the last byte loaded
+ cmp w16, w17 // check that position is in bounds
+ b.ls .Ltmp2 // if not, error
+ orr x16, x0, #0xf // compute address of last byte of granule
+ ldrb w16, [x16] // load tag from it
+ cmp x16, x0, lsr #56 // compare with pointer tag
+ b.eq .Ltmp1 // if matches, continue
+ .Ltmp2:
+ stp x0, x1, [sp, #-256]! // save original x0, x1 on stack (they will be overwritten)
+ stp x29, x30, [sp, #232] // create frame record
+ mov x1, #2 // set x1 to a constant indicating the type of failure
+ adrp x16, :got:__hwasan_tag_mismatch_v2 // call runtime function to save remaining registers and report error
+ ldr x16, [x16, :got_lo12:__hwasan_tag_mismatch_v2] // (load address from GOT to avoid potential register clobbers in delay load handler)
+ br x16
Heap
----
@@ -131,7 +147,67 @@ but could be optional.
Globals
-------
-TODO: details.
+Most globals in HWASAN instrumented code are tagged. This is accomplished
+using the following mechanisms:
+
+ * The address of each global has a static tag associated with it. The first
+ defined global in a translation unit has a pseudorandom tag associated
+ with it, based on the hash of the file path. Subsequent global tags are
+ incremental from the previously-assigned tag.
+
+ * The global's tag is added to its symbol address in the object file's symbol
+ table. This causes the global's address to be tagged when its address is
+ taken.
+
+ * When the address of a global is taken directly (i.e. not via the GOT), a special
+ instruction sequence needs to be used to add the tag to the address,
+ because the tag would otherwise take the address outside of the small code
+ model (4GB on AArch64). No changes are required when the address is taken
+ via the GOT because the address stored in the GOT will contain the tag.
+
+ * An associated ``hwasan_globals`` section is emitted for each tagged global,
+ which indicates the address of the global, its size and its tag. These
+ sections are concatenated by the linker into a single ``hwasan_globals``
+ section that is enumerated by the runtime (via an ELF note) when a binary
+ is loaded and the memory is tagged accordingly.
+
+A complete example is given below:
+
+.. code-block:: none
+
+ // int x = 1; int *f() { return &x; }
+ // clang -O2 --target=aarch64-linux-android30 -fsanitize=hwaddress -S -o - global.c
+
+ [...]
+ f:
+ adrp x0, :pg_hi21_nc:x // set bits 12-63 to upper bits of untagged address
+ movk x0, #:prel_g3:x+0x100000000 // set bits 48-63 to tag
+ add x0, x0, :lo12:x // set bits 0-11 to lower bits of address
+ ret
+
+ [...]
+ .data
+ .Lx.hwasan:
+ .word 1
+
+ .globl x
+ .set x, .Lx.hwasan+0x2d00000000000000
+
+ [...]
+ .section .note.hwasan.globals,"aG",@note,hwasan.module_ctor,comdat
+ .Lhwasan.note:
+ .word 8 // namesz
+ .word 8 // descsz
+ .word 3 // NT_LLVM_HWASAN_GLOBALS
+ .asciz "LLVM\000\000\000"
+ .word __start_hwasan_globals-.Lhwasan.note
+ .word __stop_hwasan_globals-.Lhwasan.note
+
+ [...]
+ .section hwasan_globals,"ao",@progbits,.Lx.hwasan,unique,2
+ .Lx.hwasan.descriptor:
+ .word .Lx.hwasan-.Lx.hwasan.descriptor
+ .word 0x2d000004 // tag = 0x2d, size = 4
Error reporting
---------------
diff --git a/gnu/llvm/clang/docs/HowToSetupToolingForLLVM.rst b/gnu/llvm/clang/docs/HowToSetupToolingForLLVM.rst
index dfa199ec595..cbe15abaab3 100644
--- a/gnu/llvm/clang/docs/HowToSetupToolingForLLVM.rst
+++ b/gnu/llvm/clang/docs/HowToSetupToolingForLLVM.rst
@@ -37,7 +37,7 @@ make a build directory and run CMake from it:
If you want to use clang instead of GCC, you can add
``-DCMAKE_C_COMPILER=/path/to/clang -DCMAKE_CXX_COMPILER=/path/to/clang++``.
You can also use ``ccmake``, which provides a curses interface to configure
-CMake variables for lazy people.
+CMake variables.
As a result, the new ``compile_commands.json`` file should appear in the
current directory. You should link it to the LLVM source tree so that
@@ -140,7 +140,7 @@ Examples:
return new clang::ASTConsumer();
}
-(Experimental) Using Ninja Build System
+Using Ninja Build System
=======================================
Optionally you can use the `Ninja `_
@@ -197,4 +197,3 @@ Now you are ready to build and test LLVM using Ninja:
$ ninja check-all
Other target names can be used in the same way as with make.
-
diff --git a/gnu/llvm/clang/docs/InternalsManual.rst b/gnu/llvm/clang/docs/InternalsManual.rst
index 409432efcfb..09aec6df69f 100644
--- a/gnu/llvm/clang/docs/InternalsManual.rst
+++ b/gnu/llvm/clang/docs/InternalsManual.rst
@@ -2294,9 +2294,10 @@ are created implicitly. The following spellings are accepted:
============ ================================================================
``GNU`` Spelled with a GNU-style ``__attribute__((attr))`` syntax and
placement.
- ``CXX11`` Spelled with a C++-style ``[[attr]]`` syntax. If the attribute
- is meant to be used by Clang, it should set the namespace to
- ``"clang"``.
+ ``CXX11`` Spelled with a C++-style ``[[attr]]`` syntax with an optional
+ vendor-specific namespace.
+ ``C2x`` Spelled with a C-style ``[[attr]]`` syntax with an optional
+ vendor-specific namespace.
``Declspec`` Spelled with a Microsoft-style ``__declspec(attr)`` syntax.
``Keyword`` The attribute is spelled as a keyword, and required custom
parsing.
@@ -2304,6 +2305,11 @@ are created implicitly. The following spellings are accepted:
the second is a C++-style spelling with the ``gnu`` namespace.
Attributes should only specify this spelling for attributes
supported by GCC.
+ ``Clang`` Specifies two or three spellings: the first is a GNU-style
+ spelling, the second is a C++-style spelling with the ``clang``
+ namespace, and the third is an optional C-style spelling with
+ the ``clang`` namespace. By default, a C-style spelling is
+ provided.
``Pragma`` The attribute is spelled as a ``#pragma``, and requires custom
processing within the preprocessor. If the attribute is meant to
be used by Clang, it should set the namespace to ``"clang"``.
@@ -2449,6 +2455,9 @@ Attributes that do not require custom semantic handling should set the
attributes are assumed to use a semantic handler by default. Attributes
without a semantic handler are not given a parsed attribute ``Kind`` enumerator.
+"Simple" attributes, that require no custom semantic processing aside from what
+is automatically provided, should set the ``SimpleHandler`` field to ``1``.
+
Target-specific attributes may share a spelling with other attributes in
different targets. For instance, the ARM and MSP430 targets both have an
attribute spelled ``GNU<"interrupt">``, but with different parsing and semantic
@@ -2475,12 +2484,11 @@ Boilerplate
All semantic processing of declaration attributes happens in `lib/Sema/SemaDeclAttr.cpp
`_,
and generally starts in the ``ProcessDeclAttribute()`` function. If the
-attribute is a "simple" attribute -- meaning that it requires no custom semantic
-processing aside from what is automatically provided, add a call to
-``handleSimpleAttribute(S, D, Attr);`` to the switch statement.
-Otherwise, write a new ``handleYourAttr()`` function, and add that to the switch
-statement. Please do not implement handling logic directly in the ``case`` for
-the attribute.
+attribute has the ``SimpleHandler`` field set to ``1`` then the function to
+process the attribute will be automatically generated, and nothing needs to be
+done here. Otherwise, write a new ``handleYourAttr()`` function, and add that to
+the switch statement. Please do not implement handling logic directly in the
+``case`` for the attribute.
Unless otherwise specified by the attribute definition, common semantic checking
of the parsed attribute is handled automatically. This includes diagnosing
diff --git a/gnu/llvm/clang/docs/LTOVisibility.rst b/gnu/llvm/clang/docs/LTOVisibility.rst
index 3a60f54e1b9..cdc0b9cc0e1 100644
--- a/gnu/llvm/clang/docs/LTOVisibility.rst
+++ b/gnu/llvm/clang/docs/LTOVisibility.rst
@@ -35,6 +35,16 @@ other classes receive hidden LTO visibility. Classes with internal linkage
(e.g. classes declared in unnamed namespaces) also receive hidden LTO
visibility.
+During the LTO link, all classes with public LTO visibility will be refined
+to hidden LTO visibility when the ``--lto-whole-program-visibility`` lld linker
+option is applied (``-plugin-opt=whole-program-visibility`` for gold). This flag
+can be used to defer specifying whether classes have hidden LTO visibility until
+link time, to allow bitcode objects to be shared by different LTO links.
+Due to an implementation limitation, symbols associated with classes with hidden
+LTO visibility may still be exported from the binary when using this flag. It is
+unsafe to refer to these symbols, and their visibility may be relaxed to hidden
+in a future compiler release.
+
A class defined in a translation unit built without LTO receives public
LTO visibility regardless of its object file visibility, linkage or other
attributes.
diff --git a/gnu/llvm/clang/docs/LanguageExtensions.rst b/gnu/llvm/clang/docs/LanguageExtensions.rst
index 456bcb305e3..06ecc186c7d 100644
--- a/gnu/llvm/clang/docs/LanguageExtensions.rst
+++ b/gnu/llvm/clang/docs/LanguageExtensions.rst
@@ -13,6 +13,7 @@ Clang Language Extensions
BlockLanguageSpec
Block-ABI-Apple
AutomaticReferenceCounting
+ MatrixTypes
Introduction
============
@@ -474,10 +475,10 @@ unary operators +, -- yes yes yes --
+,--,*,/,% yes yes yes --
bitwise operators &,|,^,~ yes yes yes --
>>,<< yes yes yes --
-!, &&, || yes -- yes [#]_ --
+!, &&, || yes -- yes --
==, !=, >, <, >=, <= yes yes yes --
= yes yes yes yes
-:? [#]_ yes -- yes --
+?: [#]_ yes -- yes --
sizeof yes yes yes yes
C-style cast yes yes yes no
reinterpret_cast yes no yes no
@@ -487,16 +488,35 @@ const_cast no no no no
See also :ref:`langext-__builtin_shufflevector`, :ref:`langext-__builtin_convertvector`.
-.. [#] unary operator ! is not implemented, however && and || are.
-.. [#] While OpenCL and GCC vectors both implement the comparison operator(?:) as a
- 'select', they operate somewhat differently. OpenCL selects based on signedness of
- the condition operands, but GCC vectors use normal bool conversions (that is, != 0).
+.. [#] ternary operator(?:) has different behaviors depending on condition
+ operand's vector type. If the condition is a GNU vector (i.e. __vector_size__),
+ it's only available in C++ and uses normal bool conversions (that is, != 0).
+ If it's an extension (OpenCL) vector, it's only available in C and OpenCL C.
+ And it selects base on signedness of the condition operands (OpenCL v1.1 s6.3.9).
+
+Matrix Types
+============
+
+Clang provides an extension for matrix types, which is currently being
+implemented. See :ref:`the draft specification ` for more details.
+
+For example, the code below uses the matrix types extension to multiply two 4x4
+float matrices and add the result to a third 4x4 matrix.
+
+.. code-block:: c++
+
+ typedef float m4x4_t __attribute__((matrix_type(4, 4)));
+
+ m4x4_t f(m4x4_t a, m4x4_t b, m4x4_t c) {
+ return a + b * c;
+ }
+
Half-Precision Floating Point
=============================
-Clang supports two half-precision (16-bit) floating point types: ``__fp16`` and
-``_Float16``. These types are supported in all language modes.
+Clang supports three half-precision (16-bit) floating point types: ``__fp16``,
+``_Float16`` and ``__bf16``. These types are supported in all language modes.
``__fp16`` is supported on every target, as it is purely a storage format; see below.
``_Float16`` is currently only supported on the following targets, with further
@@ -508,6 +528,12 @@ targets pending ABI standardization:
``_Float16`` will be supported on more targets as they define ABIs for it.
+``__bf16`` is purely a storage format; it is currently only supported on the following targets:
+* 32-bit ARM
+* 64-bit ARM (AArch64)
+
+The ``__bf16`` type is only available when supported in hardware.
+
``__fp16`` is a storage and interchange format only. This means that values of
``__fp16`` are immediately promoted to (at least) ``float`` when used in arithmetic
operations, so that e.g. the result of adding two ``__fp16`` values has type ``float``.
@@ -1255,6 +1281,34 @@ the clang implementation are in :doc:`Block-ABI-Apple`.
Query for this feature with ``__has_extension(blocks)``.
+ASM Goto with Output Constraints
+================================
+
+In addition to the functionality provided by `GCC's extended
+assembly `_, clang
+supports output constraints with the `goto` form.
+
+The goto form of GCC's extended assembly allows the programmer to branch to a C
+label from within an inline assembly block. Clang extends this behavior by
+allowing the programmer to use output constraints:
+
+.. code-block:: c++
+
+ int foo(int x) {
+ int y;
+ asm goto("# %0 %1 %l2" : "=r"(y) : "r"(x) : : err);
+ return y;
+ err:
+ return -1;
+ }
+
+It's important to note that outputs are valid only on the "fallthrough" branch.
+Using outputs on an indirect branch may result in undefined behavior. For
+example, in the function above, use of the value assigned to `y` in the `err`
+block is undefined behavior.
+
+Query for this feature with ``__has_extension(gnu_asm_goto_with_outputs)``.
+
Objective-C Features
====================
@@ -1755,6 +1809,52 @@ controlled state.
.. _langext-__builtin_shufflevector:
+``__builtin_dump_struct``
+-------------------------
+
+**Syntax**:
+
+.. code-block:: c++
+
+ __builtin_dump_struct(&some_struct, &some_printf_func);
+
+**Examples**:
+
+.. code-block:: c++
+
+ struct S {
+ int x, y;
+ float f;
+ struct T {
+ int i;
+ } t;
+ };
+
+ void func(struct S *s) {
+ __builtin_dump_struct(s, &printf);
+ }
+
+Example output:
+
+.. code-block:: none
+
+ struct S {
+ int i : 100
+ int j : 42
+ float f : 3.14159
+ struct T t : struct T {
+ int i : 1997
+ }
+ }
+
+**Description**:
+
+The '``__builtin_dump_struct``' function is used to print the fields of a simple
+structure and their values for debugging purposes. The builtin accepts a pointer
+to a structure to dump the fields of, and a pointer to a formatted output
+function whose signature must be: ``int (*)(const char *, ...)`` and must
+support the format specifiers used by ``printf()``.
+
``__builtin_shufflevector``
---------------------------
@@ -2055,21 +2155,32 @@ object that overloads ``operator&``.
``__builtin_operator_new`` and ``__builtin_operator_delete``
------------------------------------------------------------
-``__builtin_operator_new`` allocates memory just like a non-placement non-class
-*new-expression*. This is exactly like directly calling the normal
-non-placement ``::operator new``, except that it allows certain optimizations
+A call to ``__builtin_operator_new(args)`` is exactly the same as a call to
+``::operator new(args)``, except that it allows certain optimizations
that the C++ standard does not permit for a direct function call to
``::operator new`` (in particular, removing ``new`` / ``delete`` pairs and
-merging allocations).
+merging allocations), and that the call is required to resolve to a
+`replaceable global allocation function
+`_.
-Likewise, ``__builtin_operator_delete`` deallocates memory just like a
-non-class *delete-expression*, and is exactly like directly calling the normal
-``::operator delete``, except that it permits optimizations. Only the unsized
-form of ``__builtin_operator_delete`` is currently available.
+Likewise, ``__builtin_operator_delete`` is exactly the same as a call to
+``::operator delete(args)``, except that it permits optimizations
+and that the call is required to resolve to a
+`replaceable global deallocation function
+`_.
These builtins are intended for use in the implementation of ``std::allocator``
and other similar allocation libraries, and are only available in C++.
+Query for this feature with ``__has_builtin(__builtin_operator_new)`` or
+``__has_builtin(__builtin_operator_delete)``:
+
+ * If the value is at least ``201802L``, the builtins behave as described above.
+
+ * If the value is non-zero, the builtins may not support calling arbitrary
+ replaceable global (de)allocation functions, but do support calling at least
+ ``::operator new(size_t)`` and ``::operator delete(void*)``.
+
``__builtin_preserve_access_index``
-----------------------------------
@@ -2102,6 +2213,30 @@ argument.
int *pb =__builtin_preserve_access_index(&v->c[3].b);
__builtin_preserve_access_index(v->j);
+``__builtin_unique_stable_name``
+--------------------------------
+
+``__builtin_unique_stable_name()`` is a builtin that takes a type or expression and
+produces a string literal containing a unique name for the type (or type of the
+expression) that is stable across split compilations.
+
+In cases where the split compilation needs to share a unique token for a type
+across the boundary (such as in an offloading situation), this name can be used
+for lookup purposes.
+
+This builtin is superior to RTTI for this purpose for two reasons. First, this
+value is computed entirely at compile time, so it can be used in constant
+expressions. Second, this value encodes lambda functions based on line-number
+rather than the order in which it appears in a function. This is valuable
+because it is stable in cases where an unrelated lambda is introduced
+conditionally in the same function.
+
+The current implementation of this builtin uses a slightly modified Itanium
+Mangler to produce the unique name. The lambda ordinal is replaced with one or
+more line/column pairs in the format ``LINE->COL``, separated with a ``~``
+character. Typically, only one pair will be included, however in the case of
+macro expansions the entire macro expansion stack is expressed.
+
Multiprecision Arithmetic Builtins
----------------------------------
@@ -2145,7 +2280,7 @@ Checked Arithmetic Builtins
---------------------------
Clang provides a set of builtins that implement checked arithmetic for security
-critical applications in a manner that is fast and easily expressable in C. As
+critical applications in a manner that is fast and easily expressible in C. As
an example of their usage:
.. code-block:: c
@@ -2224,10 +2359,11 @@ String builtins
---------------
Clang provides constant expression evaluation support for builtins forms of
-the following functions from the C standard library ```` header:
+the following functions from the C standard library headers
+```` and ````:
* ``memchr``
-* ``memcmp``
+* ``memcmp`` (and its deprecated BSD / POSIX alias ``bcmp``)
* ``strchr``
* ``strcmp``
* ``strlen``
@@ -2257,9 +2393,49 @@ In addition to the above, one further builtin is provided:
constant expressions in C++11 onwards (where a cast from ``void*`` to ``char*``
is disallowed in general).
-Support for constant expression evaluation for the above builtins be detected
+Constant evaluation support for the ``__builtin_mem*`` functions is provided
+only for arrays of ``char``, ``signed char``, ``unsigned char``, or ``char8_t``,
+despite these functions accepting an argument of type ``const void*``.
+
+Support for constant expression evaluation for the above builtins can be detected
with ``__has_feature(cxx_constexpr_string_builtins)``.
+Memory builtins
+---------------
+
+ * ``__builtin_memcpy_inline``
+
+.. code-block:: c
+
+ void __builtin_memcpy_inline(void *dst, const void *src, size_t size);
+
+``__builtin_memcpy_inline(dst, src, size)`` is identical to
+``__builtin_memcpy(dst, src, size)`` except that the generated code is
+guaranteed not to call any external functions. See [LLVM IR ‘llvm.memcpy.inline’
+Intrinsic](https://llvm.org/docs/LangRef.html#llvm-memcpy-inline-intrinsic) for
+more information.
+
+Note that the `size` argument must be a compile time constant.
+
+Clang provides constant expression evaluation support for builtin forms of the
+following functions from the C standard library headers
+```` and ````:
+
+* ``memcpy``
+* ``memmove``
+* ``wmemcpy``
+* ``wmemmove``
+
+In each case, the builtin form has the name of the C library function prefixed
+by ``__builtin_``.
+
+Constant evaluation support is only provided when the source and destination
+are pointers to arrays with the same trivially copyable element type, and the
+given size is an exact multiple of the element size that is no greater than
+the number of elements accessible through the source and destination operands.
+
+Constant evaluation support is not yet provided for ``__builtin_memcpy_inline``.
+
Atomic Min/Max builtins with memory ordering
--------------------------------------------
@@ -2521,7 +2697,7 @@ pointers and integers.
These builtins can be used to avoid relying on implementation-defined behavior
of arithmetic on integers derived from pointers.
Additionally, these builtins retain type information and, unlike bitwise
-arithmentic, they can perform semantic checking on the alignment value.
+arithmetic, they can perform semantic checking on the alignment value.
**Syntax**:
@@ -3004,16 +3180,36 @@ at the start of a compound statement (excluding comments). When using within a
compound statement, the pragma is active within the scope of the compound
statement.
-Currently, only FP contraction can be controlled with the pragma. ``#pragma
-clang fp contract`` specifies whether the compiler should contract a multiply
-and an addition (or subtraction) into a fused FMA operation when supported by
-the target.
+Currently, the following settings can be controlled with this pragma:
+
+``#pragma clang fp reassociate`` allows control over the reassociation
+of floating point expressions. When enabled, this pragma allows the expression
+``x + (y + z)`` to be reassociated as ``(x + y) + z``.
+Reassociation can also occur across multiple statements.
+This pragma can be used to disable reassociation when it is otherwise
+enabled for the translation unit with the ``-fassociative-math`` flag.
+The pragma can take two values: ``on`` and ``off``.
+
+.. code-block:: c++
+
+ float f(float x, float y, float z)
+ {
+ // Enable floating point reassociation across statements
+ #pragma fp reassociate(on)
+ float t = x + y;
+ float v = t + z;
+ }
+
+
+``#pragma clang fp contract`` specifies whether the compiler should
+contract a multiply and an addition (or subtraction) into a fused FMA
+operation when supported by the target.
The pragma can take three values: ``on``, ``fast`` and ``off``. The ``on``
option is identical to using ``#pragma STDC FP_CONTRACT(ON)`` and it allows
-fusion as specified the language standard. The ``fast`` option allows fusiong
+fusion as specified the language standard. The ``fast`` option allows fusion
in cases when the language standard does not make this possible (e.g. across
-statements in C)
+statements in C).
.. code-block:: c++
@@ -3028,6 +3224,41 @@ The pragma can also be used with ``off`` which turns FP contraction off for a
section of the code. This can be useful when fast contraction is otherwise
enabled for the translation unit with the ``-ffp-contract=fast`` flag.
+The ``#pragma float_control`` pragma allows precise floating-point
+semantics and floating-point exception behavior to be specified
+for a section of the source code. This pragma can only appear at file scope or
+at the start of a compound statement (excluding comments). When using within a
+compound statement, the pragma is active within the scope of the compound
+statement. This pragma is modeled after a Microsoft pragma with the
+same spelling and syntax. For pragmas specified at file scope, a stack
+is supported so that the ``pragma float_control`` settings can be pushed or popped.
+
+When ``pragma float_control(precise, on)`` is enabled, the section of code
+governed by the pragma uses precise floating point semantics, effectively
+``-ffast-math`` is disabled and ``-ffp-contract=on``
+(fused multiply add) is enabled.
+
+When ``pragma float_control(except, on)`` is enabled, the section of code governed
+by the pragma behaves as though the command-line option
+``-ffp-exception-behavior=strict`` is enabled,
+when ``pragma float_control(precise, off)`` is enabled, the section of code
+governed by the pragma behaves as though the command-line option
+``-ffp-exception-behavior=ignore`` is enabled.
+
+The full syntax this pragma supports is
+``float_control(except|precise, on|off [, push])`` and
+``float_control(push|pop)``.
+The ``push`` and ``pop`` forms, including using ``push`` as the optional
+third argument, can only occur at file scope.
+
+.. code-block:: c++
+
+ for(...) {
+ // This block will be compiled with -fno-fast-math and -ffp-contract=on
+ #pragma float_control(precise, on)
+ a = b[i] * c[i] + e;
+ }
+
Specifying an attribute for multiple declarations (#pragma clang attribute)
===========================================================================
@@ -3186,6 +3417,9 @@ Clang supports the following match rules:
- ``variable(is_global)``: Can be used to apply attributes to global variables
only.
+- ``variable(is_local)``: Can be used to apply attributes to local variables
+ only.
+
- ``variable(is_parameter)``: Can be used to apply attributes to parameters
only.
@@ -3311,3 +3545,56 @@ Since the size of ``buffer`` can't be known at compile time, Clang will fold
``__builtin_object_size(buffer, 0)`` into ``-1``. However, if this was written
as ``__builtin_dynamic_object_size(buffer, 0)``, Clang will fold it into
``size``, providing some extra runtime safety.
+
+Extended Integer Types
+======================
+
+Clang supports a set of extended integer types under the syntax ``_ExtInt(N)``
+where ``N`` is an integer that specifies the number of bits that are used to represent
+the type, including the sign bit. The keyword ``_ExtInt`` is a type specifier, thus
+it can be used in any place a type can, including as a non-type-template-parameter,
+as the type of a bitfield, and as the underlying type of an enumeration.
+
+An extended integer can be declared either signed, or unsigned by using the
+``signed``/``unsigned`` keywords. If no sign specifier is used or if the ``signed``
+keyword is used, the extended integer type is a signed integer and can represent
+negative values.
+
+The ``N`` expression is an integer constant expression, which specifies the number
+of bits used to represent the type, following normal integer representations for
+both signed and unsigned types. Both a signed and unsigned extended integer of the
+same ``N`` value will have the same number of bits in its representation. Many
+architectures don't have a way of representing non power-of-2 integers, so these
+architectures emulate these types using larger integers. In these cases, they are
+expected to follow the 'as-if' rule and do math 'as-if' they were done at the
+specified number of bits.
+
+In order to be consistent with the C language specification, and make the extended
+integer types useful for their intended purpose, extended integers follow the C
+standard integer conversion ranks. An extended integer type has a greater rank than
+any integer type with less precision. However, they have lower rank than any
+of the built in or other integer types (such as __int128). Usual arithmetic conversions
+also work the same, where the smaller ranked integer is converted to the larger.
+
+The one exception to the C rules for integers for these types is Integer Promotion.
+Unary +, -, and ~ operators typically will promote operands to ``int``. Doing these
+promotions would inflate the size of required hardware on some platforms, so extended
+integer types aren't subject to the integer promotion rules in these cases.
+
+In languages (such as OpenCL) that define shift by-out-of-range behavior as a mask,
+non-power-of-two versions of these types use an unsigned remainder operation to constrain
+the value to the proper range, preventing undefined behavior.
+
+Extended integer types are aligned to the next greatest power-of-2 up to 64 bits.
+The size of these types for the purposes of layout and ``sizeof`` are the number of
+bits aligned to this calculated alignment. This permits the use of these types in
+allocated arrays using common ``sizeof(Array)/sizeof(ElementType)`` pattern.
+
+Extended integer types work with the C _Atomic type modifier, however only precisions
+that are powers-of-2 greater than 8 bit are accepted.
+
+Extended integer types align with existing calling conventions. They have the same size
+and alignment as the smallest basic type that can contain them. Types that are larger
+than 64 bits are handled in the same way as _int128 is handled; they are conceptually
+treated as struct of register size chunks. They number of chunks are the smallest
+number that can contain the types which does not necessarily mean a power-of-2 size.
diff --git a/gnu/llvm/clang/docs/LibASTImporter.rst b/gnu/llvm/clang/docs/LibASTImporter.rst
index 9c02b6ae76e..bedaf527f5e 100644
--- a/gnu/llvm/clang/docs/LibASTImporter.rst
+++ b/gnu/llvm/clang/docs/LibASTImporter.rst
@@ -119,7 +119,7 @@ Now we create the Importer and do the import:
llvm::Expected ImportedOrErr = Importer.Import(From);
The ``Import`` call returns with ``llvm::Expected``, so, we must check for any error.
-Please refer to the `error handling `_ documentation for details.
+Please refer to the `error handling `_ documentation for details.
.. code-block:: cpp
diff --git a/gnu/llvm/clang/docs/LibASTMatchersReference.html b/gnu/llvm/clang/docs/LibASTMatchersReference.html
index 5bb181b04d3..60ff6ffe605 100644
--- a/gnu/llvm/clang/docs/LibASTMatchersReference.html
+++ b/gnu/llvm/clang/docs/LibASTMatchersReference.html
@@ -50,7 +50,7 @@ matcher's source documentation.
Within each category the matchers are ordered by node type they match on.
-Note that if a matcher can match multiple node types, it will it will appear
+Note that if a matcher can match multiple node types, it will appear
multiple times. This means that by searching for Matcher<Stmt> you can
find all matchers that can be used to match on Stmt nodes.
@@ -502,6 +502,20 @@ in
+Matcher<Decl> | tagDecl | Matcher<TagDecl>... |
+Matches tag declarations.
+
+Example matches X, Z, U, S, E
+ class X;
+ template<class T> class Z {};
+ struct S {};
+ union U {};
+ enum E {
+ A, B, C
+ };
+ |
+
+
Matcher<Decl> | templateTypeParmDecl | Matcher<TemplateTypeParmDecl>... |
Matches template type parameter declarations.
@@ -662,9 +676,10 @@ Given
#pragma omp parallel default(none)
#pragma omp parallel default(shared)
+ #pragma omp parallel default(firstprivate)
#pragma omp parallel
-``ompDefaultClause()`` matches ``default(none)`` and ``default(shared)``.
+``ompDefaultClause()`` matches ``default(none)``, ``default(shared)``, and ``default(firstprivate)``.
|
@@ -1003,6 +1018,21 @@ cxxNewExpr()
+Matcher<Stmt> | cxxNoexceptExpr | Matcher<CXXNoexceptExpr>... |
+Matches noexcept expressions.
+
+Given
+ bool a() noexcept;
+ bool b() noexcept(true);
+ bool c() noexcept(false);
+ bool d() noexcept(noexcept(a()));
+ bool e = noexcept(b()) || noexcept(c());
+cxxNoexceptExpr()
+ matches `noexcept(a())`, `noexcept(b())` and `noexcept(c())`.
+ doesn't match the noexcept specifier in the declarations a, b, c or d.
+ |
+
+
Matcher<Stmt> | cxxNullPtrLiteralExpr | Matcher<CXXNullPtrLiteralExpr>... |
Matches nullptr literal.
|
@@ -1197,6 +1227,11 @@ Example matches std::string()
+Matcher<Stmt> | fixedPointLiteral | Matcher<FixedPointLiteral>... |
+Matches fixed point literals
+ |
+
+
Matcher<Stmt> | floatLiteral | Matcher<FloatingLiteral>... |
Matches float literals of all sizes / encodings, e.g.
1.0, 1.0f, 1.0L and 1e10.
@@ -1721,6 +1756,20 @@ decltypeType()
|
+Matcher<Type> | deducedTemplateSpecializationType | Matcher<DeducedTemplateSpecializationType>... |
+Matches C++17 deduced template specialization types, e.g. deduced class
+template types.
+
+Given
+ template <typename T>
+ class C { public: C(T); };
+
+ C c(123);
+deducedTemplateSpecializationType() matches the type in the declaration
+of the variable c.
+ |
+
+
Matcher<Type> | dependentSizedArrayType | Matcher<DependentSizedArrayType>... |
Matches C++ arrays whose size is a value-dependent expression.
@@ -2085,6 +2134,16 @@ Usable as: Any Matcher
|
+Matcher<BinaryOperator> | hasAnyOperatorName | StringRef, ..., StringRef |
+Matches operator expressions (binary or unary) that have any of the
+specified names.
+
+ hasAnyOperatorName("+", "-")
+ Is equivalent to
+ anyOf(hasOperatorName("+"), hasOperatorName("-"))
+ |
+
+
Matcher<BinaryOperator> | hasOperatorName | std::string Name |
Matches the operator Name of operator expressions (binary or
unary).
@@ -2104,7 +2163,90 @@ Example 1: matches a += b (matcher = binaryOperator(isAssignmentOperator()))
Example 2: matches s1 = s2
(matcher = cxxOperatorCallExpr(isAssignmentOperator()))
struct S { S& operator=(const S&); };
- void x() { S s1, s2; s1 = s2; })
+ void x() { S s1, s2; s1 = s2; }
+ |
+
+
+Matcher<BinaryOperator> | isComparisonOperator | |
+Matches comparison operators.
+
+Example 1: matches a == b (matcher = binaryOperator(isComparisonOperator()))
+ if (a == b)
+ a += b;
+
+Example 2: matches s1 < s2
+ (matcher = cxxOperatorCallExpr(isComparisonOperator()))
+ struct S { bool operator<(const S& other); };
+ void x(S s1, S s2) { bool b1 = s1 < s2; }
+ |
+
+
+Matcher<CXXBaseSpecifier> | isPrivate | |
+Matches private C++ declarations and C++ base specifers that specify private
+inheritance.
+
+Examples:
+ class C {
+ public: int a;
+ protected: int b;
+ private: int c; // fieldDecl(isPrivate()) matches 'c'
+ };
+
+ struct Base {};
+ struct Derived1 : private Base {}; // matches 'Base'
+ class Derived2 : Base {}; // matches 'Base'
+ |
+
+
+Matcher<CXXBaseSpecifier> | isProtected | |
+Matches protected C++ declarations and C++ base specifers that specify
+protected inheritance.
+
+Examples:
+ class C {
+ public: int a;
+ protected: int b; // fieldDecl(isProtected()) matches 'b'
+ private: int c;
+ };
+
+ class Base {};
+ class Derived : protected Base {}; // matches 'Base'
+ |
+
+
+Matcher<CXXBaseSpecifier> | isPublic | |
+Matches public C++ declarations and C++ base specifers that specify public
+inheritance.
+
+Examples:
+ class C {
+ public: int a; // fieldDecl(isPublic()) matches 'a'
+ protected: int b;
+ private: int c;
+ };
+
+ class Base {};
+ class Derived1 : public Base {}; // matches 'Base'
+ struct Derived2 : Base {}; // matches 'Base'
+ |
+
+
+Matcher<CXXBaseSpecifier> | isVirtual | |
+Matches declarations of virtual methods and C++ base specifers that specify
+virtual inheritance.
+
+Example:
+ class A {
+ public:
+ virtual void x(); // matches x
+ };
+
+Example:
+ class Base {};
+ class DirectlyDerived : virtual Base {}; // matches Base
+ class IndirectlyDerived : DirectlyDerived, Base {}; // matches Base
+
+Usable as: Matcher<CXXMethodDecl>, Matcher<CXXBaseSpecifier>
|
@@ -2495,14 +2637,21 @@ cxxConstructorDecl(isUserProvided()) will match #1, but not #2 or #3.
Matcher<CXXMethodDecl> | isVirtual | |
-Matches if the given method declaration is virtual.
+Matches declarations of virtual methods and C++ base specifers that specify
+virtual inheritance.
-Given
+Example:
class A {
public:
- virtual void x();
+ virtual void x(); // matches x
};
- matches A::x
+
+Example:
+ class Base {};
+ class DirectlyDerived : virtual Base {}; // matches Base
+ class IndirectlyDerived : DirectlyDerived, Base {}; // matches Base
+
+Usable as: Matcher<CXXMethodDecl>, Matcher<CXXBaseSpecifier>
|
@@ -2532,6 +2681,18 @@ cxxNewExpr(isArray())
|
+Matcher<CXXOperatorCallExpr> | hasAnyOverloadedOperatorName | StringRef, ..., StringRef |
+Matches overloaded operator names.
+
+Matches overloaded operator names specified in strings without the
+"operator" prefix: e.g. "<<".
+
+ hasAnyOverloadesOperatorName("+", "-")
+Is equivalent to
+ anyOf(hasOverloadedOperatorName("+"), hasOverloadedOperatorName("-"))
+ |
+
+
Matcher<CXXOperatorCallExpr> | hasOverloadedOperatorName | StringRef Name |
Matches overloaded operator names.
@@ -2563,7 +2724,21 @@ Example 1: matches a += b (matcher = binaryOperator(isAssignmentOperator()))
Example 2: matches s1 = s2
(matcher = cxxOperatorCallExpr(isAssignmentOperator()))
struct S { S& operator=(const S&); };
- void x() { S s1, s2; s1 = s2; })
+ void x() { S s1, s2; s1 = s2; }
+ |
+
+
+Matcher<CXXOperatorCallExpr> | isComparisonOperator | |
+Matches comparison operators.
+
+Example 1: matches a == b (matcher = binaryOperator(isComparisonOperator()))
+ if (a == b)
+ a += b;
+
+Example 2: matches s1 < s2
+ (matcher = cxxOperatorCallExpr(isComparisonOperator()))
+ struct S { bool operator<(const S& other); };
+ void x(S s1, S s2) { bool b1 = s1 < s2; }
|
@@ -2697,7 +2872,7 @@ Example: matches the implicit cast around 0
int *p = 0;
If the matcher is use from clang-query, CastKind parameter
-should be passed as a quoted string. e.g., ofKind("CK_NullToPointer").
+should be passed as a quoted string. e.g., hasCastKind("CK_NullToPointer").
@@ -2833,7 +3008,7 @@ passed as a quoted string. e.g., hasAttr("attr::CUDADevice").
-Matcher<Decl> | isExpansionInFileMatching | std::string RegExp |
+Matcher<Decl> | isExpansionInFileMatching | StringRef RegExp, Regex::RegexFlags Flags = NoFlags |
Matches AST nodes that were expanded within files whose name is
partially matching a given regex.
@@ -2845,6 +3020,10 @@ ASTMatcher.h:
class Y {};
Usable as: Matcher<Decl>, Matcher<Stmt>, Matcher<TypeLoc>
+
+If the matcher is used in clang-query, RegexFlags parameter
+should be passed as a quoted string. e.g: "NoFlags".
+Flags can be combined with '|' example "IgnoreCase | BasicRegex"
|
@@ -2905,45 +3084,66 @@ cxxRecordDecl(hasName("vector"), isInStdNamespace()) will match only #1.
-Matcher<Decl> | isPrivate | |
-Matches private C++ declarations.
+Matcher<Decl> | isInstantiated | |
+Matches declarations that are template instantiations or are inside
+template instantiations.
Given
+ template<typename T> void A(T t) { T i; }
+ A(0);
+ A(0U);
+functionDecl(isInstantiated())
+ matches 'A(int) {...};' and 'A(unsigned) {...}'.
+ |
+
+
+Matcher<Decl> | isPrivate | |
+Matches private C++ declarations and C++ base specifers that specify private
+inheritance.
+
+Examples:
class C {
public: int a;
protected: int b;
- private: int c;
+ private: int c; // fieldDecl(isPrivate()) matches 'c'
};
-fieldDecl(isPrivate())
- matches 'int c;'
+
+ struct Base {};
+ struct Derived1 : private Base {}; // matches 'Base'
+ class Derived2 : Base {}; // matches 'Base'
|
Matcher<Decl> | isProtected | |
-Matches protected C++ declarations.
+Matches protected C++ declarations and C++ base specifers that specify
+protected inheritance.
-Given
+Examples:
class C {
public: int a;
- protected: int b;
+ protected: int b; // fieldDecl(isProtected()) matches 'b'
private: int c;
};
-fieldDecl(isProtected())
- matches 'int b;'
+
+ class Base {};
+ class Derived : protected Base {}; // matches 'Base'
|
Matcher<Decl> | isPublic | |
-Matches public C++ declarations.
+Matches public C++ declarations and C++ base specifers that specify public
+inheritance.
-Given
+Examples:
class C {
- public: int a;
+ public: int a; // fieldDecl(isPublic()) matches 'a'
protected: int b;
private: int c;
};
-fieldDecl(isPublic())
- matches 'int a;'
+
+ class Base {};
+ class Derived1 : public Base {}; // matches 'Base'
+ struct Derived2 : Base {}; // matches 'Base'
|
@@ -3084,6 +3284,18 @@ Usable as: Matcher< |
+Matcher<FunctionDecl> | hasAnyOverloadedOperatorName | StringRef, ..., StringRef |
+Matches overloaded operator names.
+
+Matches overloaded operator names specified in strings without the
+"operator" prefix: e.g. "<<".
+
+ hasAnyOverloadesOperatorName("+", "-")
+Is equivalent to
+ anyOf(hasOverloadedOperatorName("+"), hasOverloadedOperatorName("-"))
+ |
+
+
Matcher<FunctionDecl> | hasDynamicExceptionSpec | |
Matches functions that have a dynamic exception specification.
@@ -3473,6 +3685,16 @@ unresolvedMemberExpr(isArrow())
|
+Matcher<NamedDecl> | hasAnyName | StringRef, ..., StringRef |
+Matches NamedDecl nodes that have any of the specified names.
+
+This matcher is only provided as a performance optimization of hasName.
+ hasAnyName(a, b, c)
+ is equivalent to, but faster than
+ anyOf(hasName(a), hasName(b), hasName(c))
+ |
+
+
Matcher<NamedDecl> | hasExternalFormalLinkage | |
Matches a declaration that has external formal linkage.
@@ -3493,7 +3715,7 @@ void f() {}
|
-Matcher<NamedDecl> | hasName | const std::string Name |
+Matcher<NamedDecl> | hasName | StringRef Name |
Matches NamedDecl nodes that have the specified name.
Supports specifying enclosing namespaces or classes by prefixing the name
@@ -3508,7 +3730,7 @@ Example matches X (Name is one of "::a::b::X", "a::b::X", "b::X", "X")
|
-Matcher<NamedDecl> | matchesName | std::string RegExp |
+Matcher<NamedDecl> | matchesName | StringRef RegExp, Regex::RegexFlags Flags = NoFlags |
Matches NamedDecl nodes whose fully qualified names contain
a substring matched by the given RegExp.
@@ -3521,6 +3743,10 @@ Example matches X (regexp == "::X")
Example matches X (regexp is one of "::X", "^foo::.*X", among others)
namespace foo { namespace bar { class X; } }
+
+If the matcher is used in clang-query, RegexFlags parameter
+should be passed as a quoted string. e.g: "NoFlags".
+Flags can be combined with '|' example "IgnoreCase | BasicRegex"
|
@@ -3558,6 +3784,7 @@ Given
#pragma omp parallel
#pragma omp parallel default(none)
#pragma omp parallel default(shared)
+ #pragma omp parallel default(firstprivate)
``ompDefaultClause(isNoneKind())`` matches only ``default(none)``.
|
@@ -3571,11 +3798,26 @@ Given
#pragma omp parallel
#pragma omp parallel default(none)
#pragma omp parallel default(shared)
+ #pragma omp parallel default(firstprivate)
``ompDefaultClause(isSharedKind())`` matches only ``default(shared)``.
|
+Matcher<OMPDefaultClause> | isSharedKind | |
+Matches if the OpenMP ``default`` clause has ``firstprivate`` kind specified.
+
+Given
+
+ #pragma omp parallel
+ #pragma omp parallel default(none)
+ #pragma omp parallel default(shared)
+ #pragma omp parallel default(firstprivate)
+
+``ompDefaultClause(isFirstPrivateKind())`` matches only ``default(firstprivate)``.
+ |
+
+
Matcher<OMPExecutableDirective> | isAllowedToContainClauseKind | OpenMPClauseKind CKind |
Matches if the OpenMP directive is allowed to contain the specified OpenMP
clause kind.
@@ -3636,6 +3878,17 @@ Example matches f(0, 0) (matcher = callExpr(argumentCountIs(2)))
|
+Matcher<ObjCMessageExpr> | hasAnySelector | StringRef, ..., StringRef |
+Matches when at least one of the supplied string equals to the
+Selector.getAsString()
+
+ matcher = objCMessageExpr(hasSelector("methodA:", "methodB:"));
+ matches both of the expressions below:
+ [myObj methodA:argA];
+ [myObj methodB:argB];
+ |
+
+
Matcher<ObjCMessageExpr> | hasKeywordSelector | |
Matches when the selector is a keyword selector
@@ -3704,12 +3957,16 @@ but not
|
-Matcher<ObjCMessageExpr> | matchesSelector | std::string RegExp |
+Matcher<ObjCMessageExpr> | matchesSelector | StringRef RegExp, Regex::RegexFlags Flags = NoFlags |
Matches ObjC selectors whose name contains
a substring matched by the given RegExp.
matcher = objCMessageExpr(matchesSelector("loadHTMLStringmatches the outer message expr in the code below, but NOT the message
invocation for self.bodyView.
[self.bodyView loadHTMLString:html baseURL:NULL];
+
+If the matcher is used in clang-query, RegexFlags parameter
+should be passed as a quoted string. e.g: "NoFlags".
+Flags can be combined with '|' example "IgnoreCase | BasicRegex"
|
@@ -3793,6 +4050,23 @@ is equivalent to parmVarDecl(hasDefaultArgument()).
+Matcher<ParmVarDecl> | isAtPosition | unsigned N |
+Matches the ParmVarDecl nodes that are at the N'th position in the parameter
+list. The parameter list could be that of either a block, function, or
+objc-method.
+
+
+Given
+
+void f(int a, int b, int c) {
+}
+
+``parmVarDecl(isAtPosition(0))`` matches ``int a``.
+
+``parmVarDecl(isAtPosition(1))`` matches ``int b``.
+ |
+
+
Matcher<QualType> | asString | std::string Name |
Matches if the matched type is represented by the given string.
@@ -3942,36 +4216,6 @@ functionDecl(hasAnyParameter(hasType(isVolatileQualified())))
|
-Matcher<RecordDecl> | isClass | |
-Matches RecordDecl object that are spelled with "class."
-
-Example matches C, but not S or U.
- struct S {};
- class C {};
- union U {};
- |
-
-
-Matcher<RecordDecl> | isStruct | |
-Matches RecordDecl object that are spelled with "struct."
-
-Example matches S, but not C or U.
- struct S {};
- class C {};
- union U {};
- |
-
-
-Matcher<RecordDecl> | isUnion | |
-Matches RecordDecl object that are spelled with "union."
-
-Example matches U, but not C or S.
- struct S {};
- class C {};
- union U {};
- |
-
-
Matcher<Stmt> | equalsBoundNode | std::string ID |
Matches if a node equals a previously bound node.
@@ -4002,7 +4246,18 @@ Stmt has pointer identity in the AST.
|
-Matcher<Stmt> | isExpansionInFileMatching | std::string RegExp |
+Matcher<Stmt> | isExpandedFromMacro | llvm::StringRef MacroName |
+Matches statements that are (transitively) expanded from the named macro.
+Does not match if only part of the statement is expanded from that macro or
+if different parts of the the statement are expanded from different
+appearances of the macro.
+
+FIXME: Change to be a polymorphic matcher that works on any syntactic
+node. There's nothing `Stmt`-specific about it.
+ |
+
+
+Matcher<Stmt> | isExpansionInFileMatching | StringRef RegExp, Regex::RegexFlags Flags = NoFlags |
Matches AST nodes that were expanded within files whose name is
partially matching a given regex.
@@ -4014,6 +4269,10 @@ ASTMatcher.h:
class Y {};
Usable as: Matcher<Decl>, Matcher<Stmt>, Matcher<TypeLoc>
+
+If the matcher is used in clang-query, RegexFlags parameter
+should be passed as a quoted string. e.g: "NoFlags".
+Flags can be combined with '|' example "IgnoreCase | BasicRegex"
|
@@ -4045,16 +4304,19 @@ Usable as: Matcher<Stmt>isOMPStructuredBlock | |
-Matches the Stmt AST node that is marked as being the structured-block
-of an OpenMP executable directive.
+Matcher<Stmt> | isInTemplateInstantiation | |
+Matches statements inside of a template instantiation.
Given
-
- #pragma omp parallel
- {}
-
-``stmt(isOMPStructuredBlock()))`` matches ``{}``.
+ int j;
+ template<typename T> void A(T t) { T i; j += 42;}
+ A(0);
+ A(0U);
+declStmt(isInTemplateInstantiation())
+ matches 'int i;' and 'unsigned i'.
+unless(stmt(isInTemplateInstantiation()))
+ will NOT match j += 42; as it's shared between the template definition and
+ instantiation.
|
@@ -4075,6 +4337,17 @@ stringLiteral(hasSize(4))
|
+Matcher<TagDecl> | isClass | |
+Matches TagDecl object that are spelled with "class."
+
+Example matches C, but not S, U or E.
+ struct S {};
+ class C {};
+ union U {};
+ enum E {};
+ |
+
+
Matcher<TagDecl> | isDefinition | |
Matches if a declaration has a body attached.
@@ -4097,6 +4370,39 @@ Usable as: Matcher<TagDecl> | isEnum | |
+Matches TagDecl object that are spelled with "enum."
+
+Example matches E, but not C, S or U.
+ struct S {};
+ class C {};
+ union U {};
+ enum E {};
+ |
+
+
+Matcher<TagDecl> | isStruct | |
+Matches TagDecl object that are spelled with "struct."
+
+Example matches S, but not C, U or E.
+ struct S {};
+ class C {};
+ union U {};
+ enum E {};
+ |
+
+
+Matcher<TagDecl> | isUnion | |
+Matches TagDecl object that are spelled with "union."
+
+Example matches U, but not C, S or E.
+ struct S {};
+ class C {};
+ union U {};
+ enum E {};
+ |
+
+
Matcher<TemplateArgument> | equalsIntegralValue | std::string Value |
Matches a TemplateArgument of integral type with a given value.
@@ -4137,7 +4443,7 @@ classTemplateSpecializationDecl(templateArgumentCountIs(1))
|
-Matcher<TypeLoc> | isExpansionInFileMatching | std::string RegExp |
+Matcher<TypeLoc> | isExpansionInFileMatching | StringRef RegExp, Regex::RegexFlags Flags = NoFlags |
Matches AST nodes that were expanded within files whose name is
partially matching a given regex.
@@ -4149,6 +4455,10 @@ ASTMatcher.h:
class Y {};
Usable as: Matcher<Decl>, Matcher<Stmt>, Matcher<TypeLoc>
+
+If the matcher is used in clang-query, RegexFlags parameter
+should be passed as a quoted string. e.g: "NoFlags".
+Flags can be combined with '|' example "IgnoreCase | BasicRegex"
|
@@ -4255,6 +4565,16 @@ should be passed as a quoted string. e.g., ofKind("UETT_SizeOf").
+Matcher<UnaryOperator> | hasAnyOperatorName | StringRef, ..., StringRef |
+Matches operator expressions (binary or unary) that have any of the
+specified names.
+
+ hasAnyOperatorName("+", "-")
+ Is equivalent to
+ anyOf(hasOperatorName("+"), hasOperatorName("-"))
+ |
+
+
Matcher<UnaryOperator> | hasOperatorName | std::string Name |
Matches the operator Name of operator expressions (binary or
unary).
@@ -4494,56 +4814,6 @@ cxxRecordDecl(hasName("::X"), isTemplateInstantiation())
Usable as: Matcher<FunctionDecl>, Matcher<VarDecl>, Matcher<CXXRecordDecl>
|
-
-Matcher<internal::Matcher<Decl>> | isInstantiated | |
-Matches declarations that are template instantiations or are inside
-template instantiations.
-
-Given
- template<typename T> void A(T t) { T i; }
- A(0);
- A(0U);
-functionDecl(isInstantiated())
- matches 'A(int) {...};' and 'A(unsigned) {...}'.
- |
-
-
-Matcher<internal::Matcher<NamedDecl>> | hasAnyName | StringRef, ..., StringRef |
-Matches NamedDecl nodes that have any of the specified names.
-
-This matcher is only provided as a performance optimization of hasName.
- hasAnyName(a, b, c)
- is equivalent to, but faster than
- anyOf(hasName(a), hasName(b), hasName(c))
- |
-
-
-Matcher<internal::Matcher<ObjCMessageExpr>> | hasAnySelector | StringRef, ..., StringRef |
-Matches when at least one of the supplied string equals to the
-Selector.getAsString()
-
- matcher = objCMessageExpr(hasSelector("methodA:", "methodB:"));
- matches both of the expressions below:
- [myObj methodA:argA];
- [myObj methodB:argB];
- |
-
-
-Matcher<internal::Matcher<Stmt>> | isInTemplateInstantiation | |
-Matches statements inside of a template instantiation.
-
-Given
- int j;
- template<typename T> void A(T t) { T i; j += 42;}
- A(0);
- A(0U);
-declStmt(isInTemplateInstantiation())
- matches 'int i;' and 'unsigned i'.
-unless(stmt(isInTemplateInstantiation()))
- will NOT match j += 42; as it's shared between the template definition and
- instantiation.
- |
-
@@ -4581,6 +4851,22 @@ Usable as: Any Matcher
+Matcher<*> | findAll | Matcher<*> Matcher |
+Matches if the node or any descendant matches.
+
+Generates results for each match.
+
+For example, in:
+ class A { class B {}; class C {}; };
+The matcher:
+ cxxRecordDecl(hasName("::A"),
+ findAll(cxxRecordDecl(isDefinition()).bind("m")))
+will generate results for A, B and C.
+
+Usable as: Any Matcher
+ |
+
+
Matcher<*> | forEachDescendant | Matcher<*> |
Matches AST nodes that have descendant AST nodes that match the
provided matcher.
@@ -4689,14 +4975,12 @@ Usable as: Any Matcher
|
-Matcher<*> | optionally | Matcher<*>, ..., Matcher<*> |
-Matches any node regardless of the submatchers.
+Matcher<*> | optionally | Matcher<*> |
+Matches any node regardless of the submatcher.
-However, optionally will generate a result binding for each matching
-submatcher.
-
-Useful when additional information which may or may not present about a
-main matching node is desired.
+However, optionally will retain any bindings generated by the submatcher.
+Useful when additional information which may or may not present about a main
+matching node is desired.
For example, in:
class Foo {
@@ -4715,6 +4999,22 @@ Usable as: Any Matcher
|
+Matcher<*> | traverse | TraversalKind TK, Matcher<*> InnerMatcher |
+Causes all nested matchers to be matched with the specified traversal kind.
+
+Given
+ void foo()
+ {
+ int i = 3.0;
+ }
+The matcher
+ traverse(TK_IgnoreImplicitCastsAndParentheses,
+ varDecl(hasInitializer(floatLiteral().bind("init")))
+ )
+matches the variable declaration with "init" bound to the "3.0".
+ |
+
+
Matcher<AbstractConditionalOperator> | hasCondition | Matcher<Expr> InnerMatcher |
Matches the condition expression of an if statement, for loop,
switch statement or conditional operator.
@@ -4745,7 +5045,7 @@ Example 2 (conditional binary operator): matches opaqueValueExpr(condition)
|
-Matcher<AddrLabelExpr> | hasDeclaration | const Matcher<Decl> InnerMatcher |
+Matcher<AddrLabelExpr> | hasDeclaration | Matcher<Decl> InnerMatcher |
Matches a node if the declaration associated with that node
matches the given matcher.
@@ -4862,7 +5162,7 @@ Usable as: Matcher<BinaryOperator> | hasEitherOperand | const Matcher<Expr> InnerMatcher |
+Matcher<BinaryOperator> | hasEitherOperand | Matcher<Expr> InnerMatcher |
Matches if either the left hand side or the right hand side of a
binary operator matches.
|
@@ -4876,6 +5176,18 @@ Example matches a (matcher = binaryOperator(hasLHS()))
|
+Matcher<BinaryOperator> | hasOperands | Matcher<Expr> Matcher1, Matcher<Expr> Matcher2 |
+Matches if both matchers match with opposite sides of the binary operator.
+
+Example matcher = binaryOperator(hasOperands(integerLiteral(equals(1),
+ integerLiteral(equals(2)))
+ 1 + 2 // Match
+ 2 + 1 // Match
+ 1 + 1 // No match
+ 2 + 2 // No match
+ |
+
+
Matcher<BinaryOperator> | hasRHS | Matcher<Expr> InnerMatcher |
Matches the right hand side of binary operator expressions.
@@ -4949,6 +5261,33 @@ Usable as: Matcher<CXXBaseSpecifier> | hasType | Matcher<Decl> InnerMatcher |
+Overloaded to match the declaration of the expression's or value
+declaration's type.
+
+In case of a value declaration (for example a variable declaration),
+this resolves one layer of indirection. For example, in the value
+declaration "X x;", cxxRecordDecl(hasName("X")) matches the declaration of
+X, while varDecl(hasType(cxxRecordDecl(hasName("X")))) matches the
+declaration of x.
+
+Example matches x (matcher = expr(hasType(cxxRecordDecl(hasName("X")))))
+ and z (matcher = varDecl(hasType(cxxRecordDecl(hasName("X")))))
+ and friend class X (matcher = friendDecl(hasType("X"))
+ class X {};
+ void y(X &x) { x; X z; }
+ class Y { friend class X; };
+
+Example matches class Derived
+(matcher = cxxRecordDecl(hasAnyBase(hasType(cxxRecordDecl(hasName("Base"))))))
+class Base {};
+class Derived : Base {};
+
+Usable as: Matcher<Expr>, Matcher<FriendDecl>, Matcher<ValueDecl>,
+Matcher<CXXBaseSpecifier>
+ |
+
+
Matcher<CXXConstructExpr> | forEachArgumentWithParam | Matcher<Expr> ArgMatcher, Matcher<ParmVarDecl> ParamMatcher |
Matches all arguments and their respective ParmVarDecl.
@@ -4998,7 +5337,7 @@ Example matches y in x(y)
|
-Matcher<CXXConstructExpr> | hasDeclaration | const Matcher<Decl> InnerMatcher |
+Matcher<CXXConstructExpr> | hasDeclaration | Matcher<Decl> InnerMatcher |
Matches a node if the declaration associated with that node
matches the given matcher.
@@ -5268,6 +5607,16 @@ Example matches A() in the last line
|
+Matcher<CXXNewExpr> | hasAnyPlacementArg | Matcher<Expr> InnerMatcher |
+Matches any placement new expression arguments.
+
+Given:
+ MyClass *p1 = new (Storage) MyClass();
+cxxNewExpr(hasAnyPlacementArg(anything()))
+ matches the expression 'new (Storage, 16) MyClass()'.
+ |
+
+
Matcher<CXXNewExpr> | hasArraySize | Matcher<Expr> InnerMatcher |
Matches array new expressions with a given array size.
@@ -5278,7 +5627,7 @@ cxxNewExpr(hasArraySize(integerLiteral(equals(10))))
|
-Matcher<CXXNewExpr> | hasDeclaration | const Matcher<Decl> InnerMatcher |
+Matcher<CXXNewExpr> | hasDeclaration | Matcher<Decl> InnerMatcher |
Matches a node if the declaration associated with that node
matches the given matcher.
@@ -5312,6 +5661,46 @@ Usable as: Matcher<CXXNewExpr> | hasPlacementArg | unsigned Index, Matcher<Expr> InnerMatcher |
+Matches placement new expression arguments.
+
+Given:
+ MyClass *p1 = new (Storage, 16) MyClass();
+cxxNewExpr(hasPlacementArg(1, integerLiteral(equals(16))))
+ matches the expression 'new (Storage, 16) MyClass()'.
+ |
+
+
+Matcher<CXXRecordDecl> | hasAnyBase | Matcher<CXXBaseSpecifier> BaseSpecMatcher |
+Matches C++ classes that have a direct or indirect base matching BaseSpecMatcher.
+
+Example:
+matcher hasAnyBase(hasType(cxxRecordDecl(hasName("SpecialBase"))))
+ class Foo;
+ class Bar : Foo {};
+ class Baz : Bar {};
+ class SpecialBase;
+ class Proxy : SpecialBase {}; // matches Proxy
+ class IndirectlyDerived : Proxy {}; //matches IndirectlyDerived
+
+FIXME: Refactor this and isDerivedFrom to reuse implementation.
+ |
+
+
+Matcher<CXXRecordDecl> | hasDirectBase | Matcher<CXXBaseSpecifier> BaseSpecMatcher |
+Matches C++ classes that have a direct base matching BaseSpecMatcher.
+
+Example:
+matcher hasDirectBase(hasType(cxxRecordDecl(hasName("SpecialBase"))))
+ class Foo;
+ class Bar : Foo {};
+ class Baz : Bar {};
+ class SpecialBase;
+ class Proxy : SpecialBase {}; // matches Proxy
+ class IndirectlyDerived : Proxy {}; // doesn't match
+ |
+
+
Matcher<CXXRecordDecl> | hasMethod | Matcher<CXXMethodDecl> InnerMatcher |
Matches the first method of a class or struct that satisfies InnerMatcher.
@@ -5476,7 +5865,7 @@ Example matches y in x(y)
|
-Matcher<CallExpr> | hasDeclaration | const Matcher<Decl> InnerMatcher |
+Matcher<CallExpr> | hasDeclaration | Matcher<Decl> InnerMatcher |
Matches a node if the declaration associated with that node
matches the given matcher.
@@ -5623,7 +6012,7 @@ with compoundStmt()
|
-Matcher<DeclRefExpr> | hasDeclaration | const Matcher<Decl> InnerMatcher |
+Matcher<DeclRefExpr> | hasDeclaration | Matcher<Decl> InnerMatcher |
Matches a node if the declaration associated with that node
matches the given matcher.
@@ -5810,7 +6199,7 @@ declaration of d.
|
-Matcher<EnumType> | hasDeclaration | const Matcher<Decl> InnerMatcher |
+Matcher<EnumType> | hasDeclaration | Matcher<Decl> InnerMatcher |
Matches a node if the declaration associated with that node
matches the given matcher.
@@ -5869,7 +6258,13 @@ Example matches x (matcher = expr(hasType(cxxRecordDecl(hasName("X")))))
void y(X &x) { x; X z; }
class Y { friend class X; };
-Usable as: Matcher<Expr>, Matcher<ValueDecl>
+Example matches class Derived
+(matcher = cxxRecordDecl(hasAnyBase(hasType(cxxRecordDecl(hasName("Base"))))))
+class Base {};
+class Derived : Base {};
+
+Usable as: Matcher<Expr>, Matcher<FriendDecl>, Matcher<ValueDecl>,
+Matcher<CXXBaseSpecifier>
|
@@ -6083,7 +6478,13 @@ Example matches x (matcher = expr(hasType(cxxRecordDecl(hasName("X")))))
void y(X &x) { x; X z; }
class Y { friend class X; };
-Usable as: Matcher<Expr>, Matcher<ValueDecl>
+Example matches class Derived
+(matcher = cxxRecordDecl(hasAnyBase(hasType(cxxRecordDecl(hasName("Base"))))))
+class Base {};
+class Derived : Base {};
+
+Usable as: Matcher<Expr>, Matcher<FriendDecl>, Matcher<ValueDecl>,
+Matcher<CXXBaseSpecifier>
@@ -6322,7 +6723,7 @@ Example matches y.
-Matcher<InjectedClassNameType> | hasDeclaration | const Matcher<Decl> InnerMatcher |
+Matcher<InjectedClassNameType> | hasDeclaration | Matcher<Decl> InnerMatcher |
Matches a node if the declaration associated with that node
matches the given matcher.
@@ -6356,7 +6757,7 @@ Usable as: Matcher<LabelStmt> | hasDeclaration | const Matcher<Decl> InnerMatcher |
+Matcher<LabelStmt> | hasDeclaration | Matcher<Decl> InnerMatcher |
Matches a node if the declaration associated with that node
matches the given matcher.
@@ -6417,7 +6818,7 @@ lambdaExpr(hasAnyCapture(anything()))
|
-Matcher<MemberExpr> | hasDeclaration | const Matcher<Decl> InnerMatcher |
+Matcher<MemberExpr> | hasDeclaration | Matcher<Decl> InnerMatcher |
Matches a node if the declaration associated with that node
matches the given matcher.
@@ -6523,6 +6924,12 @@ nestedNameSpecifierLoc(hasPrefix(loc(specifiesType(asString("struct A")))))
|
+Matcher<NestedNameSpecifierLoc> | loc | Matcher<NestedNameSpecifier> InnerMatcher |
+Matches NestedNameSpecifierLocs for which the given inner
+NestedNameSpecifier-matcher matches.
+ |
+
+
Matcher<NestedNameSpecifierLoc> | specifiesTypeLoc | Matcher<TypeLoc> InnerMatcher |
Matches nested name specifier locs that specify a type matching the
given TypeLoc.
@@ -6835,7 +7242,7 @@ declaration of b but varDecl(hasType(qualType(hasCanonicalType(referenceType()))
|
-Matcher<QualType> | hasDeclaration | const Matcher<Decl> InnerMatcher |
+Matcher<QualType> | hasDeclaration | Matcher<Decl> InnerMatcher |
Matches a node if the declaration associated with that node
matches the given matcher.
@@ -6917,7 +7324,7 @@ Example matches X &x and const X &y
|
-Matcher<RecordType> | hasDeclaration | const Matcher<Decl> InnerMatcher |
+Matcher<RecordType> | hasDeclaration | Matcher<Decl> InnerMatcher |
Matches a node if the declaration associated with that node
matches the given matcher.
@@ -6992,7 +7399,7 @@ with compoundStmt()
|
-Matcher<Stmt> | alignOfExpr | const Matcher<UnaryExprOrTypeTraitExpr> InnerMatcher |
+Matcher<Stmt> | alignOfExpr | Matcher<UnaryExprOrTypeTraitExpr> InnerMatcher |
Same as unaryExprOrTypeTraitExpr, but only matching
alignof.
|
@@ -7012,7 +7419,7 @@ returnStmt(forFunction(hasName("operator=")))
-Matcher<Stmt> | sizeOfExpr | const Matcher<UnaryExprOrTypeTraitExpr> InnerMatcher |
+Matcher<Stmt> | sizeOfExpr | Matcher<UnaryExprOrTypeTraitExpr> InnerMatcher |
Same as unaryExprOrTypeTraitExpr, but only matching
sizeof.
|
@@ -7077,7 +7484,7 @@ cxxForRangeStmt(hasInitStatement(anything()))
-Matcher<TagType> | hasDeclaration | const Matcher<Decl> InnerMatcher |
+Matcher<TagType> | hasDeclaration | Matcher<Decl> InnerMatcher |
Matches a node if the declaration associated with that node
matches the given matcher.
@@ -7200,7 +7607,7 @@ functionDecl(hasAnyTemplateArgument(refersToType(asString("int"))))
|
-Matcher<TemplateSpecializationType> | hasDeclaration | const Matcher<Decl> InnerMatcher |
+Matcher<TemplateSpecializationType> | hasDeclaration | Matcher<Decl> InnerMatcher |
Matches a node if the declaration associated with that node
matches the given matcher.
@@ -7254,7 +7661,7 @@ functionDecl(hasTemplateArgument(0, refersToType(asString("int"))))
|
-Matcher<TemplateTypeParmType> | hasDeclaration | const Matcher<Decl> InnerMatcher |
+Matcher<TemplateTypeParmType> | hasDeclaration | Matcher<Decl> InnerMatcher |
Matches a node if the declaration associated with that node
matches the given matcher.
@@ -7288,39 +7695,9 @@ Usable as: Matcher<findAll | const Matcher<T> Matcher |
-Matches if the node or any descendant matches.
-
-Generates results for each match.
-
-For example, in:
- class A { class B {}; class C {}; };
-The matcher:
- cxxRecordDecl(hasName("::A"),
- findAll(cxxRecordDecl(isDefinition()).bind("m")))
-will generate results for A, B and C.
-
-Usable as: Any Matcher
- |
-
-
-Matcher<T> | traverse | ast_type_traits::TraversalKind TK, const BindableMatcher<T> InnerMatcher |
- |
-
-
-Matcher<T> | traverse | ast_type_traits::TraversalKind TK, const Matcher<T> InnerMatcher |
-Causes all nested matchers to be matched with the specified traversal kind.
-
-Given
- void foo()
- {
- int i = 3.0;
- }
-The matcher
- traverse(ast_type_traits::TK_IgnoreImplicitCastsAndParentheses,
- varDecl(hasInitializer(floatLiteral().bind("init")))
- )
-matches the variable declaration with "init" bound to the "3.0".
+Matcher<TypeLoc> | loc | Matcher<QualType> InnerMatcher |
+Matches TypeLocs for which the given inner
+QualType-matcher matches.
|
@@ -7339,7 +7716,7 @@ Example matches x (matcher = expr(hasType(cxxRecordDecl(hasName("X")))))
|
-Matcher<TypedefType> | hasDeclaration | const Matcher<Decl> InnerMatcher |
+Matcher<TypedefType> | hasDeclaration | Matcher<Decl> InnerMatcher |
Matches a node if the declaration associated with that node
matches the given matcher.
@@ -7422,7 +7799,7 @@ memberExpr(hasObjectExpression(hasType(pointsTo(
|
-Matcher<UnresolvedUsingType> | hasDeclaration | const Matcher<Decl> InnerMatcher |
+Matcher<UnresolvedUsingType> | hasDeclaration | Matcher<Decl> InnerMatcher |
Matches a node if the declaration associated with that node
matches the given matcher.
@@ -7495,7 +7872,13 @@ Example matches x (matcher = expr(hasType(cxxRecordDecl(hasName("X")))))
void y(X &x) { x; X z; }
class Y { friend class X; };
-Usable as: Matcher<Expr>, Matcher<ValueDecl>
+Example matches class Derived
+(matcher = cxxRecordDecl(hasAnyBase(hasType(cxxRecordDecl(hasName("Base"))))))
+class Base {};
+class Derived : Base {};
+
+Usable as: Matcher<Expr>, Matcher<FriendDecl>, Matcher<ValueDecl>,
+Matcher<CXXBaseSpecifier>
|
@@ -7559,18 +7942,6 @@ Example matches true (matcher = hasCondition(cxxBoolLiteral(equals(true))))
if (true) {}
-
-Matcher<internal::BindableMatcher<NestedNameSpecifierLoc>> | loc | Matcher<NestedNameSpecifier> InnerMatcher |
-Matches NestedNameSpecifierLocs for which the given inner
-NestedNameSpecifier-matcher matches.
- |
-
-
-Matcher<internal::BindableMatcher<TypeLoc>> | loc | Matcher<QualType> InnerMatcher |
-Matches TypeLocs for which the given inner
-QualType-matcher matches.
- |
-
diff --git a/gnu/llvm/clang/docs/LibFormat.rst b/gnu/llvm/clang/docs/LibFormat.rst
index 889fbbac8c7..4ea84e658d1 100644
--- a/gnu/llvm/clang/docs/LibFormat.rst
+++ b/gnu/llvm/clang/docs/LibFormat.rst
@@ -40,7 +40,7 @@ Style Options
The style options describe specific formatting options that can be used in
order to make `ClangFormat` comply with different style guides. Currently,
-two style guides are hard-coded:
+several style guides are hard-coded:
.. code-block:: c++
@@ -52,6 +52,26 @@ two style guides are hard-coded:
/// http://google-styleguide.googlecode.com/svn/trunk/cppguide.xml.
FormatStyle getGoogleStyle();
+ /// Returns a format style complying with Chromium's style guide:
+ /// https://chromium.googlesource.com/chromium/src/+/master/styleguide/styleguide.md
+ FormatStyle getChromiumStyle();
+
+ /// Returns a format style complying with the GNU coding standards:
+ /// https://www.gnu.org/prep/standards/standards.html
+ FormatStyle getGNUStyle();
+
+ /// Returns a format style complying with Mozilla's style guide
+ /// https://firefox-source-docs.mozilla.org/code-quality/coding-style/index.html
+ FormatStyle getMozillaStyle();
+
+ /// Returns a format style complying with Webkit's style guide:
+ /// https://webkit.org/code-style-guidelines/
+ FormatStyle getWebkitStyle();
+
+ /// Returns a format style complying with Microsoft's style guide:
+ /// https://docs.microsoft.com/en-us/visualstudio/ide/editorconfig-code-style-settings-reference
+ FormatStyle getMicrosoftStyle();
+
These options are also exposed in the :doc:`standalone tools `
through the `-style` option.
diff --git a/gnu/llvm/clang/docs/MatrixTypes.rst b/gnu/llvm/clang/docs/MatrixTypes.rst
new file mode 100644
index 00000000000..5d022af4412
--- /dev/null
+++ b/gnu/llvm/clang/docs/MatrixTypes.rst
@@ -0,0 +1,285 @@
+==================
+Matrix Types
+==================
+
+.. contents::
+ :local:
+
+.. _matrixtypes:
+
+Clang provides a C/C++ language extension that allows users to directly express
+fixed-size 2-dimensional matrices as language values and perform arithmetic on
+them.
+
+This feature is currently experimental, and both its design and its
+implementation are in flux.
+
+Draft Specification
+===================
+
+Matrix Type
+-----------
+
+A matrix type is a scalar type with an underlying *element type*, a constant
+number of *rows*, and a constant number of *columns*. Matrix types with the same
+element type, rows, and columns are the same type. A value of a matrix type
+includes storage for ``rows * columns`` values of the *element type*. The
+internal layout, overall size and alignment are implementation-defined.
+
+The maximum of the product of the number of rows and columns is
+implementation-defined. If that implementation-defined limit is exceeded, the
+program is ill-formed.
+
+Currently, the element type of a matrix is only permitted to be one of the
+following types:
+
+* an integer type (as in C2x 6.2.5p19), but excluding enumerated types and ``_Bool``
+* the standard floating types ``float`` or ``double``
+* a half-precision floating point type, if one is supported on the target
+
+Other types may be supported in the future.
+
+Matrix Type Attribute
+---------------------
+
+Matrix types can be declared by adding the ``matrix_type`` attribute to the
+declaration of a *typedef* (or a C++ alias declaration). The underlying type
+of the *typedef* must be a valid matrix element type. The
+attribute takes two arguments, both of which must be integer constant
+expressions that evaluate to a value greater than zero. The first specifies the
+number of rows, and the second specifies the number of columns. The underlying
+type of the *typedef* becomes a matrix type with the given dimensions and an
+element type of the former underlying type.
+
+If a declaration of a *typedef-name* has a ``matrix_type`` attribute, then all
+declaration of that *typedef-name* shall have a matrix_type attribute with the
+same element type, number of rows, and number of columns.
+
+Standard Conversions
+--------------------
+
+The standard conversions are extended as follows. Note that these conversions
+are intentionally not listed as satisfying the constraints for assignment,
+which is to say, they are only permitted as explicit casts, not as implicit
+conversions.
+
+A value of matrix type can be converted to another matrix type if the number of
+rows and columns are the same and the value's elements can be converted to the
+element type of the result type. The result is a matrix where each element is
+the converted corresponding element.
+
+A value of any real type (as in C2x 6.2.5p17) can be converted to a matrix type
+if it can be converted to the element type of the matrix. The result is a
+matrix where all elements are the converted original value.
+
+If the number of rows or columns differ between the original and resulting
+type, the program is ill-formed.
+
+
+Arithmetic Conversions
+----------------------
+
+The usual arithmetic conversions are extended as follows.
+
+Insert at the start:
+
+* If both operands are of matrix type, no arithmetic conversion is performed.
+* If one operand is of matrix type and the other operand is of a real type,
+ convert the real type operand to the matrix type
+ according to the standard conversion rules.
+
+Matrix Type Element Access Operator
+-----------------------------------
+
+An expression of the form ``E1 [E2] [E3]``, where ``E1`` has matrix type ``cv
+M``, is a matrix element access expression. Let ``T`` be the element type
+of ``M``, and let ``R`` and ``C`` be the number of rows and columns in ``M``
+respectively. The index expressions shall have integral or unscoped
+enumeration type and shall not be uses of the comma operator unless
+parenthesized. The first index expression shall evaluate to a
+non-negative value less than ``R``, and the second index expression shall
+evaluate to a non-negative value less than ``C``, or else the expression has
+undefined behavior. If ``E1`` is a prvalue, the result is a prvalue with type
+``T`` and is the value of the element at the given row and column in the matrix.
+Otherwise, the result is a glvalue with type ``cv T`` and with the same value
+category as ``E1`` which refers to the element at the given row and column in
+the matrix.
+
+Programs containing a single subscript expression into a matrix are ill-formed.
+
+**Note**: We considered providing an expression of the form
+``postfix-expression [expression]`` to access columns of a matrix. We think
+that such an expression would be problematic once both column and row major
+matrixes are supported: depending on the memory layout, either accessing columns
+or rows can be done efficiently, but not both. Instead, we propose to provide
+builtins to extract rows and columns from a matrix. This makes the operations
+more explicit.
+
+Matrix Type Binary Operators
+----------------------------
+
+Each matrix type supports the following binary operators: ``+``, ``-`` and ``*``. The ``*``
+operator provides matrix multiplication, while ``+`` and ``-`` are performed
+element-wise. There are also scalar versions of the operators, which take a
+matrix type and the matrix element type. The operation is applied to all
+elements of the matrix using the scalar value.
+
+For ``BIN_OP`` in ``+``, ``-``, ``*`` given the expression ``M1 BIN_OP M2`` where
+at least one of ``M1`` or ``M2`` is of matrix type and, for `*`, the other is of
+a real type:
+
+* The usual arithmetic conversions are applied to ``M1`` and ``M2``. [ Note: if ``M1`` or
+ ``M2`` are of a real type, they are broadcast to matrices here. — end note ]
+* ``M1`` and ``M2`` shall be of the same matrix type.
+* The result is equivalent to Res in the following where col is the number of
+ columns and row is the number of rows in the matrix type:
+
+.. code-block:: c++
+
+ decltype(M1) Res;
+ for (int C = 0; C < col; ++C)
+ for (int R = 0; R < row; ++R)
+ Res[R][C] = M1[R][C] BIN_OP M2[R][C];
+
+Given the expression ``M1 * M2`` where ``M1`` and ``M2`` are of matrix type:
+
+* The usual arithmetic conversions are applied to ``M1`` and ``M2``.
+* The type of ``M1`` shall have the same number of columns as the type of ``M2`` has
+ rows. The element types of ``M1`` and ``M2`` shall be the same type.
+* The resulting type, ``MTy``, is a matrix type with the common element type,
+ the number of rows of ``M1`` and the number of columns of ``M2``.
+* The result is equivalent to ``Res`` in the following where ``EltTy`` is the
+ element type of ``MTy``, ``col`` is the number of columns, ``row`` is the
+ number of rows in ``MTy`` and ``inner`` is the number of columns of ``M1``:
+
+.. code-block:: c++
+
+ MTy Res;
+ for (int C = 0; C < col; ++C) {
+ for (int R = 0; R < row; ++R) {
+ EltTy Elt = 0;
+ for (int K = 0; K < inner; ++K) {
+ Elt += M1[R][K] * M2[K][C];
+ }
+ Res[R][C] = Elt;
+ }
+
+All operations on matrix types match the behavior of the element type with
+respect to signed overflows.
+
+With respect to floating-point contraction, rounding and environment rules,
+operations on matrix types match the behavior of the elementwise operations
+in the corresponding expansions provided above.
+
+Operations on floating-point matrices have the same rounding and floating-point
+environment behavior as ordinary floating-point operations in the expression's
+context. For the purposes of floating-point contraction, all calculations done
+as part of a matrix operation are considered intermediate operations, and their
+results need not be rounded to the format of the element type until the final
+result in the containing expression. This is subject to the normal restrictions
+on contraction, such as ``#pragma STDC FP_CONTRACT``.
+
+For the ``+=``, ``-=`` and ``*=`` operators the semantics match their expanded
+variants.
+
+Matrix Type Builtin Operations
+------------------------------
+
+Each matrix type supports a collection of builtin expressions that look like
+function calls but do not form an overload set. Here they are described as
+function declarations with rules for how to construct the argument list types
+and return type and the library description elements from
+[library.description.structure.specifications]/3 in the C++ standard.
+
+Definitions:
+
+* *M*, *M1*, *M2*, *M3* - Matrix types
+* *T* - Element type
+* *row*, *col* - Row and column arguments respectively.
+
+
+``M2 __builtin_matrix_transpose(M1 matrix)``
+
+**Remarks**: The return type is a cv-unqualified matrix type that has the same
+element type as ``M1`` and has the the same number of rows as ``M1`` has columns and
+the same number of columns as ``M1`` has rows.
+
+**Returns**: A matrix ``Res`` equivalent to the code below, where ``col`` refers to the
+number of columns of ``M``, and ``row`` to the number of rows of ``M``.
+
+**Effects**: Equivalent to:
+
+.. code-block:: c++
+
+ M Res;
+ for (int C = 0; C < col; ++C)
+ for (int R = 0; R < row; ++R)
+ Res[C][R] = matrix[R][C];
+
+
+``M __builtin_matrix_column_major_load(T *ptr, size_t row, size_t col, size_t columnStride)``
+
+**Mandates**: ``row`` and ``col`` shall be integral constants greater than 0.
+
+**Preconditions**: ``columnStride`` is greater than or equal to ``row``.
+
+**Remarks**: The return type is a cv-unqualified matrix type with an element
+type of the cv-unqualified version of ``T`` and a number of rows and columns equal
+to ``row`` and ``col`` respectively. The parameter ``columnStride`` is optional
+and if omitted ``row`` is used as ``columnStride``.
+
+**Returns**: A matrix ``Res`` equivalent to:
+
+.. code-block:: c++
+
+ M Res;
+ for (size_t C = 0; C < col; ++C) {
+ for (size_t R = 0; R < row; ++K)
+ Res[R][C] = ptr[R];
+ ptr += columnStride
+ }
+
+
+``void __builtin_matrix_column_major_store(M matrix, T *ptr, size_t columnStride)``
+
+**Preconditions**: ``columnStride`` is greater than or equal to the number of rows in ``M``.
+
+**Remarks**: The type ``T`` is the const-unqualified version of the matrix
+argument’s element type. The parameter ``columnStride`` is optional and if
+omitted, the number of rows of ``M`` is used as ``columnStride``.
+
+**Effects**: Equivalent to:
+
+.. code-block:: c++
+
+ for (size_t C = 0; C < columns in M; ++C) {
+ for (size_t R = 0; R < rows in M; ++K)
+ ptr[R] = matrix[R][C];
+ ptr += columnStride
+ }
+
+
+TODOs
+-----
+
+TODO: Does it make sense to allow M::element_type, M::rows, and M::columns
+where M is a matrix type? We don’t support this anywhere else, but it’s
+convenient. The alternative is using template deduction to extract this
+information. Also add spelling for C.
+
+Future Work: Initialization syntax.
+
+
+Decisions for the Implementation in Clang
+=========================================
+
+This section details decisions taken for the implementation in Clang and is not
+part of the draft specification.
+
+The elements of a value of a matrix type are laid out in column-major order
+without padding.
+
+We propose to provide a Clang option to override this behavior and allow
+contraction of those operations (e.g. *-ffp-contract=matrix*).
+
+TODO: Specify how matrix values are passed to functions.
diff --git a/gnu/llvm/clang/docs/OpenMPSupport.rst b/gnu/llvm/clang/docs/OpenMPSupport.rst
index d3050e009a4..000f23141af 100644
--- a/gnu/llvm/clang/docs/OpenMPSupport.rst
+++ b/gnu/llvm/clang/docs/OpenMPSupport.rst
@@ -131,7 +131,7 @@ implementation.
+------------------------------+--------------------------------------------------------------+--------------------------+-----------------------------------------------------------------------+
| loop extension | clause: if for SIMD directives | :good:`done` | |
+------------------------------+--------------------------------------------------------------+--------------------------+-----------------------------------------------------------------------+
-| loop extension | inclusive scan extension (matching C++17 PSTL) | :none:`unclaimed` | |
+| loop extension | inclusive scan extension (matching C++17 PSTL) | :good:`done` | |
+------------------------------+--------------------------------------------------------------+--------------------------+-----------------------------------------------------------------------+
| memory mangagement | memory allocators | :good:`done` | r341687,r357929 |
+------------------------------+--------------------------------------------------------------+--------------------------+-----------------------------------------------------------------------+
@@ -149,7 +149,7 @@ implementation.
+------------------------------+--------------------------------------------------------------+--------------------------+-----------------------------------------------------------------------+
| task extension | clause: depend on the taskwait construct | :part:`worked on` | |
+------------------------------+--------------------------------------------------------------+--------------------------+-----------------------------------------------------------------------+
-| task extension | depend objects and detachable tasks | :part:`worked on` | |
+| task extension | depend objects and detachable tasks | :good:`done` | |
+------------------------------+--------------------------------------------------------------+--------------------------+-----------------------------------------------------------------------+
| task extension | mutexinoutset dependence-type for tasks | :good:`done` | D53380,D57576 |
+------------------------------+--------------------------------------------------------------+--------------------------+-----------------------------------------------------------------------+
@@ -179,6 +179,10 @@ implementation.
+------------------------------+--------------------------------------------------------------+--------------------------+-----------------------------------------------------------------------+
| device extension | clause: device_type | :good:`done` | |
+------------------------------+--------------------------------------------------------------+--------------------------+-----------------------------------------------------------------------+
+| device extension | clause: extended device | :good:`done` | |
++------------------------------+--------------------------------------------------------------+--------------------------+-----------------------------------------------------------------------+
+| device extension | clause: uses_allocators clause | :good:`done` | |
++------------------------------+--------------------------------------------------------------+--------------------------+-----------------------------------------------------------------------+
| device extension | clause: in_reduction | :part:`worked on` | r308768 |
+------------------------------+--------------------------------------------------------------+--------------------------+-----------------------------------------------------------------------+
| device extension | omp_get_device_num() | :part:`worked on` | D54342 |
@@ -191,49 +195,59 @@ implementation.
+------------------------------+--------------------------------------------------------------+--------------------------+-----------------------------------------------------------------------+
| device extension | allow access to the reference count (omp_target_is_present) | :part:`worked on` | |
+------------------------------+--------------------------------------------------------------+--------------------------+-----------------------------------------------------------------------+
-| device extension | requires directive (unified shared memory) | :good:`done` | |
+| device extension | requires directive | :part:`partial` | |
++------------------------------+--------------------------------------------------------------+--------------------------+-----------------------------------------------------------------------+
+| device extension | clause: unified_shared_memory | :good:`done` | D52625,D52359 |
+------------------------------+--------------------------------------------------------------+--------------------------+-----------------------------------------------------------------------+
-| device extension | clause: unified_address, unified_shared_memory | :good:`done` | D52625,D52359 |
+| device extension | clause: unified_address | :part:`partial` | |
+------------------------------+--------------------------------------------------------------+--------------------------+-----------------------------------------------------------------------+
| device extension | clause: reverse_offload | :none:`unclaimed parts` | D52780 |
+------------------------------+--------------------------------------------------------------+--------------------------+-----------------------------------------------------------------------+
-| device extension | clause: atomic_default_mem_order | :none:`unclaimed parts` | D53513 |
+| device extension | clause: atomic_default_mem_order | :good:`done` | D53513 |
+------------------------------+--------------------------------------------------------------+--------------------------+-----------------------------------------------------------------------+
-| device extension | clause: dynamic_allocators | :none:`unclaimed parts` | D53079 |
+| device extension | clause: dynamic_allocators | :part:`unclaimed parts` | D53079 |
+------------------------------+--------------------------------------------------------------+--------------------------+-----------------------------------------------------------------------+
| device extension | user-defined mappers | :part:`worked on` | D56326,D58638,D58523,D58074,D60972,D59474 |
+------------------------------+--------------------------------------------------------------+--------------------------+-----------------------------------------------------------------------+
| device extension | mapping lambda expression | :good:`done` | D51107 |
+------------------------------+--------------------------------------------------------------+--------------------------+-----------------------------------------------------------------------+
-| device extension | clause: use_device_addr for target data | :part:`worked on` | |
+| device extension | clause: use_device_addr for target data | :good:`done` | |
+------------------------------+--------------------------------------------------------------+--------------------------+-----------------------------------------------------------------------+
-| device extension | map(replicate) or map(local) when requires unified_shared_me | :part:`worked on` | D55719,D55892 |
+| device extension | support close modifier on map clause | :good:`done` | D55719,D55892 |
+------------------------------+--------------------------------------------------------------+--------------------------+-----------------------------------------------------------------------+
| device extension | teams construct on the host device | :part:`worked on` | Clang part is done, r371553. |
+------------------------------+--------------------------------------------------------------+--------------------------+-----------------------------------------------------------------------+
| device extension | support non-contiguous array sections for target update | :part:`worked on` | |
+------------------------------+--------------------------------------------------------------+--------------------------+-----------------------------------------------------------------------+
-| atomic extension | hints for the atomic construct | :part:`worked on` | D51233 |
+| device extension | pointer attachment | :none:`unclaimed` | |
+------------------------------+--------------------------------------------------------------+--------------------------+-----------------------------------------------------------------------+
-| base language | C11 support | :none:`unclaimed` | |
+| atomic extension | hints for the atomic construct | :good:`done` | D51233 |
+------------------------------+--------------------------------------------------------------+--------------------------+-----------------------------------------------------------------------+
-| base language | C++11/14/17 support | :part:`worked on` | |
+| base language | C11 support | :good:`done` | |
++------------------------------+--------------------------------------------------------------+--------------------------+-----------------------------------------------------------------------+
+| base language | C++11/14/17 support | :good:`done` | |
+------------------------------+--------------------------------------------------------------+--------------------------+-----------------------------------------------------------------------+
| base language | lambda support | :good:`done` | |
+------------------------------+--------------------------------------------------------------+--------------------------+-----------------------------------------------------------------------+
-| misc extension | array shaping | :none:`unclaimed` | |
+| misc extension | array shaping | :good:`done` | D74144 |
+------------------------------+--------------------------------------------------------------+--------------------------+-----------------------------------------------------------------------+
| misc extension | library shutdown (omp_pause_resource[_all]) | :none:`unclaimed parts` | D55078 |
+------------------------------+--------------------------------------------------------------+--------------------------+-----------------------------------------------------------------------+
-| misc extension | metadirectives | :none:`worked on` | |
+| misc extension | metadirectives | :part:`worked on` | |
++------------------------------+--------------------------------------------------------------+--------------------------+-----------------------------------------------------------------------+
+| misc extension | conditional modifier for lastprivate clause | :good:`done` | |
+------------------------------+--------------------------------------------------------------+--------------------------+-----------------------------------------------------------------------+
-| misc extension | conditional modifier for lastprivate clause | :part:`worked on` | |
+| misc extension | iterator and multidependences | :good:`done` | |
+------------------------------+--------------------------------------------------------------+--------------------------+-----------------------------------------------------------------------+
-| misc extension | user-defined function variants | :part:`worked on` | D67294, D64095 |
+| misc extension | depobj directive and depobj dependency kind | :good:`done` | |
+------------------------------+--------------------------------------------------------------+--------------------------+-----------------------------------------------------------------------+
-| misc extensions | pointer/reference to pointer based array reductions | :none:`unclaimed` | |
+| misc extension | user-defined function variants | :part:`worked on` | D67294, D64095, D71847, D71830 |
+------------------------------+--------------------------------------------------------------+--------------------------+-----------------------------------------------------------------------+
-| misc extensions | prevent new type definitions in clauses | :none:`unclaimed` | |
+| misc extension | pointer/reference to pointer based array reductions | :none:`unclaimed` | |
++------------------------------+--------------------------------------------------------------+--------------------------+-----------------------------------------------------------------------+
+| misc extension | prevent new type definitions in clauses | :good:`done` | |
++------------------------------+--------------------------------------------------------------+--------------------------+-----------------------------------------------------------------------+
+| memory model extension | memory model update (seq_cst, acq_rel, release, acquire,...) | :good:`done` | |
+------------------------------+--------------------------------------------------------------+--------------------------+-----------------------------------------------------------------------+
@@ -250,5 +264,9 @@ want to help with the implementation.
+==============================+==============================================================+==========================+=======================================================================+
| misc extension | user-defined function variants with #ifdef protection | :part:`worked on` | D71179 |
+------------------------------+--------------------------------------------------------------+--------------------------+-----------------------------------------------------------------------+
+| misc extension | default(firstprivate) & default(private) | :part:`worked on` | |
++------------------------------+--------------------------------------------------------------+--------------------------+-----------------------------------------------------------------------+
| loop extension | Loop tiling transformation | :part:`claimed` | |
+------------------------------+--------------------------------------------------------------+--------------------------+-----------------------------------------------------------------------+
+| device extension | 'present' map type modifier | :part:`claimed` | |
++------------------------------+--------------------------------------------------------------+--------------------------+-----------------------------------------------------------------------+
diff --git a/gnu/llvm/clang/docs/ReleaseNotes.rst b/gnu/llvm/clang/docs/ReleaseNotes.rst
index 4939230a064..0ccaa7a8212 100644
--- a/gnu/llvm/clang/docs/ReleaseNotes.rst
+++ b/gnu/llvm/clang/docs/ReleaseNotes.rst
@@ -1,5 +1,5 @@
==========================
-Clang 10.0.0 Release Notes
+Clang 11.0.0 Release Notes
==========================
.. contents::
@@ -8,12 +8,11 @@ Clang 10.0.0 Release Notes
Written by the `LLVM Team `_
-
Introduction
============
This document contains the release notes for the Clang C/C++/Objective-C
-frontend, part of the LLVM Compiler Infrastructure, release 10.0.0. Here we
+frontend, part of the LLVM Compiler Infrastructure, release 11.0.0. Here we
describe the status of Clang in some detail, including major
improvements from the previous release and new feature work. For the
general LLVM release notes, see `the LLVM
@@ -25,8 +24,7 @@ For more information about Clang or LLVM, including information about the
latest release, please see the `Clang Web Site `_ or the
`LLVM Web Site `_.
-
-What's New in Clang 10.0.0?
+What's New in Clang 11.0.0?
===========================
Some of the major new features and improvements to Clang are listed
@@ -34,553 +32,652 @@ here. Generic improvements to Clang as a whole or to its underlying
infrastructure are described first, followed by language-specific
sections with improvements to Clang's support for those languages.
-Major New Features
-------------------
-- clang used to run the actual compilation in a subprocess ("clang -cc1").
- Now compilations are done in-process by default. ``-fno-integrated-cc1``
- restores the former behavior. The ``-v`` and ``-###`` flags will print
- "(in-process)" when compilations are done in-process.
+Recovery AST
+------------
-- Concepts support. Clang now supports C++2a Concepts under the -std=c++2a flag.
+clang's AST now improves support for representing broken C++ code. This improves
+the quality of subsequent diagnostics after an error is encountered. It also
+exposes more information to tools like clang-tidy and clangd that consume
+clang’s AST, allowing them to be more accurate on broken code.
-Improvements to Clang's diagnostics
-^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+A RecoveryExpr is introduced in clang's AST, marking an expression containing
+semantic errors. This preserves the source range and subexpressions of the
+broken expression in the AST (rather than discarding the whole expression).
-- ``-Wtautological-overlap-compare`` will warn on negative numbers and non-int
- types.
+For the following invalid code:
-- ``-Wtautological-compare`` for self comparisons and
- ``-Wtautological-overlap-compare`` will now look through member and array
- access to determine if two operand expressions are the same.
+ .. code-block:: c++
-- ``-Wtautological-bitwise-compare`` is a new warning group. This group has the
- current warning which diagnoses the tautological comparison of a bitwise
- operation and a constant. The group also has the new warning which diagnoses
- when a bitwise-or with a non-negative value is converted to a bool, since
- that bool will always be true.
+ int NoArg(); // Line 1
+ int x = NoArg(42); // oops!
-- ``-Wbitwise-conditional-parentheses`` will warn on operator precedence issues
- when mixing bitwise-and (&) and bitwise-or (|) operator with the
- conditional operator (?:).
+clang-10 produces the minimal placeholder:
-- ``-Wrange-loop-analysis`` got several improvements. It no longer warns about a
- copy being made when the result is bound to an rvalue reference. It no longer
- warns when an object of a small, trivially copyable type is copied. The
- warning now offers fix-its. Excluding ``-Wrange-loop-bind-reference`` it is now
- part of ``-Wall``. To reduce the number of false positives the diagnostic is
- disabled in macros and template instantiations.
+ .. code-block:: c++
-- ``-Wmisleading-indentation`` has been added. This warning is similar to the GCC
- warning of the same name. It warns about statements that are indented as if
- they were part of a if/else/for/while statement but are not semantically
- part of that if/else/for/while.
+ // VarDecl col:5 x 'int'
-- ``-Wbitwise-op-parentheses`` and ``-Wlogical-op-parentheses`` are disabled by default.
+clang-11 produces a richer AST:
-- The new warnings ``-Wc99-designator`` and ``-Wreorder-init-list`` warn about
- uses of C99 initializers in C++ mode for cases that are valid in C99 but not
- in C++20.
+ .. code-block:: c++
-- The new warning ``-Wsizeof-array-div`` catches cases like
- ``int arr[10]; ...sizeof(arr) / sizeof(short)...``
- (should be ``sizeof(arr) / sizeof(int)``), and the existing warning
- ``-Wsizeof-pointer-div`` catches more cases.
+ // VarDecl col:5 x 'int' cinit
+ // `-RecoveryExpr '' contains-errors lvalue
+ // `-UnresolvedLookupExpr '' lvalue (ADL) = 'NoArg'
+ // `-IntegerLiteral 'int' 42
-- The new warning ``-Wxor-used-as-pow`` warns on cases where it looks like
- the xor operator ``^`` is used to be mean exponentiation, e.g. ``2 ^ 16``.
+Note that error-dependent types and values may now occur outside a template
+context. Tools may need to adjust assumptions about dependent code.
-- The new warning ``-Wfinal-dtor-non-final-class`` warns on classes that
- have a final destructor but aren't themselves marked final.
+This feature is on by default for C++ code, and can be explicitly controlled
+with `-Xclang -f[no-]recovery-ast`.
+
+Improvements to Clang's diagnostics
+-----------------------------------
-- ``-Wextra`` now enables ``-Wdeprecated-copy``. The warning deprecates
- move and copy constructors in classes where an explicit destructor is
- declared. This is for compatibility with GCC 9, and forward looking
- for a change that's being considered for C++23. You can disable it with
- ``-Wno-deprecated-copy``.
+- -Wpointer-to-int-cast is a new warning group. This group warns about C-style
+ casts of pointers to a integer type too small to hold all possible values.
+- -Wuninitialized-const-reference is a new warning controlled by
+ -Wuninitialized. It warns on cases where uninitialized variables are passed
+ as const reference arguments to a function.
+
+- ``-Wimplicit-const-int-float-conversion`` (enabled by default) is a new
+ option controlled by ``-Wimplicit-int-float-conversion``. It warns on
+ implicit conversion from a floating constant to an integer type.
Non-comprehensive list of changes in this release
-------------------------------------------------
-* In both C and C++ (C17 ``6.5.6p8``, C++ ``[expr.add]``), pointer arithmetic is
- only permitted within arrays. In particular, the behavior of a program is not
- defined if it adds a non-zero offset (or in C, any offset) to a null pointer,
- or if it forms a null pointer by subtracting an integer from a non-null
- pointer, and the LLVM optimizer now uses those guarantees for transformations.
- This may lead to unintended behavior in code that performs these operations.
- The Undefined Behavior Sanitizer ``-fsanitize=pointer-overflow`` check has
- been extended to detect these cases, so that code relying on them can be
- detected and fixed.
-
-* The Implicit Conversion Sanitizer (``-fsanitize=implicit-conversion``) has
- learned to sanitize pre/post increment/decrement of types with bit width
- smaller than ``int``.
-
-* For X86 target, ``-march=skylake-avx512``, ``-march=icelake-client``,
- ``-march=icelake-server``, ``-march=cascadelake``, ``-march=cooperlake`` will default to
- not using 512-bit zmm registers in vectorized code unless 512-bit intrinsics
- are used in the source code. 512-bit operations are known to cause the CPUs
- to run at a lower frequency which can impact performance. This behavior can be
- changed by passing ``-mprefer-vector-width=512`` on the command line.
-
-* Clang now defaults to ``.init_array`` on Linux. It used to use ``.ctors`` if
- the found GCC installation is older than 4.7.0. Add ``-fno-use-init-array`` to
- get the old behavior (``.ctors``).
-
-* The behavior of the flag ``-flax-vector-conversions`` has been modified to
- more closely match GCC, as described below. In Clang 10 onwards, command lines
- specifying this flag do not permit implicit vector bitcasts between integer
- vectors and floating-point vectors. Such conversions are still permitted by
- default, however, and the default can be explicitly requested with the
- Clang-specific flag ``-flax-vector-conversions=all``. In a future release of
- Clang, we intend to change the default to ``-fno-lax-vector-conversions``.
-
-* Improved support for ``octeon`` MIPS-family CPU. Added ``octeon+`` to
- the list of of CPUs accepted by the driver.
-
-* For the WebAssembly target, the ``wasm-opt`` tool will now be run if it is
- found in the PATH, which can reduce code size.
-
-* For the RISC-V target, floating point registers can now be used in inline
- assembly constraints.
+- For the ARM target, C-language intrinsics are now provided for the full Arm
+ v8.1-M MVE instruction set. ```` supports the complete API defined
+ in the Arm C Language Extensions.
+
+- For the ARM target, C-language intrinsics ```` for the CDE
+ instruction set are now provided.
+
+- clang adds support for a set of extended integer types (``_ExtInt(N)``) that
+ permit non-power of 2 integers, exposing the LLVM integer types. Since a major
+ motivating use case for these types is to limit 'bit' usage, these types don't
+ automatically promote to 'int' when operations are done between two
+ ``ExtInt(N)`` types, instead math occurs at the size of the largest
+ ``ExtInt(N)`` type.
+
+- Users of UBSan, PGO, and coverage on Windows will now need to add clang's
+ library resource directory to their library search path. These features all
+ use runtime libraries, and Clang provides these libraries in its resource
+ directory. For example, if LLVM is installed in ``C:\Program Files\LLVM``,
+ then the profile runtime library will appear at
+ ``C:\Program Files\LLVM\lib\clang\11.0.0\lib\windows\clang_rt.profile-x86_64.lib``.
+ To ensure that the linker can find the appropriate library, users should pass
+ ``/LIBPATH:C:\Program Files\LLVM\lib\clang\11.0.0\lib\windows`` to the
+ linker. If the user links the program with the ``clang`` or ``clang-cl``
+ drivers, the driver will pass this flag for them.
+
+- Clang's profile files generated through ``-fprofile-instr-generate`` are using
+ a fixed hashing algorithm that prevents some collision when loading
+ out-of-date profile informations. Clang can still read old profile files.
+
+- Clang adds support for the following macros that enable the
+ C-intrinsics from the `Arm C language extensions for SVE
+ `_ (version
+ ``00bet5``, see section 2.1 for the list of intrinsics associated to
+ each macro):
+
+
+ ================================= =================
+ Preprocessor macro Target feature
+ ================================= =================
+ ``__ARM_FEATURE_SVE`` ``+sve``
+ ``__ARM_FEATURE_SVE_BF16`` ``+sve+bf16``
+ ``__ARM_FEATURE_SVE_MATMUL_FP32`` ``+sve+f32mm``
+ ``__ARM_FEATURE_SVE_MATMUL_FP64`` ``+sve+f64mm``
+ ``__ARM_FEATURE_SVE_MATMUL_INT8`` ``+sve+i8mm``
+ ``__ARM_FEATURE_SVE2`` ``+sve2``
+ ``__ARM_FEATURE_SVE2_AES`` ``+sve2-aes``
+ ``__ARM_FEATURE_SVE2_BITPERM`` ``+sve2-bitperm``
+ ``__ARM_FEATURE_SVE2_SHA3`` ``+sve2-sha3``
+ ``__ARM_FEATURE_SVE2_SM4`` ``+sve2-sm4``
+ ================================= =================
+
+ The macros enable users to write C/C++ `Vector Length Agnostic
+ (VLA)` loops, that can be executed on any CPU that implements the
+ underlying instructions supported by the C intrinsics, independently
+ of the hardware vector register size.
+
+ For example, the ``__ARM_FEATURE_SVE`` macro is enabled when
+ targeting AArch64 code generation by setting ``-march=armv8-a+sve``
+ on the command line.
+
+ .. code-block:: c
+ :caption: Example of VLA addition of two arrays with SVE ACLE.
+
+ // Compile with:
+ // `clang++ -march=armv8a+sve ...` (for c++)
+ // `clang -stc=c11 -march=armv8a+sve ...` (for c)
+ #include
+
+ void VLA_add_arrays(double *x, double *y, double *out, unsigned N) {
+ for (unsigned i = 0; i < N; i += svcntd()) {
+ svbool_t Pg = svwhilelt_b64(i, N);
+ svfloat64_t vx = svld1(Pg, &x[i]);
+ svfloat64_t vy = svld1(Pg, &y[i]);
+ svfloat64_t vout = svadd_x(Pg, vx, vy);
+ svst1(Pg, &out[i], vout);
+ }
+ }
+
+ Please note that support for lazy binding of SVE function calls is
+ incomplete. When you interface user code with SVE functions that are
+ provided through shared libraries, avoid using lazy binding. If you
+ use lazy binding, the results could be corrupted.
+
+- ``-O`` maps to ``-O1`` instead of ``-O2``.
+ (`D79916 `_)
+
+- In a ``-flto={full,thin}`` link, ``-Os``, ``-Oz`` and ``-Og`` can be used
+ now. ``-Os`` and ``-Oz`` map to the -O2 pipe line while ``-Og`` maps to the
+ -O1 pipeline.
+ (`D79919 `_)
+
+- ``--coverage`` (gcov) defaults to gcov [4.8,8) compatible format now.
+
+- On x86, ``-fpic/-fPIC -fno-semantic-interposition`` assumes a global
+ definition of default visibility non-interposable and allows interprocedural
+ optimizations. In produced assembly ``-Lfunc$local`` local aliases are created
+ for global symbols of default visibility.
New Compiler Flags
------------------
-- The ``-fgnuc-version=`` flag now controls the value of ``__GNUC__`` and related
- macros. This flag does not enable or disable any GCC extensions implemented in
- Clang. Setting the version to zero causes Clang to leave ``__GNUC__`` and
- other GNU-namespaced macros, such as ``__GXX_WEAK__``, undefined.
+- -fstack-clash-protection will provide a protection against the stack clash
+ attack for x86, s390x and ppc64 architectures through automatic probing of
+ each page of allocated stack.
-- vzeroupper insertion on X86 targets can now be disabled with ``-mno-vzeroupper``.
- You can also force vzeroupper insertion to be used on CPUs that normally
- wouldn't with ``-mvzeroupper``.
+- -ffp-exception-behavior={ignore,maytrap,strict} allows the user to specify
+ the floating-point exception behavior. The default setting is ``ignore``.
-- The ``-fno-concept-satisfaction-caching`` can be used to disable caching for
- satisfactions of Concepts. The C++2a draft standard does not currently permit
- this caching, but disabling it may incur significant compile-time costs. This
- flag is intended for experimentation purposes and may be removed at any time;
- please let us know if you encounter a situation where you need to specify this
- flag for correct program behavior.
+- -ffp-model={precise,strict,fast} provides the user an umbrella option to
+ simplify access to the many single purpose floating point options. The default
+ setting is ``precise``.
-- The ``-ffixed-xX`` flags now work on RISC-V. These reserve the corresponding
- general-purpose registers.
+- The default module cache has moved from /tmp to a per-user cache directory.
+ By default, this is ~/.cache but on some platforms or installations, this
+ might be elsewhere. The -fmodules-cache-path=... flag continues to work.
+
+- -fpch-instantiate-templates tries to instantiate templates already while
+ generating a precompiled header. Such templates do not need to be
+ instantiated every time the precompiled header is used, which saves compile
+ time. This may result in an error during the precompiled header generation
+ if the source header file is not self-contained. This option is enabled
+ by default for clang-cl.
+
+- -fpch-codegen and -fpch-debuginfo generate shared code and/or debuginfo
+ for contents of a precompiled header in a separate object file. This object
+ file needs to be linked in, but its contents do not need to be generated
+ for other objects using the precompiled header. This should usually save
+ compile time. If not using clang-cl, the separate object file needs to
+ be created explicitly from the precompiled header.
+ Example of use:
-- RISC-V has added ``-mcmodel=medany`` and ``-mcmodel=medlow`` as aliases for
- ``-mcmodel=small`` and ``-mcmodel=medium`` respectively. Preprocessor definitions
- for ``__riscv_cmodel_medlow`` and ``__riscv_cmodel_medany`` have been corrected.
+ .. code-block:: console
-- ``-fmacro-prefix-map=OLD=NEW`` substitutes directory prefix ``OLD`` for
- ``NEW`` in predefined preprocessor macros such as ``__FILE__``. This helps
- with reproducible builds that are location independent. The new
- ``-ffile-prefix-map`` option is equivalent to specifying both
- ``-fdebug-prefix-map`` and ``-fmacro-prefix-map``.
+ $ clang++ -x c++-header header.h -o header.pch -fpch-codegen -fpch-debuginfo
+ $ clang++ -c header.pch -o shared.o
+ $ clang++ -c source.cpp -o source.o -include-pch header.pch
+ $ clang++ -o binary source.o shared.o
+
+ - Using -fpch-instantiate-templates when generating the precompiled header
+ usually increases the amount of code/debuginfo that can be shared.
+ - In some cases, especially when building with optimizations enabled, using
+ -fpch-codegen may generate so much code in the shared object that compiling
+ it may be a net loss in build time.
+ - Since headers may bring in private symbols of other libraries, it may be
+ sometimes necessary to discard unused symbols (such as by adding
+ -Wl,--gc-sections on ELF platforms to the linking command, and possibly
+ adding -fdata-sections -ffunction-sections to the command generating
+ the shared object).
+
+- ``-fsanitize-coverage-allowlist`` and ``-fsanitize-coverage-blocklist`` are added.
+
+- -mtls-size={12,24,32,48} allows selecting the size of the TLS (thread-local
+ storage) in the local exec TLS model of AArch64, which is the default TLS
+ model for non-PIC objects. Each value represents 4KB, 16MB (default), 4GB,
+ and 256TB (needs -mcmodel=large). This allows large/many thread local
+ variables or a compact/fast code in an executable.
+
+- -menable-experimental-extension` can be used to enable experimental or
+ unratified RISC-V extensions, allowing them to be targeted by specifying the
+ extension name and precise version number in the `-march` string. For these
+ experimental extensions, there is no expectation of ongoing support - the
+ compiler support will continue to change until the specification is
+ finalised.
-- ``-fpatchable-function-entry=N[,M]`` is added to generate M NOPs before the
- function entry and N-M NOPs after the function entry. This is used by AArch64
- ftrace in the Linux kernel.
-- ``-mbranches-within-32B-boundaries`` is added as an x86 assembler mitigation
- for Intel's Jump Condition Code Erratum.
+Modified Compiler Flags
+-----------------------
-- -ffp-exception-behavior={ignore,maytrap,strict} allows the user to specify
- the floating-point exception behavior. The default setting is ``ignore``.
+- -fno-common has been enabled as the default for all targets. Therefore, C
+ code that uses tentative definitions as definitions of a variable in multiple
+ translation units will trigger multiple-definition linker errors. Generally,
+ this occurs when the use of the ``extern`` keyword is neglected in the
+ declaration of a variable in a header file. In some cases, no specific
+ translation unit provides a definition of the variable. The previous
+ behavior can be restored by specifying ``-fcommon``.
+- -Wasm-ignored-qualifier (ex. `asm const ("")`) has been removed and replaced
+ with an error (this matches a recent change in GCC-9).
+- -Wasm-file-asm-volatile (ex. `asm volatile ("")` at global scope) has been
+ removed and replaced with an error (this matches GCC's behavior).
+- Duplicate qualifiers on asm statements (ex. `asm volatile volatile ("")`) no
+ longer produces a warning via -Wduplicate-decl-specifier, but now an error
+ (this matches GCC's behavior).
+- The deprecated argument ``-f[no-]sanitize-recover`` has changed to mean
+ ``-f[no-]sanitize-recover=all`` instead of
+ ``-f[no-]sanitize-recover=undefined,integer`` and is no longer deprecated.
+- The argument to ``-f[no-]sanitize-trap=...`` is now optional and defaults to
+ ``all``.
+- ``-fno-char8_t`` now disables the ``char8_t`` keyword, not just the use of
+ ``char8_t`` as the character type of ``u8`` literals. This restores the
+ Clang 8 behavior that regressed in Clang 9 and 10.
+- -print-targets has been added to print the registered targets.
+- -mcpu is now supported for RISC-V, and recognises the generic-rv32,
+ rocket-rv32, sifive-e31, generic-rv64, rocket-rv64, and sifive-u54 target
+ CPUs.
+- ``-fwhole-program-vtables`` (along with ``-flto*``) now prepares all classes for possible whole program visibility if specified during the LTO link.
+ (`D71913 `_)
+
+New Pragmas in Clang
+--------------------
-- -ffp-model={precise,strict,fast} provides the user an umbrella option to
- simplify access to the many single purpose floating point options. The default
- setting is ``precise``.
+- The ``clang max_tokens_here`` pragma can be used together with
+ `-Wmax-tokens `_ to emit a warning when
+ the number of preprocessor tokens exceeds a limit. Such limits can be helpful
+ in limiting code growth and slow compiles due to large header files.
+
+Attribute Changes in Clang
+--------------------------
-Deprecated Compiler Flags
--------------------------
+- Attributes can now be specified by clang plugins. See the
+ `Clang Plugins `_ documentation for
+ details.
-The following options are deprecated and ignored. They will be removed in
-future versions of Clang.
+Windows Support
+---------------
-- ``-mmpx`` used to enable the ``__MPX__`` preprocessor define for the Intel MPX
- instructions. There were no MPX intrinsics.
+- Don't warn about `ms_struct may not produce Microsoft-compatible layouts
+ for classes with base classes or virtual functions` if the option is
+ enabled globally, as opposed to enabled on a specific class/struct or
+ on a specific section in the source files. This avoids needing to
+ couple `-mms-bitfields` with `-Wno-incompatible-ms-struct` if building
+ C++ code.
-- ``-mno-mpx`` used to disable ``-mmpx`` and is the default behavior.
+- Enable `-mms-bitfields` by default for MinGW targets, matching a similar
+ change in GCC 4.7.
-- ``-fconcepts-ts`` previously used to enable experimental concepts support. Use
- -std=c++2a instead to enable Concepts support.
+C Language Changes in Clang
+---------------------------
-Modified Compiler Flags
------------------------
+- The default C language standard used when `-std=` is not specified has been
+ upgraded from gnu11 to gnu17.
-- RISC-V now sets the architecture (riscv32/riscv64) based on the value provided
- to the ``-march`` flag, overriding the target provided by ``-triple``.
+- Clang now supports the GNU C extension `asm inline`; it won't do anything
+ *yet*, but it will be parsed.
-- ``-flax-vector-conversions`` has been split into three different levels of
- laxness, and has been updated to match the GCC semantics:
+C++ Language Changes in Clang
+-----------------------------
- - ``-flax-vector-conversions=all``: This is Clang's current default, and
- permits implicit vector conversions (performed as bitcasts) between any
- two vector types of the same overall bit-width.
- Former synonym: ``-flax-vector-conversions`` (Clang <= 9).
+- Clang now implements a restriction on giving non-C-compatible anonymous
+ structs a typedef name for linkage purposes, as described in C++ committee
+ paper `P1766R1 `. This paper was adopted by the
+ C++ committee as a Defect Report resolution, so it is applied retroactively
+ to all C++ standard versions. This affects code such as:
- - ``-flax-vector-conversions=integer``: This permits implicit vector
- conversions (performed as bitcasts) between any two integer vector types of
- the same overall bit-width.
- Synonym: ``-flax-vector-conversions`` (Clang >= 10).
+ .. code-block:: c++
- - ``-flax-vector-conversions=none``: Do not perform any implicit bitcasts
- between vector types.
- Synonym: ``-fno-lax-vector-conversions``.
+ typedef struct {
+ int f() { return 0; }
+ } S;
-- ``-debug-info-kind`` now has an option ``-debug-info-kind=constructor``,
- which is one level below ``-debug-info-kind=limited``. This option causes
- debug info for classes to be emitted only when a constructor is emitted.
+ Previous versions of Clang rejected some constructs of this form
+ (specifically, where the linkage of the type happened to be computed
+ before the parser reached the typedef name); those cases are still rejected
+ in Clang 11. In addition, cases that previous versions of Clang did not
+ reject now produce an extension warning. This warning can be disabled with
+ the warning flag ``-Wno-non-c-typedef-for-linkage``.
-- RISC-V now chooses a slightly different sysroot path and defaults to using
- compiler-rt if no GCC installation is detected.
+ Affected code should be updated to provide a tag name for the anonymous
+ struct:
-- RISC-V now supports multilibs in baremetal environments. This support does not
- extend to supporting multilib aliases.
+ .. code-block:: c++
-Attribute Changes in Clang
---------------------------
+ struct S {
+ int f() { return 0; }
+ };
-- Support was added for function ``__attribute__((target("branch-protection=...")))``
+ If the code is shared with a C compilation (for example, if the parts that
+ are not C-compatible are guarded with ``#ifdef __cplusplus``), the typedef
+ declaration should be retained, but a tag name should still be provided:
-Windows Support
----------------
+ .. code-block:: c++
-- Previous Clang versions contained a work-around to avoid an issue with the
- standard library headers in Visual Studio 2019 versions prior to 16.3. This
- work-around has now been removed, and users of Visual Studio 2019 are
- encouraged to upgrade to 16.3 or later, otherwise they may see link errors as
- below:
+ typedef struct S {
+ int f() { return 0; }
+ } S;
- .. code-block:: console
- error LNK2005: "bool const std::_Is_integral" (??$_Is_integral@H@std@@3_NB) already defined
+OpenCL Kernel Language Changes in Clang
+---------------------------------------
-- The ``.exe`` output suffix is now added implicitly in MinGW mode, when
- Clang is running on Windows (matching GCC's behaviour)
+- Added extensions from `cl_khr_subgroup_extensions` to clang and the internal
+ header.
-- Fixed handling of TLS variables that are shared between object files
- in MinGW environments
+- Added rocm device libs linking for AMDGPU.
-- The ``-cfguard`` flag now emits Windows Control Flow Guard checks on indirect
- function calls. The previous behavior is still available with the
- ``-cfguard-nochecks`` flag. These checks can be disabled for specific
- functions using the new ``__declspec(guard(nocf))`` modifier.
+- Added diagnostic for OpenCL 2.0 blocks used in function arguments.
+- Fixed MS mangling for OpenCL 2.0 pipe type specifier.
-C++ Language Changes in Clang
------------------------------
+- Improved command line options for fast relaxed math.
-- The behaviour of the `gnu_inline` attribute now matches GCC, for cases
- where used without the `extern` keyword. As this is a change compared to
- how it behaved in previous Clang versions, a warning is emitted for this
- combination.
+- Improved `atomic_fetch_min/max` functions in the internal header
+ (`opencl-c.h`).
-Objective-C Language Changes in Clang
--------------------------------------
+- Improved size of builtin function table for `TableGen`-based internal header
+ (enabled by `-fdeclare-opencl-builtins`) and added new functionality for
+ OpenCL 2.0 atomics, pipes, enqueue kernel, `cl_khr_subgroups`,
+ `cl_arm_integer_dot_product`.
-- In both Objective-C and
- Objective-C++, ``-Wcompare-distinct-pointer-types`` will now warn when
- comparing ObjC ``Class`` with an ObjC instance type pointer.
+Changes related to C++ for OpenCL
+---------------------------------
- .. code-block:: objc
+- Added `addrspace_cast` operator.
- Class clz = ...;
- MyType *instance = ...;
- bool eq = (clz == instance); // Previously undiagnosed, now warns.
+- Improved address space deduction in templates.
-- Objective-C++ now diagnoses conversions between ``Class`` and ObjC
- instance type pointers. Such conversions already emitted an
- on-by-default ``-Wincompatible-pointer-types`` warning in Objective-C
- mode, but had inadvertently been missed entirely in
- Objective-C++. This has been fixed, and they are now diagnosed as
- errors, consistent with the usual C++ treatment for conversions
- between unrelated pointer types.
+- Improved diagnostics of address spaces in nested pointer conversions.
- .. code-block:: objc
+ABI Changes in Clang
+--------------------
- Class clz = ...;
- MyType *instance = ...;
- clz = instance; // Previously undiagnosed, now an error.
- instance = clz; // Previously undiagnosed, now an error.
+- For RISC-V, an ABI bug was fixed when passing complex single-precision
+ floats in RV64 with the hard float ABI. The bug could only be triggered for
+ function calls that exhaust the available FPRs.
- One particular issue you may run into is attempting to use a class
- as a key in a dictionary literal. This will now result in an error,
- because ``Class`` is not convertible to ``id``. (Note that
- this was already a warning in Objective-C mode.) While an arbitrary
- ``Class`` object is not guaranteed to implement ``NSCopying``, the
- default metaclass implementation does. Therefore, the recommended
- solution is to insert an explicit cast to ``id``, which disables the
- type-checking here.
- .. code-block:: objc
+OpenMP Support in Clang
+-----------------------
- Class cls = ...;
+New features for OpenMP 5.0 were implemented.
- // Error: cannot convert from Class to id.
- NSDictionary* d = @{cls : @"Hello"};
+- OpenMP 5.0 is the default version supported by the compiler. User can switch
+ to OpenMP 4.5 using ``-fopenmp-version=45`` option.
- // Fix: add an explicit cast to 'id'.
- NSDictionary* d = @{(id)cls : @"Hello"};
+- Added support for declare variant directive.
-OpenCL Kernel Language Changes in Clang
----------------------------------------
+- Improved support of math functions and complex types for NVPTX target.
-Generic changes:
+- Added support for parallel execution of target regions for NVPTX target.
-- Made ``__private`` to be appear explicitly in diagnostics, AST, etc.
-- Fixed diagnostics of ``enqueue_kernel``.
+- Added support for ``scan`` directives and ``inscan`` modifier in ``reduction``
+ clauses.
-OpenCL builtin functions:
+- Added support for ``iterator`` construct.
-- The majority of the OpenCL builtin functions are now available through
- the experimental `TableGen` driven ``-fdeclare-opencl-builtins`` option.
-- Align the ``enqueue_marker`` declaration in standard ``opencl-c.h`` to the
- OpenCL spec.
-- Avoid a void pointer cast in the ``CLK_NULL_EVENT`` definition.
-- Aligned OpenCL with c11 atomic fetch max/min.
+- Added support for ``depobj`` construct.
-Changes in C++ for OpenCL:
+- Added support for ``detach`` clauses in task-based directives.
-- Fixed language mode predefined macros for C++ mode.
-- Allow OpenCL C style compound vector initialization.
-- Improved destructor support.
-- Implemented address space deduction for pointers/references
- to arrays and auto variables.
-- Added address spaces support for lambdas and ``constexpr``.
-- Fixed misc address spaces usages in classes.
+- Added support for array shaping operations.
+- Added support for cancellation constructs in ``taskloop`` directives.
-ABI Changes in Clang
---------------------
+- Nonmonotonic modifier is allowed with all schedule kinds.
-- GCC passes vectors of __int128 in memory on X86-64. Clang historically
- broke the vectors into multiple scalars using two 64-bit values for each
- element. Clang now matches the GCC behavior on Linux and NetBSD. You can
- switch back to old API behavior with flag: ``-fclang-abi-compat=9.0``.
+- Added support for ``task`` and ``default`` modifiers in ``reduction`` clauses.
-- RISC-V now chooses a default ``-march=`` and ``-mabi=`` to match (in almost
- all cases) the GCC defaults. On baremetal targets, where neither ``-march=``
- nor ``-mabi=`` are specified, Clang now differs from GCC by defaulting to
- ``-march=rv32imac`` ``-mabi=ilp32`` or ``-march=rv64imac`` ``-mabi=lp64``
- depending on the architecture in the target triple. These do not always match
- the defaults in Clang 9. We strongly suggest that you explicitly pass
- ``-march=`` and ``-mabi=`` when compiling for RISC-V, due to how extensible
- this architecture is.
+- Added support for strides in array sections.
-- RISC-V now uses `target-abi` module metadata to encode the chosen psABI. This
- ensures that the correct lowering will be done by LLVM when LTO is enabled.
+- Added support for ``use_device_addr`` clause.
-- An issue with lowering return types in the RISC-V ILP32D psABI has been fixed.
+- Added support for ``uses_allocators`` clause.
-OpenMP Support in Clang
------------------------
+- Added support for ``defaultmap`` clause.
-New features for OpenMP 5.0 were implemented. Use ``-fopenmp-version=50`` option to activate support for OpenMP 5.0.
+- Added basic support for ``hint`` clause in ``atomic`` directives.
-- Added support for ``device_type`` clause in declare target directive.
-- Non-static and non-ordered loops are nonmonotonic by default.
-- Teams-based directives can be used as a standalone directive.
-- Added support for collapsing of non-rectangular loops.
-- Added support for range-based loops.
-- Added support for collapsing of imperfectly nested loops.
-- Added support for ``master taskloop``, ``parallel master taskloop``, ``master taskloop simd`` and ``parallel master taskloop simd`` directives.
-- Added support for ``if`` clauses in simd-based directives.
-- Added support for unified shared memory for NVPTX target.
-- Added support for nested atomic and simd directives are allowed in sims-based directives.
-- Added support for non temporal clauses in sims-based directives.
-- Added basic support for conditional lastprivate variables
+- Added basic support for ``affinity`` clause.
-Other improvements:
+- Added basic support for ``ancestor`` modifier in ``device`` clause.
-- Added basic analysis for use of the uninitialized variables in clauses.
-- Bug fixes.
+- Added support for ``default(firstprivate)`` clause. This clause is the part of
+ upcoming OpenMP 5.1 and can be enabled using ``-fopenmp-version=51`` option.
+
+- Bug fixes and optimizations.
Internal API Changes
--------------------
-These are major API changes that have happened since the 9.0.0 release of
+These are major API changes that have happened since the 10.0.0 release of
Clang. If upgrading an external codebase that uses Clang as a library,
this section should help get you past the largest hurdles of upgrading.
-- libTooling APIs that transfer ownership of `FrontendAction` objects now pass
- them by `unique_ptr`, making the ownership transfer obvious in the type
- system. `FrontendActionFactory::create()` now returns a
- `unique_ptr`. `runToolOnCode`, `runToolOnCodeWithArgs`,
- `ToolInvocation::ToolInvocation()` now take a `unique_ptr`.
+- ``RecursiveASTVisitor`` no longer calls separate methods to visit specific
+ operator kinds. Previously, ``RecursiveASTVisitor`` treated unary, binary,
+ and compound assignment operators as if they were subclasses of the
+ corresponding AST node. For example, the binary operator plus was treated as
+ if it was a ``BinAdd`` subclass of the ``BinaryOperator`` class: during AST
+ traversal of a ``BinaryOperator`` AST node that had a ``BO_Add`` opcode,
+ ``RecursiveASTVisitor`` was calling the ``TraverseBinAdd`` method instead of
+ ``TraverseBinaryOperator``. This feature was contributing a non-trivial
+ amount of complexity to the implementation of ``RecursiveASTVisitor``, it was
+ used only in a minor way in Clang, was not tested, and as a result it was
+ buggy. Furthermore, this feature was creating a non-uniformity in the API.
+ Since this feature was not documented, it was quite difficult to figure out
+ how to use ``RecursiveASTVisitor`` to visit operators.
+
+ To update your code to the new uniform API, move the code from separate
+ visitation methods into methods that correspond to the actual AST node and
+ perform case analysis based on the operator opcode as needed:
+
+ * ``TraverseUnary*() => TraverseUnaryOperator()``
+ * ``WalkUpFromUnary*() => WalkUpFromUnaryOperator()``
+ * ``VisitUnary*() => VisiUnaryOperator()``
+ * ``TraverseBin*() => TraverseBinaryOperator()``
+ * ``WalkUpFromBin*() => WalkUpFromBinaryOperator()``
+ * ``VisitBin*() => VisiBinaryOperator()``
+ * ``TraverseBin*Assign() => TraverseCompoundAssignOperator()``
+ * ``WalkUpFromBin*Assign() => WalkUpFromCompoundAssignOperator()``
+ * ``VisitBin*Assign() => VisiCompoundAssignOperator()``
Build System Changes
--------------------
-These are major changes to the build system that have happened since the 9.0.0
+These are major changes to the build system that have happened since the 10.0.0
release of Clang. Users of the build system should adjust accordingly.
-- In 8.0.0 and below, the install-clang-headers target would install clang's
- resource directory headers. This installation is now performed by the
- install-clang-resource-headers target. Users of the old install-clang-headers
- target should switch to the new install-clang-resource-headers target. The
- install-clang-headers target now installs clang's API headers (corresponding
- to its libraries), which is consistent with the install-llvm-headers target.
-
-- In 9.0.0 and later Clang added a new target, clang-cpp, which generates a
- shared library comprised of all the clang component libraries and exporting
- the clang C++ APIs. Additionally the build system gained the new
- "CLANG_LINK_CLANG_DYLIB" option, which defaults Off, and when set to On, will
- force clang (and clang-based tools) to link the clang-cpp library instead of
- statically linking clang's components. This option will reduce the size of
- binary distributions at the expense of compiler performance.
-
+- clang-tidy and clang-include-fixer are no longer compiled into libclang by
+ default. You can set ``LIBCLANG_INCLUDE_CLANG_TOOLS_EXTRA=ON`` to undo that,
+ but it's expected that that setting will go away eventually. If this is
+ something you need, please reach out to the mailing list to discuss possible
+ ways forward.
clang-format
------------
-- The ``Standard`` style option specifies which version of C++ should be used
- when parsing and formatting C++ code. The set of allowed values has changed:
-
- - ``Latest`` will always enable new C++ language features.
- - ``c++03``, ``c++11``, ``c++14``, ``c++17``, ``c++20`` will pin to exactly
- that language version.
- - ``Auto`` is the default and detects style from the code (this is unchanged).
-
- The previous values of ``Cpp03`` and ``Cpp11`` are deprecated. Note that
- ``Cpp11`` is treated as ``Latest``, as this was always clang-format's
- behavior. (One motivation for this change is the new name describes the
- behavior better).
-
-- Clang-format has a new option called ``--dry-run`` or ``-n`` to emit a
- warning for clang-format violations. This can be used together
- with ``--ferror-limit=N`` to limit the number of warnings per file and ``--Werror``
- to make warnings into errors.
-
-- Option *IncludeIsMainSourceRegex* has been added to allow for additional
- suffixes and file extensions to be considered as a source file
- for execution of logic that looks for "main *include* file" to put
- it on top.
-
- By default, clang-format considers *source* files as "main" only when
- they end with: ``.c``, ``.cc``, ``.cpp``, ``.c++``, ``.cxx``,
- ``.m`` or ``.mm`` extensions. This config option allows to
- extend this set of source files considered as "main".
-
- For example, if this option is configured to ``(Impl\.hpp)$``,
- then a file ``ClassImpl.hpp`` is considered "main" (in addition to
- ``Class.c``, ``Class.cc``, ``Class.cpp`` and so on) and "main
- include file" logic will be executed (with *IncludeIsMainRegex* setting
- also being respected in later phase). Without this option set,
- ``ClassImpl.hpp`` would not have the main include file put on top
- before any other include.
-
-- Options ``DeriveLineEnding`` and ``UseCRLF`` have been added to allow
- clang-format to control the newlines. ``DeriveLineEnding`` is by default
- ``true`` and reflects is the existing mechanism, which based is on majority
- rule. The new options allows this to be turned off and ``UseCRLF`` to control
- the decision as to which sort of line ending to use.
-
-- Option ``SpaceBeforeSquareBrackets`` has been added to insert a space before
- array declarations.
+- Option ``IndentExternBlock`` has been added to optionally apply indenting inside ``extern "C"`` and ``extern "C++"`` blocks.
+
+- ``IndentExternBlock`` option accepts ``AfterExternBlock`` to use the old behavior, as well as Indent and NoIndent options, which map to true and false, respectively.
.. code-block:: c++
- int a [5]; vs int a[5];
+ Indent: NoIndent:
+ #ifdef __cplusplus #ifdef __cplusplus
+ extern "C" { extern "C++" {
+ #endif #endif
+
+ void f(void); void f(void);
-- Clang-format now supports JavaScript null operators.
+ #ifdef __cplusplus #ifdef __cplusplus
+ } }
+ #endif #endif
+
+- Option ``IndentCaseBlocks`` has been added to support treating the block
+ following a switch case label as a scope block which gets indented itself.
+ It helps avoid having the closing bracket align with the switch statement's
+ closing bracket (when ``IndentCaseLabels`` is ``false``).
.. code-block:: c++
- const x = foo ?? default;
- const z = foo?.bar?.baz;
+ switch (fool) { vs. switch (fool) {
+ case 1: case 1: {
+ { bar();
+ bar(); } break;
+ } default: {
+ break; plop();
+ default: }
+ { }
+ plop();
+ }
+ }
-- Option ``AlwaysBreakAfterReturnType`` now manages all operator functions.
+- Option ``ObjCBreakBeforeNestedBlockParam`` has been added to optionally apply
+ linebreaks for function arguments declarations before nested blocks.
-libclang
---------
+- Option ``InsertTrailingCommas`` can be set to ``TCS_Wrapped`` to insert
+ trailing commas in container literals (arrays and objects) that wrap across
+ multiple lines. It is currently only available for JavaScript and disabled by
+ default (``TCS_None``).
-- Various changes to reduce discrepancies in destructor calls between the
- generated ``CFG`` and the actual ``codegen``.
+- Option ``BraceWrapping.BeforeLambdaBody`` has been added to manage lambda
+ line break inside function parameter call in Allman style.
- In particular:
+ .. code-block:: c++
+
+ true:
+ connect(
+ []()
+ {
+ foo();
+ bar();
+ });
+
+ false:
+ connect([]() {
+ foo();
+ bar();
+ });
+
+- Option ``AlignConsecutiveBitFields`` has been added to align bit field
+ declarations across multiple adjacent lines
+
+ .. code-block:: c++
+
+ true:
+ bool aaa : 1;
+ bool a : 1;
+ bool bb : 1;
+
+ false:
+ bool aaa : 1;
+ bool a : 1;
+ bool bb : 1;
- - Respect C++17 copy elision; previously it would generate destructor calls
- for elided temporaries, including in initialization and return statements.
+- Option ``BraceWrapping.BeforeWhile`` has been added to allow wrapping
+ before the ```while`` in a do..while loop. By default the value is (``false``)
- - Don't generate duplicate destructor calls for statement expressions.
+ In previous releases ``IndentBraces`` implied ``BraceWrapping.BeforeWhile``.
+ If using a Custom BraceWrapping style you may need to now set
+ ``BraceWrapping.BeforeWhile`` to (``true``) to be explicit.
+
+ .. code-block:: c++
- - Fix initialization lists.
+ true:
+ do {
+ foo();
+ }
+ while(1);
- - Fix comma operator.
+ false:
+ do {
+ foo();
+ } while(1);
- - Change printing of implicit destructors to print the type instead of the
- class name directly, matching the code for temporary object destructors.
- The class name was blank for lambdas.
+.. _release-notes-clang-static-analyzer:
Static Analyzer
---------------
-- New checker: ``alpha.cplusplus.PlacementNew`` to detect whether the storage
- provided for default placement new is sufficiently large.
+- Improved the analyzer's understanding of inherited C++ constructors.
-- New checker: ``fuchsia.HandleChecker`` to detect leaks related to Fuchsia
- handles.
+- Improved the analyzer's understanding of dynamic class method dispatching in
+ Objective-C.
-- New checker: ``security.insecureAPI.decodeValueOfObjCType`` warns about
- potential buffer overflows when using ``[NSCoder decodeValueOfObjCType:at:]``
+- Greatly improved the analyzer's constraint solver by better understanding
+ when constraints are imposed on multiple symbolic values that are known to be
+ equal or known to be non-equal. It will now also efficiently reject impossible
+ if-branches between known comparison expressions.
-- ``deadcode.DeadStores`` now warns about nested dead stores.
+- Added :ref:`on-demand parsing ` capability to Cross Translation
+ Unit (CTU) analysis.
-- Condition values that are relevant to the occurrence of a bug are far better
- explained in bug reports.
+- Numerous fixes and improvements for the HTML output.
-- Despite still being at an alpha stage, checkers implementing taint analyses
- and C++ iterator rules were improved greatly.
+- New checker: :ref:`alpha.core.C11Lock ` and
+ :ref:`alpha.fuchsia.Lock ` checks for their respective
+ locking APIs.
-- Numerous smaller fixes.
+- New checker: :ref:`alpha.security.cert.pos.34c `
+ finds calls to ``putenv`` where a pointer to an autmoatic variable is passed
+ as an argument.
-.. _release-notes-ubsan:
+- New checker: :ref:`webkit.NoUncountedMemberChecker
+ ` to enforce the existence of virtual
+ destructors for all uncounted types used as base classes.
-Undefined Behavior Sanitizer (UBSan)
-------------------------------------
+- New checker: :ref:`webkit.RefCntblBaseVirtualDtor
+ ` checks that only ref-counted types
+ are used as class members, not raw pointers and references to uncounted
+ types.
-* The ``pointer-overflow`` check was extended added to catch the cases where
- a non-zero offset is applied to a null pointer, or the result of
- applying the offset is a null pointer.
+- New checker: :ref:`alpha.cplusplus.SmartPtr ` check
+ for dereference of null smart pointers.
- .. code-block:: c++
+- Moved ``PlacementNewChecker`` out of alpha, making it enabled by default.
- #include // for intptr_t
+- Added support for multi-dimensional variadic arrays in ``core.VLASize``.
- static char *getelementpointer_inbounds(char *base, unsigned long offset) {
- // Potentially UB.
- return base + offset;
- }
+- Added a check for insufficient storage in array placement new calls, as well
+ as support for alignment variants to ``cplusplus.PlacementNew``.
- char *getelementpointer_unsafe(char *base, unsigned long offset) {
- // Always apply offset. UB if base is ``nullptr`` and ``offset`` is not
- // zero, or if ``base`` is non-``nullptr`` and ``offset`` is
- // ``-reinterpret_cast(base)``.
- return getelementpointer_inbounds(base, offset);
- }
+- While still in alpha, ``alpha.unix.PthreadLock``, the iterator and container
+ modeling infrastructure, ``alpha.unix.Stream``, and taint analysis were
+ improved greatly. An ongoing, currently off-by-default improvement was made on
+ the pre-condition modeling of several functions defined in the POSIX standard.
- char *getelementpointer_safe(char *base, unsigned long offset) {
- // Cast pointer to integer, perform usual arithmetic addition,
- // and cast to pointer. This is legal.
- char *computed =
- reinterpret_cast(reinterpret_cast(base) + offset);
- // If either the pointer becomes non-``nullptr``, or becomes
- // ``nullptr``, we must use ``computed`` result.
- if (((base == nullptr) && (computed != nullptr)) ||
- ((base != nullptr) && (computed == nullptr)))
- return computed;
- // Else we can use ``getelementpointer_inbounds()``.
- return getelementpointer_inbounds(base, offset);
- }
+- Improved the warning messages of several checkers.
+
+- Fixed a few remaining cases of checkers emitting reports under incorrect
+ checker names, and employed a few restrictions to more easily identify and
+ avoid such errors.
+
+- Moved several non-reporting checkers (those that model, among other things,
+ standard functions, but emit no diagnostics) to be listed under
+ ``-analyzer-checker-help-developer`` instead of ``-analyzer-checker-help``.
+ Manually enabling or disabling checkers found on this list is not supported
+ in production.
-Changes deferred to Clang-11 release
-------------------------------------
+- Numerous fixes for crashes, false positives and false negatives in
+ ``unix.Malloc``, ``osx.cocoa.NSError``, and several other checkers.
-- The next release of clang (clang-11) will upgrade the default C language
- standard used if not specified via command line from gnu11 to gnu17.
+- Implemented a dockerized testing system to more easily determine the
+ correctness and performance impact of a change to the static analyzer itself.
+ The currently beta-version tool is found in
+ ``(llvm-project repository)/clang/utils/analyzer/SATest.py``.
+
+.. _release-notes-ubsan:
Additional Information
diff --git a/gnu/llvm/clang/docs/SanitizerCoverage.rst b/gnu/llvm/clang/docs/SanitizerCoverage.rst
index c7cd853dd66..4c8ef7509cb 100644
--- a/gnu/llvm/clang/docs/SanitizerCoverage.rst
+++ b/gnu/llvm/clang/docs/SanitizerCoverage.rst
@@ -27,7 +27,7 @@ on every edge:
Every edge will have its own `guard_variable` (uint32_t).
-The compler will also insert calls to a module constructor:
+The compiler will also insert calls to a module constructor:
.. code-block:: c++
@@ -139,6 +139,28 @@ Users need to implement a single function to capture the counters at startup.
// Capture this array in order to read/modify the counters.
}
+
+Inline bool-flag
+================
+
+**Experimental, may change or disappear in future**
+
+With ``-fsanitize-coverage=inline-bool-flag`` the compiler will insert
+setting an inline boolean to true on every edge.
+This is similar to ``-fsanitize-coverage=inline-8bit-counter`` but instead of
+an increment of a counter, it just sets a boolean to true.
+
+Users need to implement a single function to capture the flags at startup.
+
+.. code-block:: c++
+
+ extern "C"
+ void __sanitizer_cov_bool_flag_init(bool *start, bool *end) {
+ // [start,end) is the array of boolean flags created for the current DSO.
+ // Capture this array in order to read/modify the flags.
+ }
+
+
PC-Table
========
@@ -150,8 +172,8 @@ significant binary size overhead. For more information, see
`Bug 34636 `_.
With ``-fsanitize-coverage=pc-table`` the compiler will create a table of
-instrumented PCs. Requires either ``-fsanitize-coverage=inline-8bit-counters`` or
-``-fsanitize-coverage=trace-pc-guard``.
+instrumented PCs. Requires either ``-fsanitize-coverage=inline-8bit-counters``,
+or ``-fsanitize-coverage=inline-bool-flag``, or ``-fsanitize-coverage=trace-pc-guard``.
Users need to implement a single function to capture the PC table at startup:
@@ -164,8 +186,9 @@ Users need to implement a single function to capture the PC table at startup:
// pairs [PC,PCFlags] for every instrumented block in the current DSO.
// Capture this array in order to read the PCs and their Flags.
// The number of PCs and PCFlags for a given DSO is the same as the number
- // of 8-bit counters (-fsanitize-coverage=inline-8bit-counters) or
- // trace_pc_guard callbacks (-fsanitize-coverage=trace-pc-guard)
+ // of 8-bit counters (-fsanitize-coverage=inline-8bit-counters), or
+ // boolean flags (-fsanitize-coverage=inline=bool-flags), or trace_pc_guard
+ // callbacks (-fsanitize-coverage=trace-pc-guard).
// A PCFlags describes the basic block:
// * bit0: 1 if the block is the function entry block, 0 otherwise.
}
@@ -289,6 +312,58 @@ will not be instrumented.
// for every non-constant array index.
void __sanitizer_cov_trace_gep(uintptr_t Idx);
+Partially disabling instrumentation
+===================================
+
+It is sometimes useful to tell SanitizerCoverage to instrument only a subset of the
+functions in your target.
+With ``-fsanitize-coverage-allowlist=allowlist.txt``
+and ``-fsanitize-coverage-blocklist=blocklist.txt``,
+you can specify such a subset through the combination of a allowlist and a blocklist.
+
+SanitizerCoverage will only instrument functions that satisfy two conditions.
+First, the function should belong to a source file with a path that is both allowlisted
+and not blocklisted.
+Second, the function should have a mangled name that is both allowlisted and not blocklisted.
+
+The allowlist and blocklist format is similar to that of the sanitizer blocklist format.
+The default allowlist will match every source file and every function.
+The default blocklist will match no source file and no function.
+
+A common use case is to have the allowlist list folders or source files for which you want
+instrumentation and allow all function names, while the blocklist will opt out some specific
+files or functions that the allowlist loosely allowed.
+
+Here is an example allowlist:
+
+.. code-block:: none
+
+ # Enable instrumentation for a whole folder
+ src:bar/*
+ # Enable instrumentation for a specific source file
+ src:foo/a.cpp
+ # Enable instrumentation for all functions in those files
+ fun:*
+
+And an example blocklist:
+
+.. code-block:: none
+
+ # Disable instrumentation for a specific source file that the allowlist allowed
+ src:bar/b.cpp
+ # Disable instrumentation for a specific function that the allowlist allowed
+ fun:*myFunc*
+
+The use of ``*`` wildcards above is required because function names are matched after mangling.
+Without the wildcards, one would have to write the whole mangled name.
+
+Be careful that the paths of source files are matched exactly as they are provided on the clang
+command line.
+For example, the allowlist above would include file ``bar/b.cpp`` if the path was provided
+exactly like this, but would it would fail to include it with other ways to refer to the same
+file such as ``./bar/b.cpp``, or ``bar\b.cpp`` on Windows.
+So, please make sure to always double check that your lists are correctly applied.
+
Default implementation
======================
@@ -357,7 +432,7 @@ Sancov matches these files using module names and binaries file names.
-symbolize - Symbolizes the report.
Options
- -blacklist= - Blacklist file (sanitizer blacklist format).
+ -blocklist= - Blocklist file (sanitizer blocklist format).
-demangle - Print demangled function name.
-strip_path_prefix= - Strip this prefix from file paths in reports
@@ -376,7 +451,7 @@ to produce a ``.symcov`` file first:
sancov -symbolize my_program.123.sancov my_program > my_program.123.symcov
-The ``.symcov`` file can be browsed overlayed over the source code by
+The ``.symcov`` file can be browsed overlaid over the source code by
running ``tools/sancov/coverage-report-server.py`` script that will start
an HTTP server.
diff --git a/gnu/llvm/clang/docs/SourceBasedCodeCoverage.rst b/gnu/llvm/clang/docs/SourceBasedCodeCoverage.rst
index 7e711819be3..0e9c364fbf6 100644
--- a/gnu/llvm/clang/docs/SourceBasedCodeCoverage.rst
+++ b/gnu/llvm/clang/docs/SourceBasedCodeCoverage.rst
@@ -92,15 +92,42 @@ directory structure will be created. Additionally, the following special
instrumented program crashes, or is killed by a signal, perfect coverage
information can still be recovered. Continuous mode does not support value
profiling for PGO, and is only supported on Darwin at the moment. Support for
- Linux may be mostly complete but requires testing, and support for
- Fuchsia/Windows may require more extensive changes: please get involved if
- you are interested in porting this feature.
+ Linux may be mostly complete but requires testing, and support for Windows
+ may require more extensive changes: please get involved if you are interested
+ in porting this feature.
.. code-block:: console
# Step 2: Run the program.
% LLVM_PROFILE_FILE="foo.profraw" ./foo
+Note that continuous mode is also used on Fuchsia where it's the only supported
+mode, but the implementation is different. The Darwin and Linux implementation
+relies on padding and the ability to map a file over the existing memory
+mapping which is generally only available on POSIX systems and isn't suitable
+for other platforms.
+
+On Fuchsia, we rely on the ability to relocate counters at runtime using a
+level of indirection. On every counter access, we add a bias to the counter
+address. This bias is stored in ``__llvm_profile_counter_bias`` symbol that's
+provided by the profile runtime and is initially set to zero, meaning no
+relocation. The runtime can map the profile into memory at arbitrary locations,
+and set bias to the offset between the original and the new counter location,
+at which point every subsequent counter access will be to the new location,
+which allows updating profile directly akin to the continuous mode.
+
+The advantage of this approach is that doesn't require any special OS support.
+The disadvantage is the extra overhead due to additional instructions required
+for each counter access (overhead both in terms of binary size and performance)
+plus duplication of counters (i.e. one copy in the binary itself and another
+copy that's mapped into memory). This implementation can be also enabled for
+other platforms by passing the ``-runtime-counter-relocation`` option to the
+backend during compilation.
+
+.. code-block:: console
+
+ % clang++ -fprofile-instr-generate -fcoverage-mapping -mllvm -runtime-counter-relocation foo.cc -o foo
+
Creating coverage reports
=========================
diff --git a/gnu/llvm/clang/docs/ThinLTO.rst b/gnu/llvm/clang/docs/ThinLTO.rst
index 2d5d0a71fa6..528530c5ae9 100644
--- a/gnu/llvm/clang/docs/ThinLTO.rst
+++ b/gnu/llvm/clang/docs/ThinLTO.rst
@@ -194,7 +194,8 @@ Possible key-value pairs are:
Clang Bootstrap
---------------
-To bootstrap clang/LLVM with ThinLTO, follow these steps:
+To `bootstrap clang/LLVM `_
+with ThinLTO, follow these steps:
1. The host compiler_ must be a version of clang that supports ThinLTO.
#. The host linker_ must support ThinLTO (and in the case of gold, must be
@@ -225,7 +226,7 @@ To bootstrap clang/LLVM with ThinLTO, follow these steps:
``CMAKE_EXE_LINKER_FLAGS:STRING=``. Note the configure may fail if
linker plugin options are instead specified directly in the previous step.
-The `BOOTSTRAP_LLVM_ENABLE_LTO=Thin`` will enable ThinLTO for stage 2 and
+The ``BOOTSTRAP_LLVM_ENABLE_LTO=Thin`` will enable ThinLTO for stage 2 and
stage 3 in case the compiler used for stage 1 does not support the ThinLTO
option.
diff --git a/gnu/llvm/clang/docs/UndefinedBehaviorSanitizer.rst b/gnu/llvm/clang/docs/UndefinedBehaviorSanitizer.rst
index 0f6a42a2113..76676dfce95 100644
--- a/gnu/llvm/clang/docs/UndefinedBehaviorSanitizer.rst
+++ b/gnu/llvm/clang/docs/UndefinedBehaviorSanitizer.rst
@@ -54,6 +54,10 @@ and define the desired behavior for each kind of check:
* ``-fno-sanitize-recover=...``: print a verbose error report and exit the program;
* ``-fsanitize-trap=...``: execute a trap instruction (doesn't require UBSan run-time support).
+Note that the ``trap`` / ``recover`` options do not enable the corresponding
+sanitizer, and in general need to be accompanied by a suitable ``-fsanitize=``
+flag.
+
For example if you compile/link your program as:
.. code-block:: console
@@ -77,7 +81,9 @@ Available checks are:
``true`` nor ``false``.
- ``-fsanitize=builtin``: Passing invalid values to compiler builtins.
- ``-fsanitize=bounds``: Out of bounds array indexing, in cases
- where the array bound can be statically determined.
+ where the array bound can be statically determined. The check includes
+ ``-fsanitize=array-bounds`` and ``-fsanitize=local-bounds``. Note that
+ ``-fsanitize=local-bounds`` is not included in ``-fsanitize=undefined``.
- ``-fsanitize=enum``: Load of a value of an enumerated type which
is not in the range of representable values for that enumerated
type.
@@ -121,6 +127,10 @@ Available checks are:
is annotated with ``_Nonnull``.
- ``-fsanitize=nullability-return``: Returning null from a function with
a return type annotated with ``_Nonnull``.
+ - ``-fsanitize=objc-cast``: Invalid implicit cast of an ObjC object pointer
+ to an incompatible type. This is often unintentional, but is not undefined
+ behavior, therefore the check is not a part of the ``undefined`` group.
+ Currently only supported on Darwin.
- ``-fsanitize=object-size``: An attempt to potentially use bytes which
the optimizer can determine are not part of the object being accessed.
This will also detect some types of undefined behavior that may not
@@ -169,7 +179,8 @@ Available checks are:
You can also use the following check groups:
- ``-fsanitize=undefined``: All of the checks listed above other than
``float-divide-by-zero``, ``unsigned-integer-overflow``,
- ``implicit-conversion``, and the ``nullability-*`` group of checks.
+ ``implicit-conversion``, ``local-bounds`` and the ``nullability-*`` group
+ of checks.
- ``-fsanitize=undefined-trap``: Deprecated alias of
``-fsanitize=undefined``.
- ``-fsanitize=implicit-integer-truncation``: Catches lossy integral
@@ -198,7 +209,7 @@ You can also use the following check groups:
Volatile
--------
-The ``null``, ``alignment``, ``object-size``, and ``vptr`` checks do not apply
+The ``null``, ``alignment``, ``object-size``, ``local-bounds``, and ``vptr`` checks do not apply
to pointers to types with the ``volatile`` qualifier.
Minimal Runtime
diff --git a/gnu/llvm/clang/docs/UsersManual.rst b/gnu/llvm/clang/docs/UsersManual.rst
index 07157b9ad5f..8615a77596b 100644
--- a/gnu/llvm/clang/docs/UsersManual.rst
+++ b/gnu/llvm/clang/docs/UsersManual.rst
@@ -80,7 +80,7 @@ Basic Usage
Intro to how to use a C compiler for newbies.
compile + link compile then link debug info enabling optimizations
-picking a language to use, defaults to C11 by default. Autosenses based
+picking a language to use, defaults to C17 by default. Autosenses based
on extension. using a makefile
Command Line Options
@@ -1220,7 +1220,7 @@ are listed below.
* ``-fno-math-errno``
- * ``-ffinite-math``
+ * ``-ffinite-math-only``
* ``-fassociative-math``
@@ -1306,14 +1306,14 @@ are listed below.
**-f[no-]honor-infinities**
If both ``-fno-honor-infinities`` and ``-fno-honor-nans`` are used,
- has the same effect as specifying ``-ffinite-math``.
+ has the same effect as specifying ``-ffinite-math-only``.
.. _opt_fhonor-nans:
**-f[no-]honor-nans**
If both ``-fno-honor-infinities`` and ``-fno-honor-nans`` are used,
- has the same effect as specifying ``-ffinite-math``.
+ has the same effect as specifying ``-ffinite-math-only``.
.. _opt_fsigned-zeros:
@@ -1351,9 +1351,9 @@ are listed below.
Defaults to ``-fno-unsafe-math-optimizations``.
-.. _opt_ffinite-math:
+.. _opt_ffinite-math-only:
-**-f[no-]finite-math**
+**-f[no-]finite-math-only**
Allow floating-point optimizations that assume arguments and results are
not NaNs or +-Inf. This defines the ``__FINITE_MATH_ONLY__`` preprocessor macro.
@@ -1362,7 +1362,7 @@ are listed below.
* ``-fno-honor-infinities``
* ``-fno-honor-nans``
- Defaults to ``-fno-finite-math``.
+ Defaults to ``-fno-finite-math-only``.
.. _opt_frounding-math:
@@ -1466,7 +1466,7 @@ are listed below.
**-f[no-]sanitize-recover=check1,check2,...**
-**-f[no-]sanitize-recover=all**
+**-f[no-]sanitize-recover[=all]**
Controls which checks enabled by ``-fsanitize=`` flag are non-fatal.
If the check is fatal, program will halt after the first error
@@ -1492,6 +1492,8 @@ are listed below.
**-f[no-]sanitize-trap=check1,check2,...**
+**-f[no-]sanitize-trap[=all]**
+
Controls which checks enabled by the ``-fsanitize=`` flag trap. This
option is intended for use in cases where the sanitizer runtime cannot
be used (for instance, when building libc or a kernel module), or where
@@ -1499,9 +1501,7 @@ are listed below.
This flag is only compatible with :doc:`control flow integrity
` schemes and :doc:`UndefinedBehaviorSanitizer`
- checks other than ``vptr``. If this flag
- is supplied together with ``-fsanitize=undefined``, the ``vptr`` sanitizer
- will be implicitly disabled.
+ checks other than ``vptr``.
This flag is enabled by default for sanitizers in the ``cfi`` group.
@@ -1677,6 +1677,65 @@ are listed below.
on ELF targets when using the integrated assembler. This flag currently
only has an effect on ELF targets.
+**-f[no]-unique-internal-linkage-names**
+
+ Controls whether Clang emits a unique (best-effort) symbol name for internal
+ linkage symbols. When this option is set, compiler hashes the main source
+ file path from the command line and appends it to all internal symbols. If a
+ program contains multiple objects compiled with the same command-line source
+ file path, the symbols are not guaranteed to be unique. This option is
+ particularly useful in attributing profile information to the correct
+ function when multiple functions with the same private linkage name exist
+ in the binary.
+
+ It should be noted that this option cannot guarantee uniqueness and the
+ following is an example where it is not unique when two modules contain
+ symbols with the same private linkage name:
+
+ .. code-block:: console
+
+ $ cd $P/foo && clang -c -funique-internal-linkage-names name_conflict.c
+ $ cd $P/bar && clang -c -funique-internal-linkage-names name_conflict.c
+ $ cd $P && clang foo/name_conflict.o && bar/name_conflict.o
+
+**-fbasic-block-sections=[labels, all, list=, none]**
+
+ Controls whether Clang emits a label for each basic block. Further, with
+ values "all" and "list=arg", each basic block or a subset of basic blocks
+ can be placed in its own unique section.
+
+ With the ``list=`` option, a file containing the subset of basic blocks
+ that need to placed in unique sections can be specified. The format of the
+ file is as follows. For example, ``list=spec.txt`` where ``spec.txt`` is the
+ following:
+
+ ::
+
+ !foo
+ !!2
+ !_Z3barv
+
+ will place the machine basic block with ``id 2`` in function ``foo`` in a
+ unique section. It will also place all basic blocks of functions ``bar``
+ in unique sections.
+
+ Further, section clusters can also be specified using the ``list=``
+ option. For example, ``list=spec.txt`` where ``spec.txt`` contains:
+
+ ::
+
+ !foo
+ !!1 !!3 !!5
+ !!2 !!4 !!6
+
+ will create two unique sections for function ``foo`` with the first
+ containing the odd numbered basic blocks and the second containing the
+ even numbered basic blocks.
+
+ Basic block sections allow the linker to reorder basic blocks and enables
+ link-time optimizations like whole program inter-procedural basic block
+ reordering.
+
Profile Guided Optimization
---------------------------
@@ -2399,10 +2458,10 @@ See :doc:`LanguageExtensions`.
Differences between various standard modes
------------------------------------------
-clang supports the -std option, which changes what language mode clang
-uses. The supported modes for C are c89, gnu89, c99, gnu99, c11, gnu11,
-c17, gnu17, and various aliases for those modes. If no -std option is
-specified, clang defaults to gnu11 mode. Many C99 and C11 features are
+clang supports the -std option, which changes what language mode clang uses.
+The supported modes for C are c89, gnu89, c99, gnu99, c11, gnu11, c17, gnu17,
+c2x, gnu2x, and various aliases for those modes. If no -std option is
+specified, clang defaults to gnu17 mode. Many C99 and C11 features are
supported in earlier modes as a conforming extension, with a warning. Use
``-pedantic-errors`` to request an error if a feature from a later standard
revision is used in an earlier mode.
@@ -3073,7 +3132,7 @@ Global objects must be constructed before the first kernel using the global obje
is executed and destroyed just after the last kernel using the program objects is
executed. In OpenCL v2.0 drivers there is no specific API for invoking global
constructors. However, an easy workaround would be to enqueue a constructor
-initialization kernel that has a name ``@_GLOBAL__sub_I_``.
+initialization kernel that has a name ``_GLOBAL__sub_I_``.
This kernel is only present if there are any global objects to be initialized in
the compiled binary. One way to check this is by passing ``CL_PROGRAM_KERNEL_NAMES``
to ``clGetProgramInfo`` (OpenCL v2.0 s5.8.7).
@@ -3089,7 +3148,7 @@ before running any kernels in which the objects are used.
clang -cl-std=clc++ test.cl
If there are any global objects to be initialized, the final binary will contain
-the ``@_GLOBAL__sub_I_test.cl`` kernel to be enqueued.
+the ``_GLOBAL__sub_I_test.cl`` kernel to be enqueued.
Global destructors can not be invoked in OpenCL v2.0 drivers. However, all memory used
for program scope objects is released on ``clReleaseProgram``.
@@ -3297,58 +3356,59 @@ Execute ``clang-cl /?`` to see a list of supported options:
CL.EXE COMPATIBILITY OPTIONS:
/? Display available options
/arch: Set architecture for code generation
- /Brepro- Write current time into COFF output (default)
- /Brepro Do not write current time into COFF output (breaks link.exe /incremental)
+ /Brepro- Emit an object file which cannot be reproduced over time
+ /Brepro Emit an object file which can be reproduced over time
/clang: Pass to the clang driver
- /C Do not discard comments when preprocessing
+ /C Don't discard comments when preprocessing
/c Compile only
/d1PP Retain macro definitions in /E mode
/d1reportAllClassLayout Dump record layout information
- /diagnostics:caret Enable caret and column diagnostics (default)
+ /diagnostics:caret Enable caret and column diagnostics (on by default)
/diagnostics:classic Disable column and caret diagnostics
/diagnostics:column Disable caret diagnostics but keep column info
/D Define macro
- /EH Set exception handling model
+ /EH Exception handling model
/EP Disable linemarker output and preprocess to stdout
/execution-charset:
- Set runtime encoding, supports only UTF-8
+ Runtime encoding, supports only UTF-8
/E Preprocess to stdout
/fallback Fall back to cl.exe if clang-cl fails to compile
/FA Output assembly code file during compilation
- /Fa Set assembly output file name (with /FA)
- /Fe Set output executable file name
+ /Fa Output assembly code to this file during compilation (with /FA)
+ /Fe Set output executable file or directory (ends in / or \)
/FI Include file before parsing
/Fi Set preprocess output file name (with /P)
- /Fo Set output object file (with /c)
+ /Fo Set output object file, or directory (ends in / or \) (with /c)
/fp:except-
/fp:except
/fp:fast
/fp:precise
/fp:strict
- /Fp Set pch file name (with /Yc and /Yu)
+ /Fp Set pch filename (with /Yc and /Yu)
/GA Assume thread-local variables are defined in the executable
/Gd Set __cdecl as a default calling convention
/GF- Disable string pooling
/GF Enable string pooling (default)
- /GR- Do not emit RTTI data
+ /GR- Disable emission of RTTI data
/Gregcall Set __regcall as a default calling convention
- /GR Emit RTTI data (default)
+ /GR Enable emission of RTTI data
/Gr Set __fastcall as a default calling convention
/GS- Disable buffer security check
/GS Enable buffer security check (default)
/Gs Use stack probes (default)
/Gs Set stack probe size (default 4096)
- /guard: Enable Control Flow Guard with /guard:cf, or only the table with /guard:cf,nochecks
+ /guard: Enable Control Flow Guard with /guard:cf,
+ or only the table with /guard:cf,nochecks
/Gv Set __vectorcall as a default calling convention
- /Gw- Do not put each data item in its own section (default)
+ /Gw- Don't put each data item in its own section
/Gw Put each data item in its own section
- /GX- Deprecated (like not passing /EH)
- /GX Deprecated; use /EHsc
- /Gy- Do not put each function in its own section (default)
+ /GX- Disable exception handling
+ /GX Enable exception handling
+ /Gy- Don't put each function in its own section (default)
/Gy Put each function in its own section
/Gz Set __stdcall as a default calling convention
/help Display available options
- /imsvc Add to system include search path, as if in %INCLUDE%
+ /imsvc Add directory to system include search path, as if part of %INCLUDE%
/I Add directory to include search path
/J Make char type unsigned
/LDd Create debug DLL
@@ -3358,37 +3418,35 @@ Execute ``clang-cl /?`` to see a list of supported options:
/MD Use DLL run-time
/MTd Use static debug run-time
/MT Use static run-time
- /O1 Optimize for size (like /Og /Os /Oy /Ob2 /GF /Gy)
- /O2 Optimize for speed (like /Og /Oi /Ot /Oy /Ob2 /GF /Gy)
+ /O0 Disable optimization
+ /O1 Optimize for size (same as /Og /Os /Oy /Ob2 /GF /Gy)
+ /O2 Optimize for speed (same as /Og /Oi /Ot /Oy /Ob2 /GF /Gy)
/Ob0 Disable function inlining
- /Ob1 Only inline functions explicitly or implicitly marked inline
+ /Ob1 Only inline functions which are (explicitly or implicitly) marked inline
/Ob2 Inline functions as deemed beneficial by the compiler
/Od Disable optimization
/Og No effect
/Oi- Disable use of builtin functions
/Oi Enable use of builtin functions
- /openmp- Disable OpenMP support
- /openmp:experimental Enable OpenMP support with experimental SIMD support
- /openmp Enable OpenMP support
/Os Optimize for size
/Ot Optimize for speed
- /Ox Deprecated (like /Og /Oi /Ot /Oy /Ob2); use /O2
+ /Ox Deprecated (same as /Og /Oi /Ot /Oy /Ob2); use /O2 instead
/Oy- Disable frame pointer omission (x86 only, default)
/Oy Enable frame pointer omission (x86 only)
/O Set multiple /O flags at once; e.g. '/O2y-' for '/O2 /Oy-'
- /o Deprecated (set output file name); use /Fe or /Fe
+ /o Set output file or directory (ends in / or \)
/P Preprocess to file
/Qvec- Disable the loop vectorization passes
/Qvec Enable the loop vectorization passes
- /showFilenames- Do not print the name of each compiled file (default)
+ /showFilenames- Don't print the name of each compiled file (default)
/showFilenames Print the name of each compiled file
/showIncludes Print info about included files to stderr
- /source-charset: Set source encoding, supports only UTF-8
- /std: Set C++ version (c++14,c++17,c++latest)
+ /source-charset: Source encoding, supports only UTF-8
+ /std: Language standard to compile for
/TC Treat all source files as C
- /Tc Treat as C source file
+ /Tc Specify a C source file
/TP Treat all source files as C++
- /Tp Treat as C++ source file
+ /Tp Specify a C++ source file
/utf-8 Set source and runtime encoding to UTF-8 (default)
/U Undefine macro
/vd Control vtordisp placement
@@ -3405,19 +3463,17 @@ Execute ``clang-cl /?`` to see a list of supported options:
/W3 Enable -Wall
/W4 Enable -Wall and -Wextra
/Wall Enable -Weverything
- /WX- Do not treat warnings as errors (default)
+ /WX- Do not treat warnings as errors
/WX Treat warnings as errors
/w Disable all warnings
- /X Do not add %INCLUDE% to include search path
+ /X Don't add %INCLUDE% to the include search path
/Y- Disable precompiled headers, overrides /Yc and /Yu
/Yc Generate a pch file for all code up to and including
/Yu Load a pch file and use it instead of all code up to and including
/Z7 Enable CodeView debug information in object files
- /Zc:alignedNew- Disable C++17 aligned allocation functions
- /Zc:alignedNew Enable C++17 aligned allocation functions
- /Zc:char8_t- Disable char8_t from c++2a
- /Zc:char8_t Enable char8_t from C++2a
- /Zc:dllexportInlines- Do not dllexport/dllimport inline member functions of dllexport/import classes
+ /Zc:char8_t Enable C++2a char8_t type
+ /Zc:char8_t- Disable C++2a char8_t type
+ /Zc:dllexportInlines- Don't dllexport/dllimport inline member functions of dllexport/import classes
/Zc:dllexportInlines dllexport/dllimport inline member functions of dllexport/import classes (default)
/Zc:sizedDealloc- Disable C++14 sized global deallocation functions
/Zc:sizedDealloc Enable C++14 sized global deallocation functions
@@ -3426,21 +3482,18 @@ Execute ``clang-cl /?`` to see a list of supported options:
/Zc:threadSafeInit Enable thread-safe initialization of static variables
/Zc:trigraphs- Disable trigraphs (default)
/Zc:trigraphs Enable trigraphs
- /Zc:twoPhase- Disable two-phase name lookup in templates (default)
+ /Zc:twoPhase- Disable two-phase name lookup in templates
/Zc:twoPhase Enable two-phase name lookup in templates
/Zd Emit debug line number tables only
- /Zi Like /Z7
- /Zl Do not let object file auto-link default libraries
- /Zp Set default maximum struct packing alignment to 1
- /Zp Set default maximum struct packing alignment
+ /Zi Alias for /Z7. Does not produce PDBs.
+ /Zl Don't mention any default libraries in the object file
+ /Zp Set the default maximum struct packing alignment to 1
+ /Zp Specify the default maximum struct packing alignment
/Zs Syntax-check only
OPTIONS:
-### Print (but do not run) the commands to run for this compilation
--analyze Run the static analyzer
- -enable-trivial-auto-var-init-zero-knowing-it-will-be-removed-from-clang
- Trivial automatic variable initialization to zero is only here for benchmarks, it'll
- eventually be removed, and I'm OK with that because I'm only using it to benchmark
-faddrsig Emit an address-significance table
-fansi-escape-codes Use ANSI escape codes for diagnostics
-fblocks Enable the 'blocks' language feature
@@ -3450,13 +3503,6 @@ Execute ``clang-cl /?`` to see a list of supported options:
-fcomplete-member-pointers
Require member pointer base types to be complete if they would be significant under the Microsoft ABI
-fcoverage-mapping Generate coverage mapping to enable code coverage analysis
- -fcs-profile-generate=
- Generate instrumented code to collect context sensitive execution counts into
- /default.profraw (overridden by LLVM_PROFILE_FILE env var)
- -fcs-profile-generate Generate instrumented code to collect context sensitive execution counts into
- default.profraw (overridden by LLVM_PROFILE_FILE env var)
- -fdebug-compilation-dir
- The compilation directory to embed in the debug info.
-fdebug-macro Emit macro debug information
-fdelayed-template-parsing
Parse templated function definitions at the end of the translation unit
@@ -3464,17 +3510,16 @@ Execute ``clang-cl /?`` to see a list of supported options:
Print absolute paths in diagnostics
-fdiagnostics-parseable-fixits
Print fix-its in machine parseable form
- -fgnuc-version= Sets various macros to claim compatibility with the given GCC version (default is 4.2.1)
- -fintegrated-cc1 Run cc1 in-process
-flto= Set LTO mode to either 'full' or 'thin'
-flto Enable LTO in 'full' mode
-fmerge-all-constants Allow merging of constants
-fms-compatibility-version=
- Dot-separated value representing the Microsoft compiler version number to report in
- _MSC_VER (0 = don't define it (default))
+ Dot-separated value representing the Microsoft compiler version
+ number to report in _MSC_VER (0 = don't define it (default))
-fms-compatibility Enable full Microsoft Visual C++ compatibility
-fms-extensions Accept some non-standard constructs supported by the Microsoft compiler
- -fmsc-version= Microsoft compiler version number to report in _MSC_VER (0 = don't define it (default))
+ -fmsc-version= Microsoft compiler version number to report in _MSC_VER
+ (0 = don't define it (default))
-fno-addrsig Don't emit an address-significance table
-fno-builtin- Disable implicit builtin knowledge of a specific function
-fno-builtin Disable implicit builtin knowledge of functions
@@ -3485,11 +3530,6 @@ Execute ``clang-cl /?`` to see a list of supported options:
-fno-debug-macro Do not emit macro debug information
-fno-delayed-template-parsing
Disable delayed template parsing
- -fno-integrated-cc1 Spawn a separate process for each cc1
- -fno-profile-generate Disable generation of profile instrumentation.
- -fno-profile-instr-generate
- Disable generation of profile instrumentation.
- -fno-profile-instr-use Disable using instrumentation data for profile-guided optimization
-fno-sanitize-address-poison-custom-array-cookie
Disable poisoning array cookies when using custom operator new[] in AddressSanitizer
-fno-sanitize-address-use-after-scope
@@ -3497,8 +3537,6 @@ Execute ``clang-cl /?`` to see a list of supported options:
-fno-sanitize-address-use-odr-indicator
Disable ODR indicator globals
-fno-sanitize-blacklist Don't use blacklist file for sanitizers
- -fno-sanitize-cfi-canonical-jump-tables
- Do not make the jump table addresses canonical in the symbol table
-fno-sanitize-cfi-cross-dso
Disable control flow integrity (CFI) checks for cross-DSO calls.
-fno-sanitize-coverage=
@@ -3519,26 +3557,17 @@ Execute ``clang-cl /?`` to see a list of supported options:
-fno-sanitize-trap=
Disable trapping for specified sanitizers
-fno-standalone-debug Limit debug information produced to reduce size of debug binary
- -fno-temp-file Directly create compilation output files. This may lead to incorrect incremental builds if the compiler crashes
-fobjc-runtime= Specify the target Objective-C runtime kind and version
- -forder-file-instrumentation
- Generate instrumented code to collect order file into default.profraw file
- (overridden by '=' form of option or LLVM_PROFILE_FILE env var)
-fprofile-exclude-files=
Instrument only functions from files where names don't match all the regexes separated by a semi-colon
-fprofile-filter-files=
Instrument only functions from files where names match any regex separated by a semi-colon
- -fprofile-generate=
- Generate instrumented code to collect execution counts into
- /default.profraw (overridden by LLVM_PROFILE_FILE env var)
- -fprofile-generate Generate instrumented code to collect execution counts into
- default.profraw (overridden by LLVM_PROFILE_FILE env var)
-fprofile-instr-generate=
- Generate instrumented code to collect execution counts into
- (overridden by LLVM_PROFILE_FILE env var)
+ Generate instrumented code to collect execution counts into
+ (overridden by LLVM_PROFILE_FILE env var)
-fprofile-instr-generate
- Generate instrumented code to collect execution counts into
- default.profraw file (overridden by '=' form of option or LLVM_PROFILE_FILE env var)
+ Generate instrumented code to collect execution counts into default.profraw file
+ (overridden by '=' form of option or LLVM_PROFILE_FILE env var)
-fprofile-instr-use=
Use instrumentation data for profile-guided optimization
-fprofile-remapping-file=
@@ -3552,12 +3581,9 @@ Execute ``clang-cl /?`` to see a list of supported options:
-fsanitize-address-use-after-scope
Enable use-after-scope detection in AddressSanitizer
-fsanitize-address-use-odr-indicator
- Enable ODR indicator globals to avoid false ODR violation reports in partially sanitized
- programs at the cost of an increase in binary size
+ Enable ODR indicator globals to avoid false ODR violation reports in partially sanitized programs at the cost of an increase in binary size
-fsanitize-blacklist=
Path to blacklist file for sanitizers
- -fsanitize-cfi-canonical-jump-tables
- Make the jump table addresses canonical in the symbol table
-fsanitize-cfi-cross-dso
Enable control flow integrity (CFI) checks for cross-DSO calls.
-fsanitize-cfi-icall-generalize-pointers
@@ -3565,8 +3591,7 @@ Execute ``clang-cl /?`` to see a list of supported options:
-fsanitize-coverage=
Specify the type of coverage instrumentation for Sanitizers
-fsanitize-hwaddress-abi=
- Select the HWAddressSanitizer ABI to target (interceptor or platform,
- default interceptor). This option is currently unused.
+ Select the HWAddressSanitizer ABI to target (interceptor or platform, default interceptor)
-fsanitize-memory-track-origins=
Enable origins tracking in MemorySanitizer
-fsanitize-memory-track-origins
@@ -3576,8 +3601,6 @@ Execute ``clang-cl /?`` to see a list of supported options:
-fsanitize-recover=
Enable recovery for specified sanitizers
-fsanitize-stats Enable sanitizer statistics gathering.
- -fsanitize-system-blacklist=
- Path to system blacklist file for sanitizers
-fsanitize-thread-atomics
Enable atomic operations instrumentation in ThreadSanitizer (default)
-fsanitize-thread-func-entry-exit
@@ -3587,31 +3610,18 @@ Execute ``clang-cl /?`` to see a list of supported options:
-fsanitize-trap= Enable trapping for specified sanitizers
-fsanitize-undefined-strip-path-components=
Strip (or keep only, if negative) a given number of path components when emitting check metadata.
- -fsanitize= Turn on runtime checks for various forms of undefined or suspicious behavior. See user manual for available checks
+ -fsanitize= Turn on runtime checks for various forms of undefined or suspicious
+ behavior. See user manual for available checks
-fsplit-lto-unit Enables splitting of the LTO unit.
-fstandalone-debug Emit full debug info for all types used by the program
- -fthin-link-bitcode=
- Write minimized bitcode to for the ThinLTO thin link only
- -fthinlto-index= Perform ThinLTO importing using provided function summary index
- -ftime-trace-granularity=
- Minimum time granularity (in microseconds) traced by time profiler
- -ftime-trace Turn on time profiler. Generates JSON file based on output filename.
- -ftrivial-auto-var-init=
- Initialize trivial automatic stack variables: uninitialized (default) | pattern
- -fvirtual-function-elimination
- Enables dead virtual function elimination optimization. Requires -flto=full
-fwhole-program-vtables Enables whole-program vtable optimization. Requires -flto
-gcodeview-ghash Emit type record hashes in a .debug$H section
-gcodeview Generate CodeView debug information
- -gdwarf Generate source-level debug information with the default dwarf version
-gline-directives-only Emit debug line info directives only
-gline-tables-only Emit debug line number tables only
- -gno-inline-line-tables Don't emit inline line tables
-miamcu Use Intel MCU ABI
-mllvm Additional arguments to forward to LLVM's option processing
-nobuiltininc Disable builtin #include directories
- -print-supported-cpus Print supported cpu models for the given target
- (if target is not specified, it will print the supported cpus for the default target)
-Qunused-arguments Don't emit warning for unused driver arguments
-R Enable the specified remark
--target= Generate code for the given target
@@ -3717,3 +3727,56 @@ This option is intended to be used as a temporary means to build projects where
clang-cl cannot successfully compile all the files. clang-cl may fail to compile
a file either because it cannot generate code for some C++ feature, or because
it cannot parse some Microsoft language extension.
+
+Finding Clang runtime libraries
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+clang-cl supports several features that require runtime library support:
+
+- Address Sanitizer (ASan): ``-fsanitize=address``
+- Undefined Behavior Sanitizer (UBSan): ``-fsanitize=undefined``
+- Code coverage: ``-fprofile-instr-generate -fcoverage-mapping``
+- Profile Guided Optimization (PGO): ``-fprofile-instr-generate``
+- Certain math operations (int128 division) require the builtins library
+
+In order to use these features, the user must link the right runtime libraries
+into their program. These libraries are distributed alongside Clang in the
+library resource directory. Clang searches for the resource directory by
+searching relative to the Clang executable. For example, if LLVM is installed
+in ``C:\Program Files\LLVM``, then the profile runtime library will be located
+at the path
+``C:\Program Files\LLVM\lib\clang\11.0.0\lib\windows\clang_rt.profile-x86_64.lib``.
+
+For UBSan, PGO, and coverage, Clang will emit object files that auto-link the
+appropriate runtime library, but the user generally needs to help the linker
+(whether it is ``lld-link.exe`` or MSVC ``link.exe``) find the library resource
+directory. Using the example installation above, this would mean passing
+``/LIBPATH:C:\Program Files\LLVM\lib\clang\11.0.0\lib\windows`` to the linker.
+If the user links the program with the ``clang`` or ``clang-cl`` drivers, the
+driver will pass this flag for them.
+
+If the linker cannot find the appropriate library, it will emit an error like
+this::
+
+ $ clang-cl -c -fsanitize=undefined t.cpp
+
+ $ lld-link t.obj -dll
+ lld-link: error: could not open 'clang_rt.ubsan_standalone-x86_64.lib': no such file or directory
+ lld-link: error: could not open 'clang_rt.ubsan_standalone_cxx-x86_64.lib': no such file or directory
+
+ $ link t.obj -dll -nologo
+ LINK : fatal error LNK1104: cannot open file 'clang_rt.ubsan_standalone-x86_64.lib'
+
+To fix the error, add the appropriate ``/libpath:`` flag to the link line.
+
+For ASan, as of this writing, the user is also responsible for linking against
+the correct ASan libraries.
+
+If the user is using the dynamic CRT (``/MD``), then they should add
+``clang_rt.asan_dynamic-x86_64.lib`` to the link line as a regular input. For
+other architectures, replace x86_64 with the appropriate name here and below.
+
+If the user is using the static CRT (``/MT``), then different runtimes are used
+to produce DLLs and EXEs. To link a DLL, pass
+``clang_rt.asan_dll_thunk-x86_64.lib``. To link an EXE, pass
+``-wholearchive:clang_rt.asan-x86_64.lib``.
diff --git a/gnu/llvm/clang/docs/analyzer/checkers.rst b/gnu/llvm/clang/docs/analyzer/checkers.rst
index dd2365e873f..ca5aec67717 100644
--- a/gnu/llvm/clang/docs/analyzer/checkers.rst
+++ b/gnu/llvm/clang/docs/analyzer/checkers.rst
@@ -439,7 +439,7 @@ optin.cplusplus.UninitializedObject (C++)
This checker reports uninitialized fields in objects created after a constructor
call. It doesn't only find direct uninitialized fields, but rather makes a deep
inspection of the object, analyzing all of it's fields subfields.
-The checker regards inherited fields as direct fields, so one will recieve
+The checker regards inherited fields as direct fields, so one will receive
warnings for uninitialized inherited data members as well.
.. code-block:: cpp
@@ -525,7 +525,7 @@ This checker has several options which can be set from command line (e.g.
objects that don't have at least one initialized field. Defaults to false.
* ``NotesAsWarnings`` (boolean). If set to true, the checker will emit a
- warning for each uninitalized field, as opposed to emitting one warning per
+ warning for each uninitialized field, as opposed to emitting one warning per
constructor call, and listing the uninitialized fields that belongs to it in
notes. *Defaults to false*.
@@ -1374,6 +1374,54 @@ double freed, or use after freed. This check attempts to find such problems.
zx_handle_close(sb);
}
+WebKit
+^^^^^^
+
+WebKit is an open-source web browser engine available for macOS, iOS and Linux.
+This section describes checkers that can find issues in WebKit codebase.
+
+Most of the checkers focus on memory management for which WebKit uses custom implementation of reference counted smartpointers.
+
+Checkers are formulated in terms related to ref-counting:
+ - *Ref-counted type* is either ``Ref`` or ``RefPtr``.
+ - *Ref-countable type* is any type that implements ``ref()`` and ``deref()`` methods as ``RefPtr<>`` is a template (i. e. relies on duck typing).
+ - *Uncounted type* is ref-countable but not ref-counted type.
+
+.. _webkit-RefCntblBaseVirtualDtor:
+
+webkit.RefCntblBaseVirtualDtor
+""""""""""""""""""""""""""""""""""""
+All uncounted types used as base classes must have a virtual destructor.
+
+Ref-counted types hold their ref-countable data by a raw pointer and allow implicit upcasting from ref-counted pointer to derived type to ref-counted pointer to base type. This might lead to an object of (dynamic) derived type being deleted via pointer to the base class type which C++ standard defines as UB in case the base class doesn't have virtual destructor ``[expr.delete]``.
+
+.. code-block:: cpp
+
+ struct RefCntblBase {
+ void ref() {}
+ void deref() {}
+ };
+
+ struct Derived : RefCntblBase { }; // warn
+
+.. _webkit-NoUncountedMemberChecker:
+
+webkit.NoUncountedMemberChecker
+"""""""""""""""""""""""""""""""""""""
+Raw pointers and references to uncounted types can't be used as class members. Only ref-counted types are allowed.
+
+.. code-block:: cpp
+
+ struct RefCntbl {
+ void ref() {}
+ void deref() {}
+ };
+
+ struct Foo {
+ RefCntbl * ptr; // warn
+ RefCntbl & ptr; // warn
+ // ...
+ };
.. _alpha-checkers:
@@ -1424,6 +1472,23 @@ Warn about assigning non-{0,1} values to boolean variables.
alpha.core
^^^^^^^^^^
+.. _alpha-core-C11Lock:
+
+alpha.core.C11Lock
+""""""""""""""""""
+Similarly to :ref:`alpha.unix.PthreadLock `, checks for
+the locking/unlocking of ``mtx_t`` mutexes.
+
+.. code-block:: cpp
+
+ mtx_t mtx1;
+
+ void bad1(void)
+ {
+ mtx_lock(&mtx1);
+ mtx_lock(&mtx1); // warn: This lock has already been acquired
+ }
+
.. _alpha-core-CallAndMessageUnInitRefArg:
alpha.core.CallAndMessageUnInitRefArg (C,C++, ObjC)
@@ -1788,6 +1853,39 @@ Check unreachable code.
[x retain]; // warn
}
+.. _alpha-cplusplus-SmartPtr:
+
+alpha.cplusplus.SmartPtr (C++)
+""""""""""""""""""""""""""""""
+Check for dereference of null smart pointers.
+
+.. code-block:: cpp
+
+ void deref_smart_ptr() {
+ std::unique_ptr P;
+ *P; // warn: dereference of a default constructed smart unique_ptr
+ }
+
+alpha.fuchsia
+^^^^^^^^^^^^^
+
+.. _alpha-fuchsia-lock:
+
+alpha.fuchsia.Lock
+""""""""""""""""""
+Similarly to :ref:`alpha.unix.PthreadLock `, checks for
+the locking/unlocking of fuchsia mutexes.
+
+.. code-block:: cpp
+
+ spin_lock_t mtx1;
+
+ void bad1(void)
+ {
+ spin_lock(&mtx1);
+ spin_lock(&mtx1); // warn: This lock has already been acquired
+ }
+
alpha.llvm
^^^^^^^^^^
@@ -1929,6 +2027,38 @@ Warns against using one vs. many plural pattern in code when generating localize
alpha.security
^^^^^^^^^^^^^^
+
+
+alpha.security.cert
+^^^^^^^^^^^^^^^^^^^
+
+SEI CERT checkers which tries to find errors based on their `C coding rules `_.
+
+.. _alpha-security-cert-pos-checkers:
+
+alpha.security.cert.pos
+^^^^^^^^^^^^^^^^^^^^^^^
+
+SEI CERT checkers of `POSIX C coding rules `_.
+
+.. _alpha-security-cert-pos-34c:
+
+alpha.security.cert.pos.34c
+"""""""""""""""""""""""""""
+Finds calls to the ``putenv`` function which pass a pointer to an automatic variable as the argument.
+
+.. code-block:: c
+
+ int func(const char *var) {
+ char env[1024];
+ int retval = snprintf(env, sizeof(env),"TEST=%s", var);
+ if (retval < 0 || (size_t)retval >= sizeof(env)) {
+ /* Handle error */
+ }
+
+ return putenv(env); // putenv function should not be called with auto variables
+ }
+
.. _alpha-security-ArrayBound:
alpha.security.ArrayBound (C)
@@ -2167,9 +2297,9 @@ lck_rw_try_lock_exclusive, lck_rw_try_lock_shared, pthread_mutex_unlock, pthread
alpha.unix.SimpleStream (C)
"""""""""""""""""""""""""""
Check for misuses of stream APIs. Check for misuses of stream APIs: ``fopen, fclose``
-(demo checker, the subject of the demo (`Slides `_ ,
+(demo checker, the subject of the demo (`Slides `_ ,
`Video `_) by Anna Zaks and Jordan Rose presented at the
-`2012 LLVM Developers' Meeting `_).
+`2012 LLVM Developers' Meeting `_).
.. code-block:: c
@@ -2297,6 +2427,99 @@ Check for non-determinism caused by sorting of pointers.
}
+alpha.WebKit
+^^^^^^^^^^^^
+
+.. _alpha-webkit-UncountedCallArgsChecker:
+
+alpha.webkit.UncountedCallArgsChecker
+"""""""""""""""""""""""""""""""""""""
+The goal of this rule is to make sure that lifetime of any dynamically allocated ref-countable object passed as a call argument spans past the end of the call. This applies to call to any function, method, lambda, function pointer or functor. Ref-countable types aren't supposed to be allocated on stack so we check arguments for parameters of raw pointers and references to uncounted types.
+
+Here are some examples of situations that we warn about as they *might* be potentially unsafe. The logic is that either we're able to guarantee that an argument is safe or it's considered if not a bug then bug-prone.
+
+ .. code-block:: cpp
+
+ RefCountable* provide_uncounted();
+ void consume(RefCountable*);
+
+ // In these cases we can't make sure callee won't directly or indirectly call `deref()` on the argument which could make it unsafe from such point until the end of the call.
+
+ void foo1() {
+ consume(provide_uncounted()); // warn
+ }
+
+ void foo2() {
+ RefCountable* uncounted = provide_uncounted();
+ consume(uncounted); // warn
+ }
+
+Although we are enforcing member variables to be ref-counted by `webkit.NoUncountedMemberChecker` any method of the same class still has unrestricted access to these. Since from a caller's perspective we can't guarantee a particular member won't get modified by callee (directly or indirectly) we don't consider values obtained from members safe.
+
+Note: It's likely this heuristic could be made more precise with fewer false positives - for example calls to free functions that don't have any parameter other than the pointer should be safe as the callee won't be able to tamper with the member unless it's a global variable.
+
+ .. code-block:: cpp
+
+ struct Foo {
+ RefPtr member;
+ void consume(RefCountable*) { /* ... */ }
+ void bugprone() {
+ consume(member.get()); // warn
+ }
+ };
+
+The implementation of this rule is a heuristic - we define a whitelist of kinds of values that are considered safe to be passed as arguments. If we can't prove an argument is safe it's considered an error.
+
+Allowed kinds of arguments:
+
+- values obtained from ref-counted objects (including temporaries as those survive the call too)
+
+ .. code-block:: cpp
+
+ RefCountable* provide_uncounted();
+ void consume(RefCountable*);
+
+ void foo() {
+ RefPtr rc = makeRef(provide_uncounted());
+ consume(rc.get()); // ok
+ consume(makeRef(provide_uncounted()).get()); // ok
+ }
+
+- forwarding uncounted arguments from caller to callee
+
+ .. code-block:: cpp
+
+ void foo(RefCountable& a) {
+ bar(a); // ok
+ }
+
+ Caller of ``foo()`` is responsible for ``a``'s lifetime.
+
+- ``this`` pointer
+
+ .. code-block:: cpp
+
+ void Foo::foo() {
+ baz(this); // ok
+ }
+
+ Caller of ``foo()`` is responsible for keeping the memory pointed to by ``this`` pointer safe.
+
+- constants
+
+ .. code-block:: cpp
+
+ foo(nullptr, NULL, 0); // ok
+
+We also define a set of safe transformations which if passed a safe value as an input provide (usually it's the return value) a safe value (or an object that provides safe values). This is also a heuristic.
+
+- constructors of ref-counted types (including factory methods)
+- getters of ref-counted types
+- member overloaded operators
+- casts
+- unary operators like ``&`` or ``*``
+
+
Debug Checkers
---------------
diff --git a/gnu/llvm/clang/docs/analyzer/conf.py b/gnu/llvm/clang/docs/analyzer/conf.py
index 09967598acb..6873ecc6c9c 100644
--- a/gnu/llvm/clang/docs/analyzer/conf.py
+++ b/gnu/llvm/clang/docs/analyzer/conf.py
@@ -49,9 +49,9 @@ copyright = u'2013-%d, Analyzer Team' % date.today().year
# built documents.
#
# The short version.
-version = '6'
+version = '11'
# The full version, including alpha/beta/rc tags.
-release = '6'
+release = '11'
# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
diff --git a/gnu/llvm/clang/docs/analyzer/developer-docs/DebugChecks.rst b/gnu/llvm/clang/docs/analyzer/developer-docs/DebugChecks.rst
index 3f9bed78604..48b584a4630 100644
--- a/gnu/llvm/clang/docs/analyzer/developer-docs/DebugChecks.rst
+++ b/gnu/llvm/clang/docs/analyzer/developer-docs/DebugChecks.rst
@@ -275,6 +275,28 @@ ExprInspection checks
See clang_analyzer_denote().
+- ``void clang_analyzer_isTainted(a single argument of any type);``
+
+ Queries the analyzer whether the expression used as argument is tainted or not.
+ This is useful in tests, where we don't want to issue warning for all tainted
+ expressions but only check for certain expressions.
+ This would help to reduce the *noise* that the `TaintTest` debug checker would
+ introduce and let you focus on the `expected-warning`'s that you really care
+ about.
+
+ Example usage::
+
+ int read_integer() {
+ int n;
+ clang_analyzer_isTainted(n); // expected-warning{{NO}}
+ scanf("%d", &n);
+ clang_analyzer_isTainted(n); // expected-warning{{YES}}
+ clang_analyzer_isTainted(n + 2); // expected-warning{{YES}}
+ clang_analyzer_isTainted(n > 0); // expected-warning{{YES}}
+ int next_tainted_value = n; // no-warning
+ return n;
+ }
+
Statistics
==========
diff --git a/gnu/llvm/clang/docs/analyzer/user-docs/CrossTranslationUnit.rst b/gnu/llvm/clang/docs/analyzer/user-docs/CrossTranslationUnit.rst
index 86f972b63e3..0606185f39e 100644
--- a/gnu/llvm/clang/docs/analyzer/user-docs/CrossTranslationUnit.rst
+++ b/gnu/llvm/clang/docs/analyzer/user-docs/CrossTranslationUnit.rst
@@ -3,14 +3,35 @@ Cross Translation Unit (CTU) Analysis
=====================================
Normally, static analysis works in the boundary of one translation unit (TU).
-However, with additional steps and configuration we can enable the analysis to inline the definition of a function from another TU.
+However, with additional steps and configuration we can enable the analysis to inline the definition of a function from
+another TU.
.. contents::
:local:
-Manual CTU Analysis
--------------------
+Overview
+________
+CTU analysis can be used in a variety of ways. The importing of external TU definitions can work with pre-dumped PCH
+files or generating the necessary AST structure on-demand, during the analysis of the main TU. Driving the static
+analysis can also be implemented in multiple ways. The most direct way is to specify the necessary commandline options
+of the Clang frontend manually (and generate the prerequisite dependencies of the specific import method by hand). This
+process can be automated by other tools, like `CodeChecker `_ and scan-build-py
+(preference for the former).
+
+PCH-based analysis
+__________________
+The analysis needs the PCH dumps of all the translations units used in the project.
+These can be generated by the Clang Frontend itself, and must be arranged in a specific way in the filesystem.
+The index, which maps symbols' USR names to PCH dumps containing them must also be generated by the
+`clang-extdef-mapping`. Entries in the index *must* have an `.ast` suffix if the goal
+is to use PCH-based analysis, as the lack of that extension signals that the entry is to be used as a source-file, and parsed on-demand.
+This tool uses a :doc:`compilation database <../../JSONCompilationDatabase>` to
+determine the compilation flags used.
+The analysis invocation must be provided with the directory which contains the dumps and the mapping files.
+
+Manual CTU Analysis
+###################
Let's consider these source files in our minimal example:
.. code-block:: cpp
@@ -47,7 +68,8 @@ And a compilation database:
]
We'd like to analyze `main.cpp` and discover the division by zero bug.
-In order to be able to inline the definition of `foo` from `foo.cpp` first we have to generate the `AST` (or `PCH`) file of `foo.cpp`:
+In order to be able to inline the definition of `foo` from `foo.cpp` first we have to generate the `AST` (or `PCH`) file
+of `foo.cpp`:
.. code-block:: bash
@@ -58,7 +80,8 @@ In order to be able to inline the definition of `foo` from `foo.cpp` first we ha
compile_commands.json foo.cpp.ast foo.cpp main.cpp
$
-The next step is to create a CTU index file which holds the `USR` name and location of external definitions in the source files:
+The next step is to create a CTU index file which holds the `USR` name and location of external definitions in the
+source files:
.. code-block:: bash
@@ -85,47 +108,33 @@ We have to feed Clang with CTU specific extra arguments:
$ pwd
/path/to/your/project
- $ clang++ --analyze -Xclang -analyzer-config -Xclang experimental-enable-naive-ctu-analysis=true -Xclang -analyzer-config -Xclang ctu-dir=. -Xclang -analyzer-output=plist-multi-file main.cpp
+ $ clang++ --analyze \
+ -Xclang -analyzer-config -Xclang experimental-enable-naive-ctu-analysis=true \
+ -Xclang -analyzer-config -Xclang ctu-dir=. \
+ -Xclang -analyzer-output=plist-multi-file \
+ main.cpp
main.cpp:5:12: warning: Division by zero
return 3 / foo();
~~^~~~~~~
1 warning generated.
$ # The plist file with the result is generated.
- $ ls
+ $ ls -F
compile_commands.json externalDefMap.txt foo.ast foo.cpp foo.cpp.ast main.cpp main.plist
$
-This manual procedure is error-prone and not scalable, therefore to analyze real projects it is recommended to use `CodeChecker` or `scan-build-py`.
+This manual procedure is error-prone and not scalable, therefore to analyze real projects it is recommended to use
+`CodeChecker` or `scan-build-py`.
Automated CTU Analysis with CodeChecker
----------------------------------------
+#######################################
The `CodeChecker `_ project fully supports automated CTU analysis with Clang.
Once we have set up the `PATH` environment variable and we activated the python `venv` then it is all it takes:
.. code-block:: bash
$ CodeChecker analyze --ctu compile_commands.json -o reports
- [INFO 2019-07-16 17:21] - Pre-analysis started.
- [INFO 2019-07-16 17:21] - Collecting data for ctu analysis.
- [INFO 2019-07-16 17:21] - [1/2] foo.cpp
- [INFO 2019-07-16 17:21] - [2/2] main.cpp
- [INFO 2019-07-16 17:21] - Pre-analysis finished.
- [INFO 2019-07-16 17:21] - Starting static analysis ...
- [INFO 2019-07-16 17:21] - [1/2] clangsa analyzed foo.cpp successfully.
- [INFO 2019-07-16 17:21] - [2/2] clangsa analyzed main.cpp successfully.
- [INFO 2019-07-16 17:21] - ----==== Summary ====----
- [INFO 2019-07-16 17:21] - Successfully analyzed
- [INFO 2019-07-16 17:21] - clangsa: 2
- [INFO 2019-07-16 17:21] - Total analyzed compilation commands: 2
- [INFO 2019-07-16 17:21] - ----=================----
- [INFO 2019-07-16 17:21] - Analysis finished.
- [INFO 2019-07-16 17:21] - To view results in the terminal use the "CodeChecker parse" command.
- [INFO 2019-07-16 17:21] - To store results use the "CodeChecker store" command.
- [INFO 2019-07-16 17:21] - See --help and the user guide for further options about parsing and storing the reports.
- [INFO 2019-07-16 17:21] - ----=================----
- [INFO 2019-07-16 17:21] - Analysis length: 0.659618854523 sec.
- $ ls
- compile_commands.json foo.cpp foo.cpp.ast main.cpp reports
+ $ ls -F
+ compile_commands.json foo.cpp foo.cpp.ast main.cpp reports/
$ tree reports
reports
├── compile_cmd.json
@@ -174,9 +183,9 @@ Or we can use `CodeChecker parse -e html` to export the results into HTML format
$ firefox html_out/index.html
Automated CTU Analysis with scan-build-py (don't do it)
--------------------------------------------------------
-We actively develop CTU with CodeChecker as a "runner" script, `scan-build-py` is not actively developed for CTU.
-`scan-build-py` has various errors and issues, expect it to work with the very basic projects only.
+#############################################################
+We actively develop CTU with CodeChecker as the driver for this feature, `scan-build-py` is not actively developed for CTU.
+`scan-build-py` has various errors and issues, expect it to work only with the very basic projects only.
Example usage of scan-build-py:
@@ -191,3 +200,178 @@ Example usage of scan-build-py:
Opening in existing browser session.
^C
$
+
+.. _ctu-on-demand:
+
+On-demand analysis
+__________________
+The analysis produces the necessary AST structure of external TUs during analysis. This requires the
+exact compiler invocations for each TU, which can be generated by hand, or by tools driving the analyzer.
+The compiler invocation is a shell command that could be used to compile the TU-s main source file.
+The mapping from absolute source file paths of a TU to lists of compilation command segments used to
+compile said TU are given in YAML format referred to as `invocation list`, and must be passed as an
+analyer-config argument.
+The index, which maps function USR names to source files containing them must also be generated by the
+`clang-extdef-mapping`. Entries in the index must *not* have an `.ast` suffix if the goal
+is to use On-demand analysis, as that extension signals that the entry is to be used as an PCH-dump.
+The mapping of external definitions implicitly uses a
+:doc:`compilation database <../../JSONCompilationDatabase>` to determine the compilation flags used.
+The analysis invocation must be provided with the directory which contains the mapping
+files, and the `invocation list` which is used to determine compiler flags.
+
+
+Manual CTU Analysis
+###################
+
+Let's consider these source files in our minimal example:
+
+.. code-block:: cpp
+
+ // main.cpp
+ int foo();
+
+ int main() {
+ return 3 / foo();
+ }
+
+.. code-block:: cpp
+
+ // foo.cpp
+ int foo() {
+ return 0;
+ }
+
+The compilation database:
+
+.. code-block:: bash
+
+ [
+ {
+ "directory": "/path/to/your/project",
+ "command": "clang++ -c foo.cpp -o foo.o",
+ "file": "foo.cpp"
+ },
+ {
+ "directory": "/path/to/your/project",
+ "command": "clang++ -c main.cpp -o main.o",
+ "file": "main.cpp"
+ }
+ ]
+
+The `invocation list`:
+
+.. code-block:: bash
+
+ "/path/to/your/project/foo.cpp":
+ - "clang++"
+ - "-c"
+ - "/path/to/your/project/foo.cpp"
+ - "-o"
+ - "/path/to/your/project/foo.o"
+
+ "/path/to/your/project/main.cpp":
+ - "clang++"
+ - "-c"
+ - "/path/to/your/project/main.cpp"
+ - "-o"
+ - "/path/to/your/project/main.o"
+
+We'd like to analyze `main.cpp` and discover the division by zero bug.
+As we are using On-demand mode, we only need to create a CTU index file which holds the `USR` name and location of
+external definitions in the source files:
+
+.. code-block:: bash
+
+ $ clang-extdef-mapping -p . foo.cpp
+ c:@F@foo# /path/to/your/project/foo.cpp
+ $ clang-extdef-mapping -p . foo.cpp > externalDefMap.txt
+
+Now everything is available for the CTU analysis.
+We have to feed Clang with CTU specific extra arguments:
+
+.. code-block:: bash
+
+ $ pwd
+ /path/to/your/project
+ $ clang++ --analyze \
+ -Xclang -analyzer-config -Xclang experimental-enable-naive-ctu-analysis=true \
+ -Xclang -analyzer-config -Xclang ctu-dir=. \
+ -Xclang -analyzer-config -Xclang ctu-invocation-list=invocations.yaml \
+ -Xclang -analyzer-output=plist-multi-file \
+ main.cpp
+ main.cpp:5:12: warning: Division by zero
+ return 3 / foo();
+ ~~^~~~~~~
+ 1 warning generated.
+ $ # The plist file with the result is generated.
+ $ ls -F
+ compile_commands.json externalDefMap.txt foo.cpp main.cpp main.plist
+ $
+
+This manual procedure is error-prone and not scalable, therefore to analyze real projects it is recommended to use
+`CodeChecker` or `scan-build-py`.
+
+Automated CTU Analysis with CodeChecker
+#######################################
+The `CodeChecker `_ project fully supports automated CTU analysis with Clang.
+Once we have set up the `PATH` environment variable and we activated the python `venv` then it is all it takes:
+
+.. code-block:: bash
+
+ $ CodeChecker analyze --ctu --ctu-ast-loading-mode on-demand compile_commands.json -o reports
+ $ ls -F
+ compile_commands.json foo.cpp main.cpp reports/
+ $ tree reports
+ reports
+ ├── compile_cmd.json
+ ├── compiler_info.json
+ ├── foo.cpp_53f6fbf7ab7ec9931301524b551959e2.plist
+ ├── main.cpp_23db3d8df52ff0812e6e5a03071c8337.plist
+ ├── metadata.json
+ └── unique_compile_commands.json
+
+ 0 directories, 6 files
+ $
+
+The `plist` files contain the results of the analysis, which may be viewed with the regular analysis tools.
+E.g. one may use `CodeChecker parse` to view the results in command line:
+
+.. code-block:: bash
+
+ $ CodeChecker parse reports
+ [HIGH] /home/egbomrt/ctu_mini_raw_project/main.cpp:5:12: Division by zero [core.DivideZero]
+ return 3 / foo();
+ ^
+
+ Found 1 defect(s) in main.cpp
+
+
+ ----==== Summary ====----
+ -----------------------
+ Filename | Report count
+ -----------------------
+ main.cpp | 1
+ -----------------------
+ -----------------------
+ Severity | Report count
+ -----------------------
+ HIGH | 1
+ -----------------------
+ ----=================----
+ Total number of reports: 1
+ ----=================----
+
+Or we can use `CodeChecker parse -e html` to export the results into HTML format:
+
+.. code-block:: bash
+
+ $ CodeChecker parse -e html -o html_out reports
+ $ firefox html_out/index.html
+
+Automated CTU Analysis with scan-build-py (don't do it)
+#######################################################
+We actively develop CTU with CodeChecker as the driver for feature, `scan-build-py` is not actively developed for CTU.
+`scan-build-py` has various errors and issues, expect it to work only with the very basic projects only.
+
+Currently On-demand analysis is not supported with `scan-build-py`.
+
diff --git a/gnu/llvm/clang/docs/conf.py b/gnu/llvm/clang/docs/conf.py
index e16ff49eb28..164f15d1e28 100644
--- a/gnu/llvm/clang/docs/conf.py
+++ b/gnu/llvm/clang/docs/conf.py
@@ -50,9 +50,9 @@ copyright = u'2007-%d, The Clang Team' % date.today().year
# built documents.
#
# The short version.
-version = '10'
+version = '11'
# The full version, including alpha/beta/rc tags.
-release = '10'
+release = '11'
# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
diff --git a/gnu/llvm/clang/docs/index.rst b/gnu/llvm/clang/docs/index.rst
index 493f736f2be..c49312861ba 100644
--- a/gnu/llvm/clang/docs/index.rst
+++ b/gnu/llvm/clang/docs/index.rst
@@ -77,6 +77,7 @@ Using Clang Tools
ClangCheck
ClangFormat
ClangFormatStyleOptions
+ ClangFormattedStatus
Design Documents
================
diff --git a/gnu/llvm/clang/docs/tools/dump_ast_matchers.py b/gnu/llvm/clang/docs/tools/dump_ast_matchers.py
index c96c1ca27ac..045833be767 100755
--- a/gnu/llvm/clang/docs/tools/dump_ast_matchers.py
+++ b/gnu/llvm/clang/docs/tools/dump_ast_matchers.py
@@ -101,8 +101,15 @@ def unify_arguments(args):
args = re.sub(r'extern const\s+(.*)&', r'\1 ', args)
args = re.sub(r'&', r' ', args)
args = re.sub(r'(^|\s)M\d?(\s)', r'\1Matcher<*>\2', args)
+ args = re.sub(r'BindableMatcher', r'Matcher', args)
+ args = re.sub(r'const Matcher', r'Matcher', args)
return args
+def unify_type(result_type):
+ """Gets rid of anything the user doesn't care about in the type name."""
+ result_type = re.sub(r'^internal::(Bindable)?Matcher<([a-zA-Z_][a-zA-Z0-9_]*)>$', r'\2', result_type)
+ return result_type
+
def add_matcher(result_type, name, args, comment, is_dyncast=False):
"""Adds a matcher to one of our categories."""
if name == 'id':
@@ -111,6 +118,7 @@ def add_matcher(result_type, name, args, comment, is_dyncast=False):
matcher_id = '%s%d' % (name, ids[name])
ids[name] += 1
args = unify_arguments(args)
+ result_type = unify_type(result_type)
matcher_html = TD_TEMPLATE % {
'result': esc('Matcher<%s>' % result_type),
'name': name,
@@ -119,7 +127,8 @@ def add_matcher(result_type, name, args, comment, is_dyncast=False):
'id': matcher_id,
}
if is_dyncast:
- node_matchers[result_type + name] = matcher_html
+ dict = node_matchers
+ lookup = result_type + name
# Use a heuristic to figure out whether a matcher is a narrowing or
# traversal matcher. By default, matchers that take other matchers as
# arguments (and are not node matchers) do traversal. We specifically
@@ -127,9 +136,14 @@ def add_matcher(result_type, name, args, comment, is_dyncast=False):
# arguments.
elif ('Matcher<' not in args or
name in ['allOf', 'anyOf', 'anything', 'unless']):
- narrowing_matchers[result_type + name + esc(args)] = matcher_html
+ dict = narrowing_matchers
+ lookup = result_type + name + esc(args)
else:
- traversal_matchers[result_type + name + esc(args)] = matcher_html
+ dict = traversal_matchers
+ lookup = result_type + name + esc(args)
+
+ if dict.get(lookup) is None or len(dict.get(lookup)) < len(matcher_html):
+ dict[lookup] = matcher_html
def act_on_decl(declaration, comment, allowed_types):
"""Parse the matcher out of the given declaration and comment.
@@ -139,6 +153,9 @@ def act_on_decl(declaration, comment, allowed_types):
definition.
"""
if declaration.strip():
+
+ if re.match(r'^\s?(#|namespace|using)', declaration): return
+
# Node matchers are defined by writing:
# VariadicDynCastAllOfMatcher name;
m = re.match(r""".*Variadic(?:DynCast)?AllOfMatcher\s*<
@@ -213,6 +230,28 @@ def act_on_decl(declaration, comment, allowed_types):
add_matcher(result_type, name, args, comment)
return
+ m = re.match(r"""^\s*AST_POLYMORPHIC_MATCHER_REGEX(?:_OVERLOAD)?\(
+ \s*([^\s,]+)\s*,
+ \s*AST_POLYMORPHIC_SUPPORTED_TYPES\(([^)]*)\),
+ \s*([^\s,]+)\s*
+ (?:,\s*\d+\s*)?
+ \)\s*{\s*$""", declaration, flags=re.X)
+
+ if m:
+ name, results, arg_name = m.groups()[0:3]
+ result_types = [r.strip() for r in results.split(',')]
+ if allowed_types and allowed_types != result_types:
+ raise Exception('Inconsistent documentation for: %s' % name)
+ arg = "StringRef %s, Regex::RegexFlags Flags = NoFlags" % arg_name
+ comment += """
+If the matcher is used in clang-query, RegexFlags parameter
+should be passed as a quoted string. e.g: "NoFlags".
+Flags can be combined with '|' example \"IgnoreCase | BasicRegex\"
+"""
+ for result_type in result_types:
+ add_matcher(result_type, name, arg, comment)
+ return
+
m = re.match(r"""^\s*AST_MATCHER_FUNCTION(_P)?(.?)(?:_OVERLOAD)?\(
(?:\s*([^\s,]+)\s*,)?
\s*([^\s,]+)\s*
@@ -258,6 +297,31 @@ def act_on_decl(declaration, comment, allowed_types):
add_matcher(result_type, name, args, comment)
return
+ m = re.match(r"""^\s*AST_MATCHER_REGEX(?:_OVERLOAD)?\(
+ \s*([^\s,]+)\s*,
+ \s*([^\s,]+)\s*,
+ \s*([^\s,]+)\s*
+ (?:,\s*\d+\s*)?
+ \)\s*{""", declaration, flags=re.X)
+ if m:
+ result, name, arg_name = m.groups()[0:3]
+ if not result:
+ if not allowed_types:
+ raise Exception('Did not find allowed result types for: %s' % name)
+ result_types = allowed_types
+ else:
+ result_types = [result]
+ arg = "StringRef %s, Regex::RegexFlags Flags = NoFlags" % arg_name
+ comment += """
+If the matcher is used in clang-query, RegexFlags parameter
+should be passed as a quoted string. e.g: "NoFlags".
+Flags can be combined with '|' example \"IgnoreCase | BasicRegex\"
+"""
+
+ for result_type in result_types:
+ add_matcher(result_type, name, arg, comment)
+ return
+
# Parse ArgumentAdapting matchers.
m = re.match(
r"""^.*ArgumentAdaptingMatcherFunc<.*>\s*
@@ -278,6 +342,22 @@ def act_on_decl(declaration, comment, allowed_types):
add_matcher(result, name, '%s, ..., %s' % (arg, arg), comment)
return
+ m = re.match(
+ r"""^.*internal::VariadicFunction\s*<\s*
+ internal::PolymorphicMatcherWithParam1<[\S\s]+
+ AST_POLYMORPHIC_SUPPORTED_TYPES\(([^)]*)\)>,\s*([^,]+),
+ \s*[^>]+>\s*([a-zA-Z]*);$""",
+ declaration, flags=re.X)
+
+ if m:
+ results, arg, name = m.groups()[:3]
+
+ result_types = [r.strip() for r in results.split(',')]
+ for result_type in result_types:
+ add_matcher(result_type, name, '%s, ..., %s' % (arg, arg), comment)
+ return
+
+
# Parse Variadic operator matchers.
m = re.match(
r"""^.*VariadicOperatorMatcherFunc\s*<\s*([^,]+),\s*([^\s]+)\s*>\s*
@@ -295,16 +375,27 @@ def act_on_decl(declaration, comment, allowed_types):
# Parse free standing matcher functions, like:
# Matcher Name(Matcher InnerMatcher) {
- m = re.match(r"""^\s*(.*)\s+
+ m = re.match(r"""^\s*(?:template\s+<\s*(?:class|typename)\s+(.+)\s*>\s+)?
+ (.*)\s+
([^\s\(]+)\s*\(
(.*)
\)\s*{""", declaration, re.X)
if m:
- result, name, args = m.groups()
+ template_name, result, name, args = m.groups()
+ if template_name:
+ matcherTemplateArgs = re.findall(r'Matcher<\s*(%s)\s*>' % template_name, args)
+ templateArgs = re.findall(r'(?:^|[\s,<])(%s)(?:$|[\s,>])' % template_name, args)
+ if len(matcherTemplateArgs) < len(templateArgs):
+ # The template name is used naked, so don't replace with `*`` later on
+ template_name = None
+ else :
+ args = re.sub(r'(^|[\s,<])%s($|[\s,>])' % template_name, r'\1*\2', args)
args = ', '.join(p.strip() for p in args.split(','))
- m = re.match(r'.*\s+internal::(Bindable)?Matcher<([^>]+)>$', result)
+ m = re.match(r'(?:^|.*\s+)internal::(?:Bindable)?Matcher<([^>]+)>$', result)
if m:
- result_types = [m.group(2)]
+ result_types = [m.group(1)]
+ if template_name and len(result_types) is 1 and result_types[0] == template_name:
+ result_types = ['*']
else:
result_types = extract_result_types(comment)
if not result_types:
diff --git a/gnu/llvm/clang/docs/tools/dump_format_style.py b/gnu/llvm/clang/docs/tools/dump_format_style.py
index acb0dfcaf4a..61167979b3e 100755
--- a/gnu/llvm/clang/docs/tools/dump_format_style.py
+++ b/gnu/llvm/clang/docs/tools/dump_format_style.py
@@ -225,4 +225,4 @@ contents = open(DOC_FILE).read()
contents = substitute(contents, 'FORMAT_STYLE_OPTIONS', options_text)
with open(DOC_FILE, 'wb') as output:
- output.write(contents)
+ output.write(contents.encode())
diff --git a/gnu/llvm/clang/docs/tools/generate_formatted_state.py b/gnu/llvm/clang/docs/tools/generate_formatted_state.py
new file mode 100755
index 00000000000..41d5cd9d400
--- /dev/null
+++ b/gnu/llvm/clang/docs/tools/generate_formatted_state.py
@@ -0,0 +1,156 @@
+#!/usr/bin/env python
+# A tool to parse creates a document outlining how clang formatted the
+# LLVM project is.
+
+import sys
+import os
+import subprocess
+from datetime import datetime
+
+
+def get_git_revision_short_hash():
+ return subprocess.check_output(['git', 'rev-parse', '--short', 'HEAD']
+ ).decode(sys.stdout.encoding).strip()
+
+
+def get_style(count, passed):
+ if passed == count:
+ return ":good:"
+ elif passed != 0:
+ return ":part:"
+ else:
+ return ":none:"
+
+
+TOP_DIR = os.path.join(os.path.dirname(__file__), '../../..')
+CLANG_DIR = os.path.join(os.path.dirname(__file__), '../..')
+DOC_FILE = os.path.join(CLANG_DIR, 'docs/ClangFormattedStatus.rst')
+
+rootdir = TOP_DIR
+
+skipped_dirs = [".git", "test"]
+suffixes = (".cpp", ".h")
+
+rst_prefix = """\
+.. raw:: html
+
+
+
+.. role:: none
+.. role:: part
+.. role:: good
+.. role:: total
+
+======================
+Clang Formatted Status
+======================
+
+:doc:`ClangFormattedStatus` describes the state of LLVM source
+tree in terms of conformance to :doc:`ClangFormat` as of: {today} (`{sha} `_).
+
+
+.. list-table:: LLVM Clang-Format Status
+ :widths: 50 25 25 25 25
+ :header-rows: 1\n
+ * - Directory
+ - Total Files
+ - Formatted Files
+ - Unformatted Files
+ - % Complete
+"""
+
+table_row = """\
+ * - {path}
+ - {style}`{count}`
+ - {style}`{passes}`
+ - {style}`{fails}`
+ - {style2}`{percent}%`
+"""
+
+FNULL = open(os.devnull, 'w')
+
+with open(DOC_FILE, 'wb') as output:
+ sha = get_git_revision_short_hash()
+ today = datetime.now().strftime("%B %d, %Y %H:%M:%S")
+ output.write(bytes(rst_prefix.format(today=today,
+ sha=sha).encode("utf-8")))
+
+ total_files_count = 0
+ total_files_pass = 0
+ total_files_fail = 0
+ for root, subdirs, files in os.walk(rootdir):
+ for subdir in subdirs:
+ if any(sd == subdir for sd in skipped_dirs):
+ subdirs.remove(subdir)
+ else:
+ act_sub_dir = os.path.join(root, subdir)
+ # Check the git index to see if the directory contains tracked
+ # files. Reditect the output to a null descriptor as we aren't
+ # interested in it, just the return code.
+ git_check = subprocess.Popen(
+ ["git", "ls-files", "--error-unmatch", act_sub_dir],
+ stdout=FNULL,
+ stderr=FNULL)
+ if git_check.wait() != 0:
+ print("Skipping directory: ", act_sub_dir)
+ subdirs.remove(subdir)
+
+ path = os.path.relpath(root, TOP_DIR)
+ path = path.replace('\\', '/')
+
+ file_count = 0
+ file_pass = 0
+ file_fail = 0
+ for filename in files:
+ file_path = os.path.join(root, filename)
+ ext = os.path.splitext(file_path)[-1].lower()
+ if not ext.endswith(suffixes):
+ continue
+
+ file_count += 1
+
+ args = ["clang-format", "-n", file_path]
+ cmd = subprocess.Popen(args, stderr=subprocess.PIPE)
+ stdout, err = cmd.communicate()
+
+ relpath = os.path.relpath(file_path, TOP_DIR)
+ relpath = relpath.replace('\\', '/')
+ if err.decode(sys.stdout.encoding).find(': warning:') > 0:
+ print(relpath, ":", "FAIL")
+ file_fail += 1
+ else:
+ print(relpath, ":", "PASS")
+ file_pass += 1
+
+ total_files_count += file_count
+ total_files_pass += file_pass
+ total_files_fail += file_fail
+
+ if file_count > 0:
+ percent = (int(100.0 * (float(file_pass)/float(file_count))))
+ style = get_style(file_count, file_pass)
+ output.write(bytes(table_row.format(path=path,
+ count=file_count,
+ passes=file_pass,
+ fails=file_fail,
+ percent=str(percent), style="",
+ style2=style).encode("utf-8")))
+ output.flush()
+
+ print("----\n")
+ print(path, file_count, file_pass, file_fail, percent)
+ print("----\n")
+
+ total_percent = (float(total_files_pass)/float(total_files_count))
+ percent_str = str(int(100.0 * total_percent))
+ output.write(bytes(table_row.format(path="Total",
+ count=total_files_count,
+ passes=total_files_pass,
+ fails=total_files_fail,
+ percent=percent_str, style=":total:",
+ style2=":total:").encode("utf-8")))
diff --git a/gnu/llvm/clang/examples/Attribute/Attribute.cpp b/gnu/llvm/clang/examples/Attribute/Attribute.cpp
new file mode 100644
index 00000000000..998f175dae5
--- /dev/null
+++ b/gnu/llvm/clang/examples/Attribute/Attribute.cpp
@@ -0,0 +1,81 @@
+//===- Attribute.cpp ------------------------------------------------------===//
+//
+// 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
+//
+//===----------------------------------------------------------------------===//
+//
+// Example clang plugin which adds an an annotation to file-scope declarations
+// with the 'example' attribute.
+//
+//===----------------------------------------------------------------------===//
+
+#include "clang/AST/ASTContext.h"
+#include "clang/AST/Attr.h"
+#include "clang/Sema/ParsedAttr.h"
+#include "clang/Sema/Sema.h"
+#include "clang/Sema/SemaDiagnostic.h"
+#include "llvm/IR/Attributes.h"
+using namespace clang;
+
+namespace {
+
+struct ExampleAttrInfo : public ParsedAttrInfo {
+ ExampleAttrInfo() {
+ // Can take an optional string argument (the check that the argument
+ // actually is a string happens in handleDeclAttribute).
+ OptArgs = 1;
+ // GNU-style __attribute__(("example")) and C++-style [[example]] and
+ // [[plugin::example]] supported.
+ static constexpr Spelling S[] = {{ParsedAttr::AS_GNU, "example"},
+ {ParsedAttr::AS_CXX11, "example"},
+ {ParsedAttr::AS_CXX11, "plugin::example"}};
+ Spellings = S;
+ }
+
+ bool diagAppertainsToDecl(Sema &S, const ParsedAttr &Attr,
+ const Decl *D) const override {
+ // This attribute appertains to functions only.
+ if (!isa(D)) {
+ S.Diag(Attr.getLoc(), diag::warn_attribute_wrong_decl_type_str)
+ << Attr << "functions";
+ return false;
+ }
+ return true;
+ }
+
+ AttrHandling handleDeclAttribute(Sema &S, Decl *D,
+ const ParsedAttr &Attr) const override {
+ // Check if the decl is at file scope.
+ if (!D->getDeclContext()->isFileContext()) {
+ unsigned ID = S.getDiagnostics().getCustomDiagID(
+ DiagnosticsEngine::Error,
+ "'example' attribute only allowed at file scope");
+ S.Diag(Attr.getLoc(), ID);
+ return AttributeNotApplied;
+ }
+ // Check if we have an optional string argument.
+ StringRef Str = "";
+ if (Attr.getNumArgs() > 0) {
+ Expr *ArgExpr = Attr.getArgAsExpr(0);
+ StringLiteral *Literal =
+ dyn_cast(ArgExpr->IgnoreParenCasts());
+ if (Literal) {
+ Str = Literal->getString();
+ } else {
+ S.Diag(ArgExpr->getExprLoc(), diag::err_attribute_argument_type)
+ << Attr.getAttrName() << AANT_ArgumentString;
+ return AttributeNotApplied;
+ }
+ }
+ // Attach an annotate attribute to the Decl.
+ D->addAttr(AnnotateAttr::Create(S.Context, "example(" + Str.str() + ")",
+ Attr.getRange()));
+ return AttributeApplied;
+ }
+};
+
+} // namespace
+
+static ParsedAttrInfoRegistry::Add X("example", "");
diff --git a/gnu/llvm/clang/examples/Attribute/CMakeLists.txt b/gnu/llvm/clang/examples/Attribute/CMakeLists.txt
new file mode 100644
index 00000000000..42f04f5039b
--- /dev/null
+++ b/gnu/llvm/clang/examples/Attribute/CMakeLists.txt
@@ -0,0 +1,11 @@
+add_llvm_library(Attribute MODULE Attribute.cpp PLUGIN_TOOL clang)
+
+if(LLVM_ENABLE_PLUGINS AND (WIN32 OR CYGWIN))
+ target_link_libraries(Attribute PRIVATE
+ clangAST
+ clangBasic
+ clangFrontend
+ clangLex
+ LLVMSupport
+ )
+endif()
diff --git a/gnu/llvm/clang/examples/CMakeLists.txt b/gnu/llvm/clang/examples/CMakeLists.txt
index e4fedf3682e..c014b3ddfe9 100644
--- a/gnu/llvm/clang/examples/CMakeLists.txt
+++ b/gnu/llvm/clang/examples/CMakeLists.txt
@@ -6,3 +6,4 @@ endif()
add_subdirectory(clang-interpreter)
add_subdirectory(PrintFunctionNames)
add_subdirectory(AnnotateFunctions)
+add_subdirectory(Attribute)
diff --git a/gnu/llvm/clang/examples/clang-interpreter/main.cpp b/gnu/llvm/clang/examples/clang-interpreter/main.cpp
index c0aae472230..6b4cdca15fb 100644
--- a/gnu/llvm/clang/examples/clang-interpreter/main.cpp
+++ b/gnu/llvm/clang/examples/clang-interpreter/main.cpp
@@ -54,7 +54,7 @@ private:
std::unique_ptr TM;
const DataLayout DL;
MangleAndInterner Mangle{ES, DL};
- JITDylib &MainJD{ES.createJITDylib("")};
+ JITDylib &MainJD{ES.createBareJITDylib("")};
RTDyldObjectLinkingLayer ObjectLayer{ES, createMemMgr};
IRCompileLayer CompileLayer{ES, ObjectLayer,
std::make_unique(*TM)};
diff --git a/gnu/llvm/clang/include/clang-c/BuildSystem.h b/gnu/llvm/clang/include/clang-c/BuildSystem.h
index 4e9f6dee027..296e61247ce 100644
--- a/gnu/llvm/clang/include/clang-c/BuildSystem.h
+++ b/gnu/llvm/clang/include/clang-c/BuildSystem.h
@@ -117,7 +117,7 @@ clang_ModuleMapDescriptor_setFrameworkModuleName(CXModuleMapDescriptor,
const char *name);
/**
- * Sets the umbrealla header name that the module.map describes.
+ * Sets the umbrella header name that the module.map describes.
* \returns 0 for success, non-zero to indicate an error.
*/
CINDEX_LINKAGE enum CXErrorCode
diff --git a/gnu/llvm/clang/include/clang-c/Index.h b/gnu/llvm/clang/include/clang-c/Index.h
index b653995ebbd..9f5a727c84b 100644
--- a/gnu/llvm/clang/include/clang-c/Index.h
+++ b/gnu/llvm/clang/include/clang-c/Index.h
@@ -33,24 +33,19 @@
* compatible, thus CINDEX_VERSION_MAJOR is expected to remain stable.
*/
#define CINDEX_VERSION_MAJOR 0
-#define CINDEX_VERSION_MINOR 59
+#define CINDEX_VERSION_MINOR 61
-#define CINDEX_VERSION_ENCODE(major, minor) ( \
- ((major) * 10000) \
- + ((minor) * 1))
+#define CINDEX_VERSION_ENCODE(major, minor) (((major)*10000) + ((minor)*1))
-#define CINDEX_VERSION CINDEX_VERSION_ENCODE( \
- CINDEX_VERSION_MAJOR, \
- CINDEX_VERSION_MINOR )
+#define CINDEX_VERSION \
+ CINDEX_VERSION_ENCODE(CINDEX_VERSION_MAJOR, CINDEX_VERSION_MINOR)
-#define CINDEX_VERSION_STRINGIZE_(major, minor) \
- #major"."#minor
-#define CINDEX_VERSION_STRINGIZE(major, minor) \
- CINDEX_VERSION_STRINGIZE_(major, minor)
+#define CINDEX_VERSION_STRINGIZE_(major, minor) #major "." #minor
+#define CINDEX_VERSION_STRINGIZE(major, minor) \
+ CINDEX_VERSION_STRINGIZE_(major, minor)
-#define CINDEX_VERSION_STRING CINDEX_VERSION_STRINGIZE( \
- CINDEX_VERSION_MAJOR, \
- CINDEX_VERSION_MINOR)
+#define CINDEX_VERSION_STRING \
+ CINDEX_VERSION_STRINGIZE(CINDEX_VERSION_MAJOR, CINDEX_VERSION_MINOR)
LLVM_CLANG_C_EXTERN_C_BEGIN
@@ -382,7 +377,7 @@ typedef struct {
* \param outID stores the returned CXFileUniqueID.
* \returns If there was a failure getting the unique ID, returns non-zero,
* otherwise returns 0.
-*/
+ */
CINDEX_LINKAGE int clang_getFileUniqueID(CXFile file, CXFileUniqueID *outID);
/**
@@ -390,8 +385,8 @@ CINDEX_LINKAGE int clang_getFileUniqueID(CXFile file, CXFileUniqueID *outID);
* multiple inclusions, either with the conventional
* \#ifndef/\#define/\#endif macro guards or with \#pragma once.
*/
-CINDEX_LINKAGE unsigned
-clang_isFileMultipleIncludeGuarded(CXTranslationUnit tu, CXFile file);
+CINDEX_LINKAGE unsigned clang_isFileMultipleIncludeGuarded(CXTranslationUnit tu,
+ CXFile file);
/**
* Retrieve a file handle within the given translation unit.
@@ -496,8 +491,7 @@ CINDEX_LINKAGE unsigned clang_equalLocations(CXSourceLocation loc1,
* in a particular translation unit.
*/
CINDEX_LINKAGE CXSourceLocation clang_getLocation(CXTranslationUnit tu,
- CXFile file,
- unsigned line,
+ CXFile file, unsigned line,
unsigned column);
/**
* Retrieves the source location associated with a given character offset
@@ -566,8 +560,7 @@ CINDEX_LINKAGE int clang_Range_isNull(CXSourceRange range);
* buffer to which the given source location points.
*/
CINDEX_LINKAGE void clang_getExpansionLocation(CXSourceLocation location,
- CXFile *file,
- unsigned *line,
+ CXFile *file, unsigned *line,
unsigned *column,
unsigned *offset);
@@ -613,8 +606,7 @@ CINDEX_LINKAGE void clang_getExpansionLocation(CXSourceLocation location,
*/
CINDEX_LINKAGE void clang_getPresumedLocation(CXSourceLocation location,
CXString *filename,
- unsigned *line,
- unsigned *column);
+ unsigned *line, unsigned *column);
/**
* Legacy API to retrieve the file, line, column, and offset represented
@@ -625,8 +617,7 @@ CINDEX_LINKAGE void clang_getPresumedLocation(CXSourceLocation location,
* details.
*/
CINDEX_LINKAGE void clang_getInstantiationLocation(CXSourceLocation location,
- CXFile *file,
- unsigned *line,
+ CXFile *file, unsigned *line,
unsigned *column,
unsigned *offset);
@@ -653,8 +644,7 @@ CINDEX_LINKAGE void clang_getInstantiationLocation(CXSourceLocation location,
* buffer to which the given source location points.
*/
CINDEX_LINKAGE void clang_getSpellingLocation(CXSourceLocation location,
- CXFile *file,
- unsigned *line,
+ CXFile *file, unsigned *line,
unsigned *column,
unsigned *offset);
@@ -682,10 +672,8 @@ CINDEX_LINKAGE void clang_getSpellingLocation(CXSourceLocation location,
* buffer to which the given source location points.
*/
CINDEX_LINKAGE void clang_getFileLocation(CXSourceLocation location,
- CXFile *file,
- unsigned *line,
- unsigned *column,
- unsigned *offset);
+ CXFile *file, unsigned *line,
+ unsigned *column, unsigned *offset);
/**
* Retrieve a source location representing the first character within a
@@ -727,7 +715,8 @@ CINDEX_LINKAGE CXSourceRangeList *clang_getSkippedRanges(CXTranslationUnit tu,
* The preprocessor will skip lines when they are surrounded by an
* if/ifdef/ifndef directive whose condition does not evaluate to true.
*/
-CINDEX_LINKAGE CXSourceRangeList *clang_getAllSkippedRanges(CXTranslationUnit tu);
+CINDEX_LINKAGE CXSourceRangeList *
+clang_getAllSkippedRanges(CXTranslationUnit tu);
/**
* Destroy the given \c CXSourceRangeList.
@@ -758,7 +747,7 @@ enum CXDiagnosticSeverity {
* This diagnostic is a note that should be attached to the
* previous (non-note) diagnostic.
*/
- CXDiagnostic_Note = 1,
+ CXDiagnostic_Note = 1,
/**
* This diagnostic indicates suspicious code that may not be
@@ -769,14 +758,14 @@ enum CXDiagnosticSeverity {
/**
* This diagnostic indicates that the code is ill-formed.
*/
- CXDiagnostic_Error = 3,
+ CXDiagnostic_Error = 3,
/**
* This diagnostic indicates that the code is ill-formed such
* that future parser recovery is unlikely to produce useful
* results.
*/
- CXDiagnostic_Fatal = 4
+ CXDiagnostic_Fatal = 4
};
/**
@@ -849,9 +838,8 @@ enum CXLoadDiag_Error {
* \returns A loaded CXDiagnosticSet if successful, and NULL otherwise. These
* diagnostics should be released using clang_disposeDiagnosticSet().
*/
-CINDEX_LINKAGE CXDiagnosticSet clang_loadDiagnostics(const char *file,
- enum CXLoadDiag_Error *error,
- CXString *errorString);
+CINDEX_LINKAGE CXDiagnosticSet clang_loadDiagnostics(
+ const char *file, enum CXLoadDiag_Error *error, CXString *errorString);
/**
* Release a CXDiagnosticSet and all of its contained diagnostics.
@@ -891,7 +879,7 @@ CINDEX_LINKAGE CXDiagnostic clang_getDiagnostic(CXTranslationUnit Unit,
* \param Unit the translation unit to query.
*/
CINDEX_LINKAGE CXDiagnosticSet
- clang_getDiagnosticSetFromTU(CXTranslationUnit Unit);
+clang_getDiagnosticSetFromTU(CXTranslationUnit Unit);
/**
* Destroy a diagnostic.
@@ -997,7 +985,7 @@ CINDEX_LINKAGE unsigned clang_defaultDiagnosticDisplayOptions(void);
* Determine the severity of the given diagnostic.
*/
CINDEX_LINKAGE enum CXDiagnosticSeverity
-clang_getDiagnosticSeverity(CXDiagnostic);
+ clang_getDiagnosticSeverity(CXDiagnostic);
/**
* Retrieve the source location of the given diagnostic.
@@ -1049,8 +1037,8 @@ CINDEX_LINKAGE unsigned clang_getDiagnosticCategory(CXDiagnostic);
*
* \returns The name of the given diagnostic category.
*/
-CINDEX_DEPRECATED CINDEX_LINKAGE
-CXString clang_getDiagnosticCategoryName(unsigned Category);
+CINDEX_DEPRECATED CINDEX_LINKAGE CXString
+clang_getDiagnosticCategoryName(unsigned Category);
/**
* Retrieve the diagnostic category text for a given diagnostic.
@@ -1112,9 +1100,8 @@ CINDEX_LINKAGE unsigned clang_getDiagnosticNumFixIts(CXDiagnostic Diagnostic);
* \returns A string containing text that should be replace the source
* code indicated by the \c ReplacementRange.
*/
-CINDEX_LINKAGE CXString clang_getDiagnosticFixIt(CXDiagnostic Diagnostic,
- unsigned FixIt,
- CXSourceRange *ReplacementRange);
+CINDEX_LINKAGE CXString clang_getDiagnosticFixIt(
+ CXDiagnostic Diagnostic, unsigned FixIt, CXSourceRange *ReplacementRange);
/**
* @}
@@ -1177,12 +1164,9 @@ clang_getTranslationUnitSpelling(CXTranslationUnit CTUnit);
* guarantee their validity until the call to this function returns.
*/
CINDEX_LINKAGE CXTranslationUnit clang_createTranslationUnitFromSourceFile(
- CXIndex CIdx,
- const char *source_filename,
- int num_clang_command_line_args,
- const char * const *clang_command_line_args,
- unsigned num_unsaved_files,
- struct CXUnsavedFile *unsaved_files);
+ CXIndex CIdx, const char *source_filename, int num_clang_command_line_args,
+ const char *const *clang_command_line_args, unsigned num_unsaved_files,
+ struct CXUnsavedFile *unsaved_files);
/**
* Same as \c clang_createTranslationUnit2, but returns
@@ -1190,9 +1174,8 @@ CINDEX_LINKAGE CXTranslationUnit clang_createTranslationUnitFromSourceFile(
* routine returns a \c NULL \c CXTranslationUnit, without further detailed
* error codes.
*/
-CINDEX_LINKAGE CXTranslationUnit clang_createTranslationUnit(
- CXIndex CIdx,
- const char *ast_filename);
+CINDEX_LINKAGE CXTranslationUnit
+clang_createTranslationUnit(CXIndex CIdx, const char *ast_filename);
/**
* Create a translation unit from an AST file (\c -emit-ast).
@@ -1202,10 +1185,9 @@ CINDEX_LINKAGE CXTranslationUnit clang_createTranslationUnit(
*
* \returns Zero on success, otherwise returns an error code.
*/
-CINDEX_LINKAGE enum CXErrorCode clang_createTranslationUnit2(
- CXIndex CIdx,
- const char *ast_filename,
- CXTranslationUnit *out_TU);
+CINDEX_LINKAGE enum CXErrorCode
+clang_createTranslationUnit2(CXIndex CIdx, const char *ast_filename,
+ CXTranslationUnit *out_TU);
/**
* Flags that control the creation of translation units.
@@ -1383,14 +1365,11 @@ CINDEX_LINKAGE unsigned clang_defaultEditingTranslationUnitOptions(void);
* routine returns a \c NULL \c CXTranslationUnit, without further detailed
* error codes.
*/
-CINDEX_LINKAGE CXTranslationUnit
-clang_parseTranslationUnit(CXIndex CIdx,
- const char *source_filename,
- const char *const *command_line_args,
- int num_command_line_args,
- struct CXUnsavedFile *unsaved_files,
- unsigned num_unsaved_files,
- unsigned options);
+CINDEX_LINKAGE CXTranslationUnit clang_parseTranslationUnit(
+ CXIndex CIdx, const char *source_filename,
+ const char *const *command_line_args, int num_command_line_args,
+ struct CXUnsavedFile *unsaved_files, unsigned num_unsaved_files,
+ unsigned options);
/**
* Parse the given source file and the translation unit corresponding
@@ -1436,15 +1415,11 @@ clang_parseTranslationUnit(CXIndex CIdx,
*
* \returns Zero on success, otherwise returns an error code.
*/
-CINDEX_LINKAGE enum CXErrorCode
-clang_parseTranslationUnit2(CXIndex CIdx,
- const char *source_filename,
- const char *const *command_line_args,
- int num_command_line_args,
- struct CXUnsavedFile *unsaved_files,
- unsigned num_unsaved_files,
- unsigned options,
- CXTranslationUnit *out_TU);
+CINDEX_LINKAGE enum CXErrorCode clang_parseTranslationUnit2(
+ CXIndex CIdx, const char *source_filename,
+ const char *const *command_line_args, int num_command_line_args,
+ struct CXUnsavedFile *unsaved_files, unsigned num_unsaved_files,
+ unsigned options, CXTranslationUnit *out_TU);
/**
* Same as clang_parseTranslationUnit2 but requires a full command line
@@ -1623,14 +1598,14 @@ CINDEX_LINKAGE unsigned clang_defaultReparseOptions(CXTranslationUnit TU);
* \c clang_disposeTranslationUnit(TU). The error codes returned by this
* routine are described by the \c CXErrorCode enum.
*/
-CINDEX_LINKAGE int clang_reparseTranslationUnit(CXTranslationUnit TU,
- unsigned num_unsaved_files,
- struct CXUnsavedFile *unsaved_files,
- unsigned options);
+CINDEX_LINKAGE int
+clang_reparseTranslationUnit(CXTranslationUnit TU, unsigned num_unsaved_files,
+ struct CXUnsavedFile *unsaved_files,
+ unsigned options);
/**
- * Categorizes how memory is being used by a translation unit.
- */
+ * Categorizes how memory is being used by a translation unit.
+ */
enum CXTUResourceUsageKind {
CXTUResourceUsage_AST = 1,
CXTUResourceUsage_Identifiers = 2,
@@ -1648,16 +1623,16 @@ enum CXTUResourceUsageKind {
CXTUResourceUsage_Preprocessor_HeaderSearch = 14,
CXTUResourceUsage_MEMORY_IN_BYTES_BEGIN = CXTUResourceUsage_AST,
CXTUResourceUsage_MEMORY_IN_BYTES_END =
- CXTUResourceUsage_Preprocessor_HeaderSearch,
+ CXTUResourceUsage_Preprocessor_HeaderSearch,
CXTUResourceUsage_First = CXTUResourceUsage_AST,
CXTUResourceUsage_Last = CXTUResourceUsage_Preprocessor_HeaderSearch
};
/**
- * Returns the human-readable null-terminated C string that represents
- * the name of the memory category. This string should never be freed.
- */
+ * Returns the human-readable null-terminated C string that represents
+ * the name of the memory category. This string should never be freed.
+ */
CINDEX_LINKAGE
const char *clang_getTUResourceUsageName(enum CXTUResourceUsageKind kind);
@@ -1670,8 +1645,8 @@ typedef struct CXTUResourceUsageEntry {
} CXTUResourceUsageEntry;
/**
- * The memory usage of a CXTranslationUnit, broken into categories.
- */
+ * The memory usage of a CXTranslationUnit, broken into categories.
+ */
typedef struct CXTUResourceUsage {
/* Private data member, used for queries. */
void *data;
@@ -1686,10 +1661,11 @@ typedef struct CXTUResourceUsage {
} CXTUResourceUsage;
/**
- * Return the memory usage of a translation unit. This object
- * should be released with clang_disposeCXTUResourceUsage().
- */
-CINDEX_LINKAGE CXTUResourceUsage clang_getCXTUResourceUsage(CXTranslationUnit TU);
+ * Return the memory usage of a translation unit. This object
+ * should be released with clang_disposeCXTUResourceUsage().
+ */
+CINDEX_LINKAGE CXTUResourceUsage
+clang_getCXTUResourceUsage(CXTranslationUnit TU);
CINDEX_LINKAGE void clang_disposeCXTUResourceUsage(CXTUResourceUsage usage);
@@ -1704,24 +1680,21 @@ clang_getTranslationUnitTargetInfo(CXTranslationUnit CTUnit);
/**
* Destroy the CXTargetInfo object.
*/
-CINDEX_LINKAGE void
-clang_TargetInfo_dispose(CXTargetInfo Info);
+CINDEX_LINKAGE void clang_TargetInfo_dispose(CXTargetInfo Info);
/**
* Get the normalized target triple as a string.
*
* Returns the empty string in case of any error.
*/
-CINDEX_LINKAGE CXString
-clang_TargetInfo_getTriple(CXTargetInfo Info);
+CINDEX_LINKAGE CXString clang_TargetInfo_getTriple(CXTargetInfo Info);
/**
* Get the pointer width of the target in bits.
*
* Returns -1 in case of error.
*/
-CINDEX_LINKAGE int
-clang_TargetInfo_getPointerWidth(CXTargetInfo Info);
+CINDEX_LINKAGE int clang_TargetInfo_getPointerWidth(CXTargetInfo Info);
/**
* @}
@@ -1741,95 +1714,95 @@ enum CXCursorKind {
* spelling, find their definitions, etc. However, the specific kind
* of the declaration is not reported.
*/
- CXCursor_UnexposedDecl = 1,
+ CXCursor_UnexposedDecl = 1,
/** A C or C++ struct. */
- CXCursor_StructDecl = 2,
+ CXCursor_StructDecl = 2,
/** A C or C++ union. */
- CXCursor_UnionDecl = 3,
+ CXCursor_UnionDecl = 3,
/** A C++ class. */
- CXCursor_ClassDecl = 4,
+ CXCursor_ClassDecl = 4,
/** An enumeration. */
- CXCursor_EnumDecl = 5,
+ CXCursor_EnumDecl = 5,
/**
* A field (in C) or non-static data member (in C++) in a
* struct, union, or C++ class.
*/
- CXCursor_FieldDecl = 6,
+ CXCursor_FieldDecl = 6,
/** An enumerator constant. */
- CXCursor_EnumConstantDecl = 7,
+ CXCursor_EnumConstantDecl = 7,
/** A function. */
- CXCursor_FunctionDecl = 8,
+ CXCursor_FunctionDecl = 8,
/** A variable. */
- CXCursor_VarDecl = 9,
+ CXCursor_VarDecl = 9,
/** A function or method parameter. */
- CXCursor_ParmDecl = 10,
+ CXCursor_ParmDecl = 10,
/** An Objective-C \@interface. */
- CXCursor_ObjCInterfaceDecl = 11,
+ CXCursor_ObjCInterfaceDecl = 11,
/** An Objective-C \@interface for a category. */
- CXCursor_ObjCCategoryDecl = 12,
+ CXCursor_ObjCCategoryDecl = 12,
/** An Objective-C \@protocol declaration. */
- CXCursor_ObjCProtocolDecl = 13,
+ CXCursor_ObjCProtocolDecl = 13,
/** An Objective-C \@property declaration. */
- CXCursor_ObjCPropertyDecl = 14,
+ CXCursor_ObjCPropertyDecl = 14,
/** An Objective-C instance variable. */
- CXCursor_ObjCIvarDecl = 15,
+ CXCursor_ObjCIvarDecl = 15,
/** An Objective-C instance method. */
- CXCursor_ObjCInstanceMethodDecl = 16,
+ CXCursor_ObjCInstanceMethodDecl = 16,
/** An Objective-C class method. */
- CXCursor_ObjCClassMethodDecl = 17,
+ CXCursor_ObjCClassMethodDecl = 17,
/** An Objective-C \@implementation. */
- CXCursor_ObjCImplementationDecl = 18,
+ CXCursor_ObjCImplementationDecl = 18,
/** An Objective-C \@implementation for a category. */
- CXCursor_ObjCCategoryImplDecl = 19,
+ CXCursor_ObjCCategoryImplDecl = 19,
/** A typedef. */
- CXCursor_TypedefDecl = 20,
+ CXCursor_TypedefDecl = 20,
/** A C++ class method. */
- CXCursor_CXXMethod = 21,
+ CXCursor_CXXMethod = 21,
/** A C++ namespace. */
- CXCursor_Namespace = 22,
+ CXCursor_Namespace = 22,
/** A linkage specification, e.g. 'extern "C"'. */
- CXCursor_LinkageSpec = 23,
+ CXCursor_LinkageSpec = 23,
/** A C++ constructor. */
- CXCursor_Constructor = 24,
+ CXCursor_Constructor = 24,
/** A C++ destructor. */
- CXCursor_Destructor = 25,
+ CXCursor_Destructor = 25,
/** A C++ conversion function. */
- CXCursor_ConversionFunction = 26,
+ CXCursor_ConversionFunction = 26,
/** A C++ template type parameter. */
- CXCursor_TemplateTypeParameter = 27,
+ CXCursor_TemplateTypeParameter = 27,
/** A C++ non-type template parameter. */
- CXCursor_NonTypeTemplateParameter = 28,
+ CXCursor_NonTypeTemplateParameter = 28,
/** A C++ template template parameter. */
- CXCursor_TemplateTemplateParameter = 29,
+ CXCursor_TemplateTemplateParameter = 29,
/** A C++ function template. */
- CXCursor_FunctionTemplate = 30,
+ CXCursor_FunctionTemplate = 30,
/** A C++ class template. */
- CXCursor_ClassTemplate = 31,
+ CXCursor_ClassTemplate = 31,
/** A C++ class template partial specialization. */
CXCursor_ClassTemplatePartialSpecialization = 32,
/** A C++ namespace alias declaration. */
- CXCursor_NamespaceAlias = 33,
+ CXCursor_NamespaceAlias = 33,
/** A C++ using directive. */
- CXCursor_UsingDirective = 34,
+ CXCursor_UsingDirective = 34,
/** A C++ using declaration. */
- CXCursor_UsingDeclaration = 35,
+ CXCursor_UsingDeclaration = 35,
/** A C++ alias declaration */
- CXCursor_TypeAliasDecl = 36,
+ CXCursor_TypeAliasDecl = 36,
/** An Objective-C \@synthesize definition. */
- CXCursor_ObjCSynthesizeDecl = 37,
+ CXCursor_ObjCSynthesizeDecl = 37,
/** An Objective-C \@dynamic definition. */
- CXCursor_ObjCDynamicDecl = 38,
+ CXCursor_ObjCDynamicDecl = 38,
/** An access specifier. */
- CXCursor_CXXAccessSpecifier = 39,
+ CXCursor_CXXAccessSpecifier = 39,
- CXCursor_FirstDecl = CXCursor_UnexposedDecl,
- CXCursor_LastDecl = CXCursor_CXXAccessSpecifier,
+ CXCursor_FirstDecl = CXCursor_UnexposedDecl,
+ CXCursor_LastDecl = CXCursor_CXXAccessSpecifier,
/* References */
- CXCursor_FirstRef = 40, /* Decl references */
- CXCursor_ObjCSuperClassRef = 40,
- CXCursor_ObjCProtocolRef = 41,
- CXCursor_ObjCClassRef = 42,
+ CXCursor_FirstRef = 40, /* Decl references */
+ CXCursor_ObjCSuperClassRef = 40,
+ CXCursor_ObjCProtocolRef = 41,
+ CXCursor_ObjCClassRef = 42,
/**
* A reference to a type declaration.
*
@@ -1845,22 +1818,22 @@ enum CXCursorKind {
* while the type of the variable "size" is referenced. The cursor
* referenced by the type of size is the typedef for size_type.
*/
- CXCursor_TypeRef = 43,
- CXCursor_CXXBaseSpecifier = 44,
+ CXCursor_TypeRef = 43,
+ CXCursor_CXXBaseSpecifier = 44,
/**
* A reference to a class template, function template, template
* template parameter, or class template partial specialization.
*/
- CXCursor_TemplateRef = 45,
+ CXCursor_TemplateRef = 45,
/**
* A reference to a namespace or namespace alias.
*/
- CXCursor_NamespaceRef = 46,
+ CXCursor_NamespaceRef = 46,
/**
* A reference to a member of a struct, union, or class that occurs in
* some non-expression context, e.g., a designated initializer.
*/
- CXCursor_MemberRef = 47,
+ CXCursor_MemberRef = 47,
/**
* A reference to a labeled statement.
*
@@ -1876,7 +1849,7 @@ enum CXCursorKind {
*
* A label reference cursor refers to a label statement.
*/
- CXCursor_LabelRef = 48,
+ CXCursor_LabelRef = 48,
/**
* A reference to a set of overloaded functions or function templates
@@ -1914,26 +1887,26 @@ enum CXCursorKind {
* \c clang_getOverloadedDecl() can be used to retrieve the definitions
* referenced by this cursor.
*/
- CXCursor_OverloadedDeclRef = 49,
+ CXCursor_OverloadedDeclRef = 49,
/**
* A reference to a variable that occurs in some non-expression
* context, e.g., a C++ lambda capture list.
*/
- CXCursor_VariableRef = 50,
+ CXCursor_VariableRef = 50,
- CXCursor_LastRef = CXCursor_VariableRef,
+ CXCursor_LastRef = CXCursor_VariableRef,
/* Error conditions */
- CXCursor_FirstInvalid = 70,
- CXCursor_InvalidFile = 70,
- CXCursor_NoDeclFound = 71,
- CXCursor_NotImplemented = 72,
- CXCursor_InvalidCode = 73,
- CXCursor_LastInvalid = CXCursor_InvalidCode,
+ CXCursor_FirstInvalid = 70,
+ CXCursor_InvalidFile = 70,
+ CXCursor_NoDeclFound = 71,
+ CXCursor_NotImplemented = 72,
+ CXCursor_InvalidCode = 73,
+ CXCursor_LastInvalid = CXCursor_InvalidCode,
/* Expressions */
- CXCursor_FirstExpr = 100,
+ CXCursor_FirstExpr = 100,
/**
* An expression whose specific kind is not exposed via this
@@ -1944,104 +1917,104 @@ enum CXCursorKind {
* spelling, children, etc. However, the specific kind of the
* expression is not reported.
*/
- CXCursor_UnexposedExpr = 100,
+ CXCursor_UnexposedExpr = 100,
/**
* An expression that refers to some value declaration, such
* as a function, variable, or enumerator.
*/
- CXCursor_DeclRefExpr = 101,
+ CXCursor_DeclRefExpr = 101,
/**
* An expression that refers to a member of a struct, union,
* class, Objective-C class, etc.
*/
- CXCursor_MemberRefExpr = 102,
+ CXCursor_MemberRefExpr = 102,
/** An expression that calls a function. */
- CXCursor_CallExpr = 103,
+ CXCursor_CallExpr = 103,
/** An expression that sends a message to an Objective-C
object or class. */
- CXCursor_ObjCMessageExpr = 104,
+ CXCursor_ObjCMessageExpr = 104,
/** An expression that represents a block literal. */
- CXCursor_BlockExpr = 105,
+ CXCursor_BlockExpr = 105,
/** An integer literal.
*/
- CXCursor_IntegerLiteral = 106,
+ CXCursor_IntegerLiteral = 106,
/** A floating point number literal.
*/
- CXCursor_FloatingLiteral = 107,
+ CXCursor_FloatingLiteral = 107,
/** An imaginary number literal.
*/
- CXCursor_ImaginaryLiteral = 108,
+ CXCursor_ImaginaryLiteral = 108,
/** A string literal.
*/
- CXCursor_StringLiteral = 109,
+ CXCursor_StringLiteral = 109,
/** A character literal.
*/
- CXCursor_CharacterLiteral = 110,
+ CXCursor_CharacterLiteral = 110,
/** A parenthesized expression, e.g. "(1)".
*
* This AST node is only formed if full location information is requested.
*/
- CXCursor_ParenExpr = 111,
+ CXCursor_ParenExpr = 111,
/** This represents the unary-expression's (except sizeof and
* alignof).
*/
- CXCursor_UnaryOperator = 112,
+ CXCursor_UnaryOperator = 112,
/** [C99 6.5.2.1] Array Subscripting.
*/
- CXCursor_ArraySubscriptExpr = 113,
+ CXCursor_ArraySubscriptExpr = 113,
/** A builtin binary operation expression such as "x + y" or
* "x <= y".
*/
- CXCursor_BinaryOperator = 114,
+ CXCursor_BinaryOperator = 114,
/** Compound assignment such as "+=".
*/
- CXCursor_CompoundAssignOperator = 115,
+ CXCursor_CompoundAssignOperator = 115,
/** The ?: ternary operator.
*/
- CXCursor_ConditionalOperator = 116,
+ CXCursor_ConditionalOperator = 116,
/** An explicit cast in C (C99 6.5.4) or a C-style cast in C++
* (C++ [expr.cast]), which uses the syntax (Type)expr.
*
* For example: (int)f.
*/
- CXCursor_CStyleCastExpr = 117,
+ CXCursor_CStyleCastExpr = 117,
/** [C99 6.5.2.5]
*/
- CXCursor_CompoundLiteralExpr = 118,
+ CXCursor_CompoundLiteralExpr = 118,
/** Describes an C or C++ initializer list.
*/
- CXCursor_InitListExpr = 119,
+ CXCursor_InitListExpr = 119,
/** The GNU address of label extension, representing &&label.
*/
- CXCursor_AddrLabelExpr = 120,
+ CXCursor_AddrLabelExpr = 120,
/** This is the GNU Statement Expression extension: ({int X=4; X;})
*/
- CXCursor_StmtExpr = 121,
+ CXCursor_StmtExpr = 121,
/** Represents a C11 generic selection.
*/
- CXCursor_GenericSelectionExpr = 122,
+ CXCursor_GenericSelectionExpr = 122,
/** Implements the GNU __null extension, which is a name for a null
* pointer constant that has integral type (e.g., int or long) and is the same
@@ -2051,23 +2024,23 @@ enum CXCursorKind {
* NULL as __null in C++ rather than using 0 (which is an integer that may not
* match the size of a pointer).
*/
- CXCursor_GNUNullExpr = 123,
+ CXCursor_GNUNullExpr = 123,
/** C++'s static_cast<> expression.
*/
- CXCursor_CXXStaticCastExpr = 124,
+ CXCursor_CXXStaticCastExpr = 124,
/** C++'s dynamic_cast<> expression.
*/
- CXCursor_CXXDynamicCastExpr = 125,
+ CXCursor_CXXDynamicCastExpr = 125,
/** C++'s reinterpret_cast<> expression.
*/
- CXCursor_CXXReinterpretCastExpr = 126,
+ CXCursor_CXXReinterpretCastExpr = 126,
/** C++'s const_cast<> expression.
*/
- CXCursor_CXXConstCastExpr = 127,
+ CXCursor_CXXConstCastExpr = 127,
/** Represents an explicit C++ type conversion that uses "functional"
* notion (C++ [expr.type.conv]).
@@ -2077,60 +2050,60 @@ enum CXCursorKind {
* x = int(0.5);
* \endcode
*/
- CXCursor_CXXFunctionalCastExpr = 128,
+ CXCursor_CXXFunctionalCastExpr = 128,
/** A C++ typeid expression (C++ [expr.typeid]).
*/
- CXCursor_CXXTypeidExpr = 129,
+ CXCursor_CXXTypeidExpr = 129,
/** [C++ 2.13.5] C++ Boolean Literal.
*/
- CXCursor_CXXBoolLiteralExpr = 130,
+ CXCursor_CXXBoolLiteralExpr = 130,
/** [C++0x 2.14.7] C++ Pointer Literal.
*/
- CXCursor_CXXNullPtrLiteralExpr = 131,
+ CXCursor_CXXNullPtrLiteralExpr = 131,
/** Represents the "this" expression in C++
*/
- CXCursor_CXXThisExpr = 132,
+ CXCursor_CXXThisExpr = 132,
/** [C++ 15] C++ Throw Expression.
*
* This handles 'throw' and 'throw' assignment-expression. When
* assignment-expression isn't present, Op will be null.
*/
- CXCursor_CXXThrowExpr = 133,
+ CXCursor_CXXThrowExpr = 133,
/** A new expression for memory allocation and constructor calls, e.g:
* "new CXXNewExpr(foo)".
*/
- CXCursor_CXXNewExpr = 134,
+ CXCursor_CXXNewExpr = 134,
/** A delete expression for memory deallocation and destructor calls,
* e.g. "delete[] pArray".
*/
- CXCursor_CXXDeleteExpr = 135,
+ CXCursor_CXXDeleteExpr = 135,
/** A unary expression. (noexcept, sizeof, or other traits)
*/
- CXCursor_UnaryExpr = 136,
+ CXCursor_UnaryExpr = 136,
/** An Objective-C string literal i.e. @"foo".
*/
- CXCursor_ObjCStringLiteral = 137,
+ CXCursor_ObjCStringLiteral = 137,
/** An Objective-C \@encode expression.
*/
- CXCursor_ObjCEncodeExpr = 138,
+ CXCursor_ObjCEncodeExpr = 138,
/** An Objective-C \@selector expression.
*/
- CXCursor_ObjCSelectorExpr = 139,
+ CXCursor_ObjCSelectorExpr = 139,
/** An Objective-C \@protocol expression.
*/
- CXCursor_ObjCProtocolExpr = 140,
+ CXCursor_ObjCProtocolExpr = 140,
/** An Objective-C "bridged" cast expression, which casts between
* Objective-C pointers and C pointers, transferring ownership in the process.
@@ -2139,7 +2112,7 @@ enum CXCursorKind {
* NSString *str = (__bridge_transfer NSString *)CFCreateString();
* \endcode
*/
- CXCursor_ObjCBridgedCastExpr = 141,
+ CXCursor_ObjCBridgedCastExpr = 141,
/** Represents a C++0x pack expansion that produces a sequence of
* expressions.
@@ -2154,7 +2127,7 @@ enum CXCursorKind {
* }
* \endcode
*/
- CXCursor_PackExpansionExpr = 142,
+ CXCursor_PackExpansionExpr = 142,
/** Represents an expression that computes the length of a parameter
* pack.
@@ -2166,7 +2139,7 @@ enum CXCursorKind {
* };
* \endcode
*/
- CXCursor_SizeOfPackExpr = 143,
+ CXCursor_SizeOfPackExpr = 143,
/* Represents a C++ lambda expression that produces a local function
* object.
@@ -2180,33 +2153,46 @@ enum CXCursorKind {
* }
* \endcode
*/
- CXCursor_LambdaExpr = 144,
+ CXCursor_LambdaExpr = 144,
/** Objective-c Boolean Literal.
*/
- CXCursor_ObjCBoolLiteralExpr = 145,
+ CXCursor_ObjCBoolLiteralExpr = 145,
/** Represents the "self" expression in an Objective-C method.
*/
- CXCursor_ObjCSelfExpr = 146,
+ CXCursor_ObjCSelfExpr = 146,
- /** OpenMP 4.0 [2.4, Array Section].
+ /** OpenMP 5.0 [2.1.5, Array Section].
*/
- CXCursor_OMPArraySectionExpr = 147,
+ CXCursor_OMPArraySectionExpr = 147,
/** Represents an @available(...) check.
*/
- CXCursor_ObjCAvailabilityCheckExpr = 148,
+ CXCursor_ObjCAvailabilityCheckExpr = 148,
/**
* Fixed point literal
*/
- CXCursor_FixedPointLiteral = 149,
+ CXCursor_FixedPointLiteral = 149,
+
+ /** OpenMP 5.0 [2.1.4, Array Shaping].
+ */
+ CXCursor_OMPArrayShapingExpr = 150,
+
+ /**
+ * OpenMP 5.0 [2.1.6 Iterators]
+ */
+ CXCursor_OMPIteratorExpr = 151,
+
+ /** OpenCL's addrspace_cast<> expression.
+ */
+ CXCursor_CXXAddrspaceCastExpr = 152,
- CXCursor_LastExpr = CXCursor_FixedPointLiteral,
+ CXCursor_LastExpr = CXCursor_CXXAddrspaceCastExpr,
/* Statements */
- CXCursor_FirstStmt = 200,
+ CXCursor_FirstStmt = 200,
/**
* A statement whose specific kind is not exposed via this
* interface.
@@ -2216,7 +2202,7 @@ enum CXCursorKind {
* children, etc. However, the specific kind of the statement is not
* reported.
*/
- CXCursor_UnexposedStmt = 200,
+ CXCursor_UnexposedStmt = 200,
/** A labelled statement in a function.
*
@@ -2229,226 +2215,226 @@ enum CXCursorKind {
* \endcode
*
*/
- CXCursor_LabelStmt = 201,
+ CXCursor_LabelStmt = 201,
/** A group of statements like { stmt stmt }.
*
* This cursor kind is used to describe compound statements, e.g. function
* bodies.
*/
- CXCursor_CompoundStmt = 202,
+ CXCursor_CompoundStmt = 202,
/** A case statement.
*/
- CXCursor_CaseStmt = 203,
+ CXCursor_CaseStmt = 203,
/** A default statement.
*/
- CXCursor_DefaultStmt = 204,
+ CXCursor_DefaultStmt = 204,
/** An if statement
*/
- CXCursor_IfStmt = 205,
+ CXCursor_IfStmt = 205,
/** A switch statement.
*/
- CXCursor_SwitchStmt = 206,
+ CXCursor_SwitchStmt = 206,
/** A while statement.
*/
- CXCursor_WhileStmt = 207,
+ CXCursor_WhileStmt = 207,
/** A do statement.
*/
- CXCursor_DoStmt = 208,
+ CXCursor_DoStmt = 208,
/** A for statement.
*/
- CXCursor_ForStmt = 209,
+ CXCursor_ForStmt = 209,
/** A goto statement.
*/
- CXCursor_GotoStmt = 210,
+ CXCursor_GotoStmt = 210,
/** An indirect goto statement.
*/
- CXCursor_IndirectGotoStmt = 211,
+ CXCursor_IndirectGotoStmt = 211,
/** A continue statement.
*/
- CXCursor_ContinueStmt = 212,
+ CXCursor_ContinueStmt = 212,
/** A break statement.
*/
- CXCursor_BreakStmt = 213,
+ CXCursor_BreakStmt = 213,
/** A return statement.
*/
- CXCursor_ReturnStmt = 214,
+ CXCursor_ReturnStmt = 214,
/** A GCC inline assembly statement extension.
*/
- CXCursor_GCCAsmStmt = 215,
- CXCursor_AsmStmt = CXCursor_GCCAsmStmt,
+ CXCursor_GCCAsmStmt = 215,
+ CXCursor_AsmStmt = CXCursor_GCCAsmStmt,
/** Objective-C's overall \@try-\@catch-\@finally statement.
*/
- CXCursor_ObjCAtTryStmt = 216,
+ CXCursor_ObjCAtTryStmt = 216,
/** Objective-C's \@catch statement.
*/
- CXCursor_ObjCAtCatchStmt = 217,
+ CXCursor_ObjCAtCatchStmt = 217,
/** Objective-C's \@finally statement.
*/
- CXCursor_ObjCAtFinallyStmt = 218,
+ CXCursor_ObjCAtFinallyStmt = 218,
/** Objective-C's \@throw statement.
*/
- CXCursor_ObjCAtThrowStmt = 219,
+ CXCursor_ObjCAtThrowStmt = 219,
/** Objective-C's \@synchronized statement.
*/
- CXCursor_ObjCAtSynchronizedStmt = 220,
+ CXCursor_ObjCAtSynchronizedStmt = 220,
/** Objective-C's autorelease pool statement.
*/
- CXCursor_ObjCAutoreleasePoolStmt = 221,
+ CXCursor_ObjCAutoreleasePoolStmt = 221,
/** Objective-C's collection statement.
*/
- CXCursor_ObjCForCollectionStmt = 222,
+ CXCursor_ObjCForCollectionStmt = 222,
/** C++'s catch statement.
*/
- CXCursor_CXXCatchStmt = 223,
+ CXCursor_CXXCatchStmt = 223,
/** C++'s try statement.
*/
- CXCursor_CXXTryStmt = 224,
+ CXCursor_CXXTryStmt = 224,
/** C++'s for (* : *) statement.
*/
- CXCursor_CXXForRangeStmt = 225,
+ CXCursor_CXXForRangeStmt = 225,
/** Windows Structured Exception Handling's try statement.
*/
- CXCursor_SEHTryStmt = 226,
+ CXCursor_SEHTryStmt = 226,
/** Windows Structured Exception Handling's except statement.
*/
- CXCursor_SEHExceptStmt = 227,
+ CXCursor_SEHExceptStmt = 227,
/** Windows Structured Exception Handling's finally statement.
*/
- CXCursor_SEHFinallyStmt = 228,
+ CXCursor_SEHFinallyStmt = 228,
/** A MS inline assembly statement extension.
*/
- CXCursor_MSAsmStmt = 229,
+ CXCursor_MSAsmStmt = 229,
/** The null statement ";": C99 6.8.3p3.
*
* This cursor kind is used to describe the null statement.
*/
- CXCursor_NullStmt = 230,
+ CXCursor_NullStmt = 230,
/** Adaptor class for mixing declarations with statements and
* expressions.
*/
- CXCursor_DeclStmt = 231,
+ CXCursor_DeclStmt = 231,
/** OpenMP parallel directive.
*/
- CXCursor_OMPParallelDirective = 232,
+ CXCursor_OMPParallelDirective = 232,
/** OpenMP SIMD directive.
*/
- CXCursor_OMPSimdDirective = 233,
+ CXCursor_OMPSimdDirective = 233,
/** OpenMP for directive.
*/
- CXCursor_OMPForDirective = 234,
+ CXCursor_OMPForDirective = 234,
/** OpenMP sections directive.
*/
- CXCursor_OMPSectionsDirective = 235,
+ CXCursor_OMPSectionsDirective = 235,
/** OpenMP section directive.
*/
- CXCursor_OMPSectionDirective = 236,
+ CXCursor_OMPSectionDirective = 236,
/** OpenMP single directive.
*/
- CXCursor_OMPSingleDirective = 237,
+ CXCursor_OMPSingleDirective = 237,
/** OpenMP parallel for directive.
*/
- CXCursor_OMPParallelForDirective = 238,
+ CXCursor_OMPParallelForDirective = 238,
/** OpenMP parallel sections directive.
*/
- CXCursor_OMPParallelSectionsDirective = 239,
+ CXCursor_OMPParallelSectionsDirective = 239,
/** OpenMP task directive.
*/
- CXCursor_OMPTaskDirective = 240,
+ CXCursor_OMPTaskDirective = 240,
/** OpenMP master directive.
*/
- CXCursor_OMPMasterDirective = 241,
+ CXCursor_OMPMasterDirective = 241,
/** OpenMP critical directive.
*/
- CXCursor_OMPCriticalDirective = 242,
+ CXCursor_OMPCriticalDirective = 242,
/** OpenMP taskyield directive.
*/
- CXCursor_OMPTaskyieldDirective = 243,
+ CXCursor_OMPTaskyieldDirective = 243,
/** OpenMP barrier directive.
*/
- CXCursor_OMPBarrierDirective = 244,
+ CXCursor_OMPBarrierDirective = 244,
/** OpenMP taskwait directive.
*/
- CXCursor_OMPTaskwaitDirective = 245,
+ CXCursor_OMPTaskwaitDirective = 245,
/** OpenMP flush directive.
*/
- CXCursor_OMPFlushDirective = 246,
+ CXCursor_OMPFlushDirective = 246,
/** Windows Structured Exception Handling's leave statement.
*/
- CXCursor_SEHLeaveStmt = 247,
+ CXCursor_SEHLeaveStmt = 247,
/** OpenMP ordered directive.
*/
- CXCursor_OMPOrderedDirective = 248,
+ CXCursor_OMPOrderedDirective = 248,
/** OpenMP atomic directive.
*/
- CXCursor_OMPAtomicDirective = 249,
+ CXCursor_OMPAtomicDirective = 249,
/** OpenMP for SIMD directive.
*/
- CXCursor_OMPForSimdDirective = 250,
+ CXCursor_OMPForSimdDirective = 250,
/** OpenMP parallel for SIMD directive.
*/
- CXCursor_OMPParallelForSimdDirective = 251,
+ CXCursor_OMPParallelForSimdDirective = 251,
/** OpenMP target directive.
*/
- CXCursor_OMPTargetDirective = 252,
+ CXCursor_OMPTargetDirective = 252,
/** OpenMP teams directive.
*/
- CXCursor_OMPTeamsDirective = 253,
+ CXCursor_OMPTeamsDirective = 253,
/** OpenMP taskgroup directive.
*/
- CXCursor_OMPTaskgroupDirective = 254,
+ CXCursor_OMPTaskgroupDirective = 254,
/** OpenMP cancellation point directive.
*/
@@ -2456,35 +2442,35 @@ enum CXCursorKind {
/** OpenMP cancel directive.
*/
- CXCursor_OMPCancelDirective = 256,
+ CXCursor_OMPCancelDirective = 256,
/** OpenMP target data directive.
*/
- CXCursor_OMPTargetDataDirective = 257,
+ CXCursor_OMPTargetDataDirective = 257,
/** OpenMP taskloop directive.
*/
- CXCursor_OMPTaskLoopDirective = 258,
+ CXCursor_OMPTaskLoopDirective = 258,
/** OpenMP taskloop simd directive.
*/
- CXCursor_OMPTaskLoopSimdDirective = 259,
+ CXCursor_OMPTaskLoopSimdDirective = 259,
/** OpenMP distribute directive.
*/
- CXCursor_OMPDistributeDirective = 260,
+ CXCursor_OMPDistributeDirective = 260,
/** OpenMP target enter data directive.
*/
- CXCursor_OMPTargetEnterDataDirective = 261,
+ CXCursor_OMPTargetEnterDataDirective = 261,
/** OpenMP target exit data directive.
*/
- CXCursor_OMPTargetExitDataDirective = 262,
+ CXCursor_OMPTargetExitDataDirective = 262,
/** OpenMP target parallel directive.
*/
- CXCursor_OMPTargetParallelDirective = 263,
+ CXCursor_OMPTargetParallelDirective = 263,
/** OpenMP target parallel for directive.
*/
@@ -2492,7 +2478,7 @@ enum CXCursorKind {
/** OpenMP target update directive.
*/
- CXCursor_OMPTargetUpdateDirective = 265,
+ CXCursor_OMPTargetUpdateDirective = 265,
/** OpenMP distribute parallel for directive.
*/
@@ -2564,17 +2550,25 @@ enum CXCursorKind {
/** OpenMP master taskloop simd directive.
*/
- CXCursor_OMPMasterTaskLoopSimdDirective = 283,
+ CXCursor_OMPMasterTaskLoopSimdDirective = 283,
/** OpenMP parallel master taskloop simd directive.
*/
- CXCursor_OMPParallelMasterTaskLoopSimdDirective = 284,
+ CXCursor_OMPParallelMasterTaskLoopSimdDirective = 284,
/** OpenMP parallel master directive.
*/
- CXCursor_OMPParallelMasterDirective = 285,
+ CXCursor_OMPParallelMasterDirective = 285,
+
+ /** OpenMP depobj directive.
+ */
+ CXCursor_OMPDepobjDirective = 286,
+
+ /** OpenMP scan directive.
+ */
+ CXCursor_OMPScanDirective = 287,
- CXCursor_LastStmt = CXCursor_OMPParallelMasterDirective,
+ CXCursor_LastStmt = CXCursor_OMPScanDirective,
/**
* Cursor that represents the translation unit itself.
@@ -2582,89 +2576,89 @@ enum CXCursorKind {
* The translation unit cursor exists primarily to act as the root
* cursor for traversing the contents of a translation unit.
*/
- CXCursor_TranslationUnit = 300,
+ CXCursor_TranslationUnit = 300,
/* Attributes */
- CXCursor_FirstAttr = 400,
+ CXCursor_FirstAttr = 400,
/**
* An attribute whose specific kind is not exposed via this
* interface.
*/
- CXCursor_UnexposedAttr = 400,
-
- CXCursor_IBActionAttr = 401,
- CXCursor_IBOutletAttr = 402,
- CXCursor_IBOutletCollectionAttr = 403,
- CXCursor_CXXFinalAttr = 404,
- CXCursor_CXXOverrideAttr = 405,
- CXCursor_AnnotateAttr = 406,
- CXCursor_AsmLabelAttr = 407,
- CXCursor_PackedAttr = 408,
- CXCursor_PureAttr = 409,
- CXCursor_ConstAttr = 410,
- CXCursor_NoDuplicateAttr = 411,
- CXCursor_CUDAConstantAttr = 412,
- CXCursor_CUDADeviceAttr = 413,
- CXCursor_CUDAGlobalAttr = 414,
- CXCursor_CUDAHostAttr = 415,
- CXCursor_CUDASharedAttr = 416,
- CXCursor_VisibilityAttr = 417,
- CXCursor_DLLExport = 418,
- CXCursor_DLLImport = 419,
- CXCursor_NSReturnsRetained = 420,
- CXCursor_NSReturnsNotRetained = 421,
- CXCursor_NSReturnsAutoreleased = 422,
- CXCursor_NSConsumesSelf = 423,
- CXCursor_NSConsumed = 424,
- CXCursor_ObjCException = 425,
- CXCursor_ObjCNSObject = 426,
- CXCursor_ObjCIndependentClass = 427,
- CXCursor_ObjCPreciseLifetime = 428,
- CXCursor_ObjCReturnsInnerPointer = 429,
- CXCursor_ObjCRequiresSuper = 430,
- CXCursor_ObjCRootClass = 431,
- CXCursor_ObjCSubclassingRestricted = 432,
- CXCursor_ObjCExplicitProtocolImpl = 433,
- CXCursor_ObjCDesignatedInitializer = 434,
- CXCursor_ObjCRuntimeVisible = 435,
- CXCursor_ObjCBoxable = 436,
- CXCursor_FlagEnum = 437,
- CXCursor_ConvergentAttr = 438,
- CXCursor_WarnUnusedAttr = 439,
- CXCursor_WarnUnusedResultAttr = 440,
- CXCursor_AlignedAttr = 441,
- CXCursor_LastAttr = CXCursor_AlignedAttr,
+ CXCursor_UnexposedAttr = 400,
+
+ CXCursor_IBActionAttr = 401,
+ CXCursor_IBOutletAttr = 402,
+ CXCursor_IBOutletCollectionAttr = 403,
+ CXCursor_CXXFinalAttr = 404,
+ CXCursor_CXXOverrideAttr = 405,
+ CXCursor_AnnotateAttr = 406,
+ CXCursor_AsmLabelAttr = 407,
+ CXCursor_PackedAttr = 408,
+ CXCursor_PureAttr = 409,
+ CXCursor_ConstAttr = 410,
+ CXCursor_NoDuplicateAttr = 411,
+ CXCursor_CUDAConstantAttr = 412,
+ CXCursor_CUDADeviceAttr = 413,
+ CXCursor_CUDAGlobalAttr = 414,
+ CXCursor_CUDAHostAttr = 415,
+ CXCursor_CUDASharedAttr = 416,
+ CXCursor_VisibilityAttr = 417,
+ CXCursor_DLLExport = 418,
+ CXCursor_DLLImport = 419,
+ CXCursor_NSReturnsRetained = 420,
+ CXCursor_NSReturnsNotRetained = 421,
+ CXCursor_NSReturnsAutoreleased = 422,
+ CXCursor_NSConsumesSelf = 423,
+ CXCursor_NSConsumed = 424,
+ CXCursor_ObjCException = 425,
+ CXCursor_ObjCNSObject = 426,
+ CXCursor_ObjCIndependentClass = 427,
+ CXCursor_ObjCPreciseLifetime = 428,
+ CXCursor_ObjCReturnsInnerPointer = 429,
+ CXCursor_ObjCRequiresSuper = 430,
+ CXCursor_ObjCRootClass = 431,
+ CXCursor_ObjCSubclassingRestricted = 432,
+ CXCursor_ObjCExplicitProtocolImpl = 433,
+ CXCursor_ObjCDesignatedInitializer = 434,
+ CXCursor_ObjCRuntimeVisible = 435,
+ CXCursor_ObjCBoxable = 436,
+ CXCursor_FlagEnum = 437,
+ CXCursor_ConvergentAttr = 438,
+ CXCursor_WarnUnusedAttr = 439,
+ CXCursor_WarnUnusedResultAttr = 440,
+ CXCursor_AlignedAttr = 441,
+ CXCursor_LastAttr = CXCursor_AlignedAttr,
/* Preprocessing */
- CXCursor_PreprocessingDirective = 500,
- CXCursor_MacroDefinition = 501,
- CXCursor_MacroExpansion = 502,
- CXCursor_MacroInstantiation = CXCursor_MacroExpansion,
- CXCursor_InclusionDirective = 503,
- CXCursor_FirstPreprocessing = CXCursor_PreprocessingDirective,
- CXCursor_LastPreprocessing = CXCursor_InclusionDirective,
+ CXCursor_PreprocessingDirective = 500,
+ CXCursor_MacroDefinition = 501,
+ CXCursor_MacroExpansion = 502,
+ CXCursor_MacroInstantiation = CXCursor_MacroExpansion,
+ CXCursor_InclusionDirective = 503,
+ CXCursor_FirstPreprocessing = CXCursor_PreprocessingDirective,
+ CXCursor_LastPreprocessing = CXCursor_InclusionDirective,
/* Extra Declarations */
/**
* A module import declaration.
*/
- CXCursor_ModuleImportDecl = 600,
- CXCursor_TypeAliasTemplateDecl = 601,
+ CXCursor_ModuleImportDecl = 600,
+ CXCursor_TypeAliasTemplateDecl = 601,
/**
* A static_assert or _Static_assert node
*/
- CXCursor_StaticAssert = 602,
+ CXCursor_StaticAssert = 602,
/**
* a friend declaration.
*/
- CXCursor_FriendDecl = 603,
- CXCursor_FirstExtraDecl = CXCursor_ModuleImportDecl,
- CXCursor_LastExtraDecl = CXCursor_FriendDecl,
+ CXCursor_FriendDecl = 603,
+ CXCursor_FirstExtraDecl = CXCursor_ModuleImportDecl,
+ CXCursor_LastExtraDecl = CXCursor_FriendDecl,
/**
* A code completion overload candidate.
*/
- CXCursor_OverloadCandidate = 700
+ CXCursor_OverloadCandidate = 700
};
/**
@@ -2935,14 +2929,10 @@ typedef struct CXPlatformAvailability {
* platform-availability structures returned. There are
* \c min(N, availability_size) such structures.
*/
-CINDEX_LINKAGE int
-clang_getCursorPlatformAvailability(CXCursor cursor,
- int *always_deprecated,
- CXString *deprecated_message,
- int *always_unavailable,
- CXString *unavailable_message,
- CXPlatformAvailability *availability,
- int availability_size);
+CINDEX_LINKAGE int clang_getCursorPlatformAvailability(
+ CXCursor cursor, int *always_deprecated, CXString *deprecated_message,
+ int *always_unavailable, CXString *unavailable_message,
+ CXPlatformAvailability *availability, int availability_size);
/**
* Free the memory associated with a \c CXPlatformAvailability structure.
@@ -2969,11 +2959,7 @@ CINDEX_LINKAGE enum CXLanguageKind clang_getCursorLanguage(CXCursor cursor);
* Describe the "thread-local storage (TLS) kind" of the declaration
* referred to by a cursor.
*/
-enum CXTLSKind {
- CXTLS_None = 0,
- CXTLS_Dynamic,
- CXTLS_Static
-};
+enum CXTLSKind { CXTLS_None = 0, CXTLS_Dynamic, CXTLS_Static };
/**
* Determine the "thread-local storage (TLS) kind" of the declaration
@@ -3005,7 +2991,7 @@ CINDEX_LINKAGE void clang_disposeCXCursorSet(CXCursorSet cset);
* Queries a CXCursorSet to see if it contains a specific CXCursor.
*
* \returns non-zero if the set contains the specified cursor.
-*/
+ */
CINDEX_LINKAGE unsigned clang_CXCursorSet_contains(CXCursorSet cset,
CXCursor cursor);
@@ -3013,7 +2999,7 @@ CINDEX_LINKAGE unsigned clang_CXCursorSet_contains(CXCursorSet cset,
* Inserts a CXCursor into a CXCursorSet.
*
* \returns zero if the CXCursor was already in the set, and non-zero otherwise.
-*/
+ */
CINDEX_LINKAGE unsigned clang_CXCursorSet_insert(CXCursorSet cset,
CXCursor cursor);
@@ -3267,8 +3253,9 @@ enum CXTypeKind {
CXType_UShortAccum = 36,
CXType_UAccum = 37,
CXType_ULongAccum = 38,
+ CXType_BFloat16 = 39,
CXType_FirstBuiltin = CXType_Void,
- CXType_LastBuiltin = CXType_ULongAccum,
+ CXType_LastBuiltin = CXType_BFloat16,
CXType_Complex = 100,
CXType_Pointer = 101,
@@ -3360,7 +3347,8 @@ enum CXTypeKind {
CXType_OCLIntelSubgroupAVCImeDualRefStreamin = 175,
- CXType_ExtVector = 176
+ CXType_ExtVector = 176,
+ CXType_Atomic = 177
};
/**
@@ -3433,9 +3421,9 @@ CINDEX_LINKAGE CXType clang_getEnumDeclIntegerType(CXCursor C);
* Retrieve the integer value of an enum constant declaration as a signed
* long long.
*
- * If the cursor does not reference an enum constant declaration, LLONG_MIN is returned.
- * Since this is also potentially a valid constant value, the kind of the cursor
- * must be verified before calling this function.
+ * If the cursor does not reference an enum constant declaration, LLONG_MIN is
+ * returned. Since this is also potentially a valid constant value, the kind of
+ * the cursor must be verified before calling this function.
*/
CINDEX_LINKAGE long long clang_getEnumConstantDeclValue(CXCursor C);
@@ -3443,11 +3431,12 @@ CINDEX_LINKAGE long long clang_getEnumConstantDeclValue(CXCursor C);
* Retrieve the integer value of an enum constant declaration as an unsigned
* long long.
*
- * If the cursor does not reference an enum constant declaration, ULLONG_MAX is returned.
- * Since this is also potentially a valid constant value, the kind of the cursor
- * must be verified before calling this function.
+ * If the cursor does not reference an enum constant declaration, ULLONG_MAX is
+ * returned. Since this is also potentially a valid constant value, the kind of
+ * the cursor must be verified before calling this function.
*/
-CINDEX_LINKAGE unsigned long long clang_getEnumConstantDeclUnsignedValue(CXCursor C);
+CINDEX_LINKAGE unsigned long long
+clang_getEnumConstantDeclUnsignedValue(CXCursor C);
/**
* Retrieve the bit width of a bit field declaration as an integer.
@@ -3528,8 +3517,8 @@ CINDEX_LINKAGE int clang_Cursor_getNumTemplateArguments(CXCursor C);
* For I = 0, 1, and 2, Type, Integral, and Integral will be returned,
* respectively.
*/
-CINDEX_LINKAGE enum CXTemplateArgumentKind clang_Cursor_getTemplateArgumentKind(
- CXCursor C, unsigned I);
+CINDEX_LINKAGE enum CXTemplateArgumentKind
+clang_Cursor_getTemplateArgumentKind(CXCursor C, unsigned I);
/**
* Retrieve a CXType representing the type of a TemplateArgument of a
@@ -3589,8 +3578,8 @@ CINDEX_LINKAGE long long clang_Cursor_getTemplateArgumentValue(CXCursor C,
* If called with I = 1 or 2, 2147483649 or true will be returned, respectively.
* For I == 0, this function's behavior is undefined.
*/
-CINDEX_LINKAGE unsigned long long clang_Cursor_getTemplateArgumentUnsignedValue(
- CXCursor C, unsigned I);
+CINDEX_LINKAGE unsigned long long
+clang_Cursor_getTemplateArgumentUnsignedValue(CXCursor C, unsigned I);
/**
* Determine whether two CXTypes represent the same type.
@@ -3745,7 +3734,7 @@ CINDEX_LINKAGE unsigned clang_Type_getNumObjCProtocolRefs(CXType T);
CINDEX_LINKAGE CXCursor clang_Type_getObjCProtocolDecl(CXType T, unsigned i);
/**
- * Retreive the number of type arguments associated with an ObjC object.
+ * Retrieve the number of type arguments associated with an ObjC object.
*
* If the type is not an ObjC object, 0 is returned.
*/
@@ -3775,7 +3764,8 @@ CINDEX_LINKAGE CXType clang_getCursorResultType(CXCursor C);
* Retrieve the exception specification type associated with a given cursor.
* This is a value of type CXCursor_ExceptionSpecificationKind.
*
- * This only returns a valid result if the cursor refers to a function or method.
+ * This only returns a valid result if the cursor refers to a function or
+ * method.
*/
CINDEX_LINKAGE int clang_getCursorExceptionSpecificationType(CXCursor C);
@@ -3948,6 +3938,13 @@ CINDEX_LINKAGE long long clang_Type_getOffsetOf(CXType T, const char *S);
*/
CINDEX_LINKAGE CXType clang_Type_getModifiedType(CXType T);
+/**
+ * Gets the type contained by this atomic type.
+ *
+ * If a non-atomic type is passed in, an invalid type is returned.
+ */
+CINDEX_LINKAGE CXType clang_Type_getValueType(CXType CT);
+
/**
* Return the offset of the field represented by the Cursor.
*
@@ -4003,7 +4000,8 @@ CINDEX_LINKAGE int clang_Type_getNumTemplateArguments(CXType T);
* This function only returns template type arguments and does not handle
* template template arguments or variadic packs.
*/
-CINDEX_LINKAGE CXType clang_Type_getTemplateArgumentAsType(CXType T, unsigned i);
+CINDEX_LINKAGE CXType clang_Type_getTemplateArgumentAsType(CXType T,
+ unsigned i);
/**
* Retrieve the ref-qualifier kind of a function or method.
@@ -4039,9 +4037,9 @@ enum CX_CXXAccessSpecifier {
/**
* Returns the access control level for the referenced object.
*
- * If the cursor refers to a C++ declaration, its access control level within its
- * parent scope is returned. Otherwise, if the cursor refers to a base specifier or
- * access specifier, the specifier itself is returned.
+ * If the cursor refers to a C++ declaration, its access control level within
+ * its parent scope is returned. Otherwise, if the cursor refers to a base
+ * specifier or access specifier, the specifier itself is returned.
*/
CINDEX_LINKAGE enum CX_CXXAccessSpecifier clang_getCXXAccessSpecifier(CXCursor);
@@ -4192,7 +4190,7 @@ CINDEX_LINKAGE unsigned clang_visitChildren(CXCursor parent,
CXCursorVisitor visitor,
CXClientData client_data);
#ifdef __has_feature
-# if __has_feature(blocks)
+#if __has_feature(blocks)
/**
* Visitor invoked for each cursor found by a traversal.
*
@@ -4203,16 +4201,16 @@ CINDEX_LINKAGE unsigned clang_visitChildren(CXCursor parent,
* The visitor should return one of the \c CXChildVisitResult values
* to direct clang_visitChildrenWithBlock().
*/
-typedef enum CXChildVisitResult
- (^CXCursorVisitorBlock)(CXCursor cursor, CXCursor parent);
+typedef enum CXChildVisitResult (^CXCursorVisitorBlock)(CXCursor cursor,
+ CXCursor parent);
/**
* Visits the children of a cursor using the specified block. Behaves
* identically to clang_visitChildren() in all other respects.
*/
-CINDEX_LINKAGE unsigned clang_visitChildrenWithBlock(CXCursor parent,
- CXCursorVisitorBlock block);
-# endif
+CINDEX_LINKAGE unsigned
+clang_visitChildrenWithBlock(CXCursor parent, CXCursorVisitorBlock block);
+#endif
#endif
/**
@@ -4249,15 +4247,14 @@ CINDEX_LINKAGE CXString clang_constructUSR_ObjCClass(const char *class_name);
/**
* Construct a USR for a specified Objective-C category.
*/
-CINDEX_LINKAGE CXString
- clang_constructUSR_ObjCCategory(const char *class_name,
- const char *category_name);
+CINDEX_LINKAGE CXString clang_constructUSR_ObjCCategory(
+ const char *class_name, const char *category_name);
/**
* Construct a USR for a specified Objective-C protocol.
*/
CINDEX_LINKAGE CXString
- clang_constructUSR_ObjCProtocol(const char *protocol_name);
+clang_constructUSR_ObjCProtocol(const char *protocol_name);
/**
* Construct a USR for a specified Objective-C instance variable and
@@ -4297,9 +4294,8 @@ CINDEX_LINKAGE CXString clang_getCursorSpelling(CXCursor);
*
* \param options Reserved.
*/
-CINDEX_LINKAGE CXSourceRange clang_Cursor_getSpellingNameRange(CXCursor,
- unsigned pieceIndex,
- unsigned options);
+CINDEX_LINKAGE CXSourceRange clang_Cursor_getSpellingNameRange(
+ CXCursor, unsigned pieceIndex, unsigned options);
/**
* Opaque pointer representing a policy that controls pretty printing
@@ -4353,9 +4349,10 @@ clang_PrintingPolicy_getProperty(CXPrintingPolicy Policy,
/**
* Set a property value for the given printing policy.
*/
-CINDEX_LINKAGE void clang_PrintingPolicy_setProperty(CXPrintingPolicy Policy,
- enum CXPrintingPolicyProperty Property,
- unsigned Value);
+CINDEX_LINKAGE void
+clang_PrintingPolicy_setProperty(CXPrintingPolicy Policy,
+ enum CXPrintingPolicyProperty Property,
+ unsigned Value);
/**
* Retrieve the default policy for the cursor.
@@ -4503,18 +4500,18 @@ CINDEX_LINKAGE CXType clang_Cursor_getReceiverType(CXCursor C);
* Property attributes for a \c CXCursor_ObjCPropertyDecl.
*/
typedef enum {
- CXObjCPropertyAttr_noattr = 0x00,
- CXObjCPropertyAttr_readonly = 0x01,
- CXObjCPropertyAttr_getter = 0x02,
- CXObjCPropertyAttr_assign = 0x04,
+ CXObjCPropertyAttr_noattr = 0x00,
+ CXObjCPropertyAttr_readonly = 0x01,
+ CXObjCPropertyAttr_getter = 0x02,
+ CXObjCPropertyAttr_assign = 0x04,
CXObjCPropertyAttr_readwrite = 0x08,
- CXObjCPropertyAttr_retain = 0x10,
- CXObjCPropertyAttr_copy = 0x20,
+ CXObjCPropertyAttr_retain = 0x10,
+ CXObjCPropertyAttr_copy = 0x20,
CXObjCPropertyAttr_nonatomic = 0x40,
- CXObjCPropertyAttr_setter = 0x80,
- CXObjCPropertyAttr_atomic = 0x100,
- CXObjCPropertyAttr_weak = 0x200,
- CXObjCPropertyAttr_strong = 0x400,
+ CXObjCPropertyAttr_setter = 0x80,
+ CXObjCPropertyAttr_atomic = 0x100,
+ CXObjCPropertyAttr_weak = 0x200,
+ CXObjCPropertyAttr_strong = 0x400,
CXObjCPropertyAttr_unsafe_unretained = 0x800,
CXObjCPropertyAttr_class = 0x1000
} CXObjCPropertyAttrKind;
@@ -4526,8 +4523,8 @@ typedef enum {
*
* \param reserved Reserved for future use, pass 0.
*/
-CINDEX_LINKAGE unsigned clang_Cursor_getObjCPropertyAttributes(CXCursor C,
- unsigned reserved);
+CINDEX_LINKAGE unsigned
+clang_Cursor_getObjCPropertyAttributes(CXCursor C, unsigned reserved);
/**
* Given a cursor that represents a property declaration, return the
@@ -4589,8 +4586,9 @@ CINDEX_LINKAGE unsigned clang_Cursor_isVariadic(CXCursor C);
* non-zero if the 'generated_declaration' is set in the attribute.
*/
CINDEX_LINKAGE unsigned clang_Cursor_isExternalSymbol(CXCursor C,
- CXString *language, CXString *definedIn,
- unsigned *isGenerated);
+ CXString *language,
+ CXString *definedIn,
+ unsigned *isGenerated);
/**
* Given a cursor that represents a declaration, return the associated
@@ -4716,8 +4714,8 @@ CINDEX_LINKAGE unsigned clang_Module_getNumTopLevelHeaders(CXTranslationUnit,
* \returns the specified top level header associated with the module.
*/
CINDEX_LINKAGE
-CXFile clang_Module_getTopLevelHeader(CXTranslationUnit,
- CXModule Module, unsigned Index);
+CXFile clang_Module_getTopLevelHeader(CXTranslationUnit, CXModule Module,
+ unsigned Index);
/**
* @}
@@ -4735,7 +4733,8 @@ CXFile clang_Module_getTopLevelHeader(CXTranslationUnit,
/**
* Determine if a C++ constructor is a converting constructor.
*/
-CINDEX_LINKAGE unsigned clang_CXXConstructor_isConvertingConstructor(CXCursor C);
+CINDEX_LINKAGE unsigned
+clang_CXXConstructor_isConvertingConstructor(CXCursor C);
/**
* Determine if a C++ constructor is a copy constructor.
@@ -4865,9 +4864,8 @@ CINDEX_LINKAGE CXCursor clang_getSpecializedCursorTemplate(CXCursor C);
* \returns The piece of the name pointed to by the given cursor. If there is no
* name, or if the PieceIndex is out-of-range, a null-cursor will be returned.
*/
-CINDEX_LINKAGE CXSourceRange clang_getCursorReferenceNameRange(CXCursor C,
- unsigned NameFlags,
- unsigned PieceIndex);
+CINDEX_LINKAGE CXSourceRange clang_getCursorReferenceNameRange(
+ CXCursor C, unsigned NameFlags, unsigned PieceIndex);
enum CXNameRefFlags {
/**
@@ -5035,15 +5033,14 @@ CINDEX_LINKAGE void clang_tokenize(CXTranslationUnit TU, CXSourceRange Range,
* \param Cursors an array of \p NumTokens cursors, whose contents will be
* replaced with the cursors corresponding to each token.
*/
-CINDEX_LINKAGE void clang_annotateTokens(CXTranslationUnit TU,
- CXToken *Tokens, unsigned NumTokens,
- CXCursor *Cursors);
+CINDEX_LINKAGE void clang_annotateTokens(CXTranslationUnit TU, CXToken *Tokens,
+ unsigned NumTokens, CXCursor *Cursors);
/**
* Free the given set of tokens.
*/
-CINDEX_LINKAGE void clang_disposeTokens(CXTranslationUnit TU,
- CXToken *Tokens, unsigned NumTokens);
+CINDEX_LINKAGE void clang_disposeTokens(CXTranslationUnit TU, CXToken *Tokens,
+ unsigned NumTokens);
/**
* @}
@@ -5060,15 +5057,11 @@ CINDEX_LINKAGE void clang_disposeTokens(CXTranslationUnit TU,
/* for debug/testing */
CINDEX_LINKAGE CXString clang_getCursorKindSpelling(enum CXCursorKind Kind);
-CINDEX_LINKAGE void clang_getDefinitionSpellingAndExtent(CXCursor,
- const char **startBuf,
- const char **endBuf,
- unsigned *startLine,
- unsigned *startColumn,
- unsigned *endLine,
- unsigned *endColumn);
+CINDEX_LINKAGE void clang_getDefinitionSpellingAndExtent(
+ CXCursor, const char **startBuf, const char **endBuf, unsigned *startLine,
+ unsigned *startColumn, unsigned *endLine, unsigned *endColumn);
CINDEX_LINKAGE void clang_enableStackTraces(void);
-CINDEX_LINKAGE void clang_executeOnThread(void (*fn)(void*), void *user_data,
+CINDEX_LINKAGE void clang_executeOnThread(void (*fn)(void *), void *user_data,
unsigned stack_size);
/**
@@ -5319,9 +5312,8 @@ clang_getCompletionChunkKind(CXCompletionString completion_string,
*
* \returns the text associated with the chunk at index \c chunk_number.
*/
-CINDEX_LINKAGE CXString
-clang_getCompletionChunkText(CXCompletionString completion_string,
- unsigned chunk_number);
+CINDEX_LINKAGE CXString clang_getCompletionChunkText(
+ CXCompletionString completion_string, unsigned chunk_number);
/**
* Retrieve the completion string associated with a particular chunk
@@ -5334,9 +5326,8 @@ clang_getCompletionChunkText(CXCompletionString completion_string,
* \returns the completion string associated with the chunk at index
* \c chunk_number.
*/
-CINDEX_LINKAGE CXCompletionString
-clang_getCompletionChunkCompletionString(CXCompletionString completion_string,
- unsigned chunk_number);
+CINDEX_LINKAGE CXCompletionString clang_getCompletionChunkCompletionString(
+ CXCompletionString completion_string, unsigned chunk_number);
/**
* Retrieve the number of chunks in the given code-completion string.
@@ -5393,9 +5384,8 @@ clang_getCompletionNumAnnotations(CXCompletionString completion_string);
* \returns annotation string associated with the completion at index
* \c annotation_number, or a NULL string if that annotation is not available.
*/
-CINDEX_LINKAGE CXString
-clang_getCompletionAnnotation(CXCompletionString completion_string,
- unsigned annotation_number);
+CINDEX_LINKAGE CXString clang_getCompletionAnnotation(
+ CXCompletionString completion_string, unsigned annotation_number);
/**
* Retrieve the parent context of the given completion string.
@@ -5413,9 +5403,8 @@ clang_getCompletionAnnotation(CXCompletionString completion_string,
* \returns The name of the completion parent, e.g., "NSObject" if
* the completion string represents a method in the NSObject class.
*/
-CINDEX_LINKAGE CXString
-clang_getCompletionParent(CXCompletionString completion_string,
- enum CXCursorKind *kind);
+CINDEX_LINKAGE CXString clang_getCompletionParent(
+ CXCompletionString completion_string, enum CXCursorKind *kind);
/**
* Retrieve the brief documentation comment attached to the declaration
@@ -5771,13 +5760,11 @@ CINDEX_LINKAGE unsigned clang_defaultCodeCompleteOptions(void);
* completion fails, returns NULL.
*/
CINDEX_LINKAGE
-CXCodeCompleteResults *clang_codeCompleteAt(CXTranslationUnit TU,
- const char *complete_filename,
- unsigned complete_line,
- unsigned complete_column,
- struct CXUnsavedFile *unsaved_files,
- unsigned num_unsaved_files,
- unsigned options);
+CXCodeCompleteResults *
+clang_codeCompleteAt(CXTranslationUnit TU, const char *complete_filename,
+ unsigned complete_line, unsigned complete_column,
+ struct CXUnsavedFile *unsaved_files,
+ unsigned num_unsaved_files, unsigned options);
/**
* Sort the code-completion results in case-insensitive alphabetical
@@ -5826,8 +5813,8 @@ CXDiagnostic clang_codeCompleteGetDiagnostic(CXCodeCompleteResults *Results,
* along with the given code completion results.
*/
CINDEX_LINKAGE
-unsigned long long clang_codeCompleteGetContexts(
- CXCodeCompleteResults *Results);
+unsigned long long
+clang_codeCompleteGetContexts(CXCodeCompleteResults *Results);
/**
* Returns the cursor kind for the container for the current code
@@ -5846,9 +5833,9 @@ unsigned long long clang_codeCompleteGetContexts(
* container
*/
CINDEX_LINKAGE
-enum CXCursorKind clang_codeCompleteGetContainerKind(
- CXCodeCompleteResults *Results,
- unsigned *IsIncomplete);
+enum CXCursorKind
+clang_codeCompleteGetContainerKind(CXCodeCompleteResults *Results,
+ unsigned *IsIncomplete);
/**
* Returns the USR for the container for the current code completion
@@ -5900,19 +5887,19 @@ CINDEX_LINKAGE CXString clang_getClangVersion(void);
*/
CINDEX_LINKAGE void clang_toggleCrashRecovery(unsigned isEnabled);
- /**
- * Visitor invoked for each file in a translation unit
- * (used with clang_getInclusions()).
- *
- * This visitor function will be invoked by clang_getInclusions() for each
- * file included (either at the top-level or by \#include directives) within
- * a translation unit. The first argument is the file being included, and
- * the second and third arguments provide the inclusion stack. The
- * array is sorted in order of immediate inclusion. For example,
- * the first element refers to the location that included 'included_file'.
- */
+/**
+ * Visitor invoked for each file in a translation unit
+ * (used with clang_getInclusions()).
+ *
+ * This visitor function will be invoked by clang_getInclusions() for each
+ * file included (either at the top-level or by \#include directives) within
+ * a translation unit. The first argument is the file being included, and
+ * the second and third arguments provide the inclusion stack. The
+ * array is sorted in order of immediate inclusion. For example,
+ * the first element refers to the location that included 'included_file'.
+ */
typedef void (*CXInclusionVisitor)(CXFile included_file,
- CXSourceLocation* inclusion_stack,
+ CXSourceLocation *inclusion_stack,
unsigned include_len,
CXClientData client_data);
@@ -5927,7 +5914,7 @@ CINDEX_LINKAGE void clang_getInclusions(CXTranslationUnit tu,
CXClientData client_data);
typedef enum {
- CXEval_Int = 1 ,
+ CXEval_Int = 1,
CXEval_Float = 2,
CXEval_ObjCStrLiteral = 3,
CXEval_StrLiteral = 4,
@@ -5936,17 +5923,18 @@ typedef enum {
CXEval_UnExposed = 0
-} CXEvalResultKind ;
+} CXEvalResultKind;
/**
* Evaluation result of a cursor
*/
-typedef void * CXEvalResult;
+typedef void *CXEvalResult;
/**
* If cursor is a statement declaration tries to evaluate the
* statement and if its variable, tries to evaluate its initializer,
* into its corresponding type.
+ * If it's an expression, tries to evaluate the expression.
*/
CINDEX_LINKAGE CXEvalResult clang_Cursor_Evaluate(CXCursor C);
@@ -5978,7 +5966,8 @@ CINDEX_LINKAGE unsigned clang_EvalResult_isUnsignedInt(CXEvalResult E);
* Returns the evaluation result as an unsigned integer if
* the kind is Int and clang_EvalResult_isUnsignedInt is non-zero.
*/
-CINDEX_LINKAGE unsigned long long clang_EvalResult_getAsUnsigned(CXEvalResult E);
+CINDEX_LINKAGE unsigned long long
+clang_EvalResult_getAsUnsigned(CXEvalResult E);
/**
* Returns the evaluation result as double if the
@@ -5992,7 +5981,7 @@ CINDEX_LINKAGE double clang_EvalResult_getAsDouble(CXEvalResult E);
* instead call clang_EvalResult_dispose on the CXEvalResult returned
* by clang_Cursor_Evaluate.
*/
-CINDEX_LINKAGE const char* clang_EvalResult_getAsStr(CXEvalResult E);
+CINDEX_LINKAGE const char *clang_EvalResult_getAsStr(CXEvalResult E);
/**
* Disposes the created Eval memory.
@@ -6050,7 +6039,8 @@ CINDEX_LINKAGE unsigned clang_remap_getNumFiles(CXRemapping);
* is associated with.
*/
CINDEX_LINKAGE void clang_remap_getFilenames(CXRemapping, unsigned index,
- CXString *original, CXString *transformed);
+ CXString *original,
+ CXString *transformed);
/**
* Dispose the remapping.
@@ -6066,10 +6056,7 @@ CINDEX_LINKAGE void clang_remap_dispose(CXRemapping);
* @{
*/
-enum CXVisitorResult {
- CXVisit_Break,
- CXVisit_Continue
-};
+enum CXVisitorResult { CXVisit_Break, CXVisit_Continue };
typedef struct CXCursorAndRangeVisitor {
void *context;
@@ -6107,8 +6094,8 @@ typedef enum {
*
* \returns one of the CXResult enumerators.
*/
-CINDEX_LINKAGE CXResult clang_findReferencesInFile(CXCursor cursor, CXFile file,
- CXCursorAndRangeVisitor visitor);
+CINDEX_LINKAGE CXResult clang_findReferencesInFile(
+ CXCursor cursor, CXFile file, CXCursorAndRangeVisitor visitor);
/**
* Find #import/#include directives in a specific file.
@@ -6122,15 +6109,14 @@ CINDEX_LINKAGE CXResult clang_findReferencesInFile(CXCursor cursor, CXFile file,
*
* \returns one of the CXResult enumerators.
*/
-CINDEX_LINKAGE CXResult clang_findIncludesInFile(CXTranslationUnit TU,
- CXFile file,
- CXCursorAndRangeVisitor visitor);
+CINDEX_LINKAGE CXResult clang_findIncludesInFile(
+ CXTranslationUnit TU, CXFile file, CXCursorAndRangeVisitor visitor);
#ifdef __has_feature
-# if __has_feature(blocks)
+#if __has_feature(blocks)
-typedef enum CXVisitorResult
- (^CXCursorAndRangeVisitorBlock)(CXCursor, CXSourceRange);
+typedef enum CXVisitorResult (^CXCursorAndRangeVisitorBlock)(CXCursor,
+ CXSourceRange);
CINDEX_LINKAGE
CXResult clang_findReferencesInFileWithBlock(CXCursor, CXFile,
@@ -6140,7 +6126,7 @@ CINDEX_LINKAGE
CXResult clang_findIncludesInFileWithBlock(CXTranslationUnit, CXFile,
CXCursorAndRangeVisitorBlock);
-# endif
+#endif
#endif
/**
@@ -6223,46 +6209,46 @@ typedef struct {
} CXIdxImportedASTFileInfo;
typedef enum {
- CXIdxEntity_Unexposed = 0,
- CXIdxEntity_Typedef = 1,
- CXIdxEntity_Function = 2,
- CXIdxEntity_Variable = 3,
- CXIdxEntity_Field = 4,
- CXIdxEntity_EnumConstant = 5,
+ CXIdxEntity_Unexposed = 0,
+ CXIdxEntity_Typedef = 1,
+ CXIdxEntity_Function = 2,
+ CXIdxEntity_Variable = 3,
+ CXIdxEntity_Field = 4,
+ CXIdxEntity_EnumConstant = 5,
- CXIdxEntity_ObjCClass = 6,
- CXIdxEntity_ObjCProtocol = 7,
- CXIdxEntity_ObjCCategory = 8,
+ CXIdxEntity_ObjCClass = 6,
+ CXIdxEntity_ObjCProtocol = 7,
+ CXIdxEntity_ObjCCategory = 8,
CXIdxEntity_ObjCInstanceMethod = 9,
- CXIdxEntity_ObjCClassMethod = 10,
- CXIdxEntity_ObjCProperty = 11,
- CXIdxEntity_ObjCIvar = 12,
-
- CXIdxEntity_Enum = 13,
- CXIdxEntity_Struct = 14,
- CXIdxEntity_Union = 15,
-
- CXIdxEntity_CXXClass = 16,
- CXIdxEntity_CXXNamespace = 17,
- CXIdxEntity_CXXNamespaceAlias = 18,
- CXIdxEntity_CXXStaticVariable = 19,
- CXIdxEntity_CXXStaticMethod = 20,
- CXIdxEntity_CXXInstanceMethod = 21,
- CXIdxEntity_CXXConstructor = 22,
- CXIdxEntity_CXXDestructor = 23,
+ CXIdxEntity_ObjCClassMethod = 10,
+ CXIdxEntity_ObjCProperty = 11,
+ CXIdxEntity_ObjCIvar = 12,
+
+ CXIdxEntity_Enum = 13,
+ CXIdxEntity_Struct = 14,
+ CXIdxEntity_Union = 15,
+
+ CXIdxEntity_CXXClass = 16,
+ CXIdxEntity_CXXNamespace = 17,
+ CXIdxEntity_CXXNamespaceAlias = 18,
+ CXIdxEntity_CXXStaticVariable = 19,
+ CXIdxEntity_CXXStaticMethod = 20,
+ CXIdxEntity_CXXInstanceMethod = 21,
+ CXIdxEntity_CXXConstructor = 22,
+ CXIdxEntity_CXXDestructor = 23,
CXIdxEntity_CXXConversionFunction = 24,
- CXIdxEntity_CXXTypeAlias = 25,
- CXIdxEntity_CXXInterface = 26
+ CXIdxEntity_CXXTypeAlias = 25,
+ CXIdxEntity_CXXInterface = 26
} CXIdxEntityKind;
typedef enum {
CXIdxEntityLang_None = 0,
- CXIdxEntityLang_C = 1,
+ CXIdxEntityLang_C = 1,
CXIdxEntityLang_ObjC = 2,
- CXIdxEntityLang_CXX = 3,
- CXIdxEntityLang_Swift = 4
+ CXIdxEntityLang_CXX = 3,
+ CXIdxEntityLang_Swift = 4
} CXIdxEntityLanguage;
/**
@@ -6276,16 +6262,16 @@ typedef enum {
* CXIdxEntity_CXXTypeAlias
*/
typedef enum {
- CXIdxEntity_NonTemplate = 0,
- CXIdxEntity_Template = 1,
+ CXIdxEntity_NonTemplate = 0,
+ CXIdxEntity_Template = 1,
CXIdxEntity_TemplatePartialSpecialization = 2,
CXIdxEntity_TemplateSpecialization = 3
} CXIdxEntityCXXTemplateKind;
typedef enum {
- CXIdxAttr_Unexposed = 0,
- CXIdxAttr_IBAction = 1,
- CXIdxAttr_IBOutlet = 2,
+ CXIdxAttr_Unexposed = 0,
+ CXIdxAttr_IBAction = 1,
+ CXIdxAttr_IBOutlet = 2,
CXIdxAttr_IBOutletCollection = 3
} CXIdxAttrKind;
@@ -6317,9 +6303,7 @@ typedef struct {
CXIdxLoc classLoc;
} CXIdxIBOutletCollectionAttrInfo;
-typedef enum {
- CXIdxDeclFlag_Skipped = 0x1
-} CXIdxDeclInfoFlags;
+typedef enum { CXIdxDeclFlag_Skipped = 0x1 } CXIdxDeclInfoFlags;
typedef struct {
const CXIdxEntityInfo *entityInfo;
@@ -6488,11 +6472,10 @@ typedef struct {
/**
* Called at the end of indexing; passes the complete diagnostic set.
*/
- void (*diagnostic)(CXClientData client_data,
- CXDiagnosticSet, void *reserved);
+ void (*diagnostic)(CXClientData client_data, CXDiagnosticSet, void *reserved);
- CXIdxClientFile (*enteredMainFile)(CXClientData client_data,
- CXFile mainFile, void *reserved);
+ CXIdxClientFile (*enteredMainFile)(CXClientData client_data, CXFile mainFile,
+ void *reserved);
/**
* Called when a file gets \#included/\#imported.
@@ -6517,8 +6500,7 @@ typedef struct {
CXIdxClientContainer (*startedTranslationUnit)(CXClientData client_data,
void *reserved);
- void (*indexDeclaration)(CXClientData client_data,
- const CXIdxDeclInfo *);
+ void (*indexDeclaration)(CXClientData client_data, const CXIdxDeclInfo *);
/**
* Called to index a reference of an entity.
@@ -6562,8 +6544,8 @@ clang_index_getClientContainer(const CXIdxContainerInfo *);
* For setting a custom CXIdxClientContainer attached to a
* container.
*/
-CINDEX_LINKAGE void
-clang_index_setClientContainer(const CXIdxContainerInfo *,CXIdxClientContainer);
+CINDEX_LINKAGE void clang_index_setClientContainer(const CXIdxContainerInfo *,
+ CXIdxClientContainer);
/**
* For retrieving a custom CXIdxClientEntity attached to an entity.
@@ -6574,8 +6556,8 @@ clang_index_getClientEntity(const CXIdxEntityInfo *);
/**
* For setting a custom CXIdxClientEntity attached to an entity.
*/
-CINDEX_LINKAGE void
-clang_index_setClientEntity(const CXIdxEntityInfo *, CXIdxClientEntity);
+CINDEX_LINKAGE void clang_index_setClientEntity(const CXIdxEntityInfo *,
+ CXIdxClientEntity);
/**
* An indexing action/session, to be applied to one or multiple
@@ -6663,18 +6645,12 @@ typedef enum {
*
* The rest of the parameters are the same as #clang_parseTranslationUnit.
*/
-CINDEX_LINKAGE int clang_indexSourceFile(CXIndexAction,
- CXClientData client_data,
- IndexerCallbacks *index_callbacks,
- unsigned index_callbacks_size,
- unsigned index_options,
- const char *source_filename,
- const char * const *command_line_args,
- int num_command_line_args,
- struct CXUnsavedFile *unsaved_files,
- unsigned num_unsaved_files,
- CXTranslationUnit *out_TU,
- unsigned TU_options);
+CINDEX_LINKAGE int clang_indexSourceFile(
+ CXIndexAction, CXClientData client_data, IndexerCallbacks *index_callbacks,
+ unsigned index_callbacks_size, unsigned index_options,
+ const char *source_filename, const char *const *command_line_args,
+ int num_command_line_args, struct CXUnsavedFile *unsaved_files,
+ unsigned num_unsaved_files, CXTranslationUnit *out_TU, unsigned TU_options);
/**
* Same as clang_indexSourceFile but requires a full command line
@@ -6704,12 +6680,9 @@ CINDEX_LINKAGE int clang_indexSourceFileFullArgv(
* \returns If there is a failure from which there is no recovery, returns
* non-zero, otherwise returns 0.
*/
-CINDEX_LINKAGE int clang_indexTranslationUnit(CXIndexAction,
- CXClientData client_data,
- IndexerCallbacks *index_callbacks,
- unsigned index_callbacks_size,
- unsigned index_options,
- CXTranslationUnit);
+CINDEX_LINKAGE int clang_indexTranslationUnit(
+ CXIndexAction, CXClientData client_data, IndexerCallbacks *index_callbacks,
+ unsigned index_callbacks_size, unsigned index_options, CXTranslationUnit);
/**
* Retrieve the CXIdxFile, file, line, column, and offset represented by
@@ -6721,8 +6694,7 @@ CINDEX_LINKAGE int clang_indexTranslationUnit(CXIndexAction,
*/
CINDEX_LINKAGE void clang_indexLoc_getFileLocation(CXIdxLoc loc,
CXIdxClientFile *indexFile,
- CXFile *file,
- unsigned *line,
+ CXFile *file, unsigned *line,
unsigned *column,
unsigned *offset);
@@ -6765,8 +6737,7 @@ typedef enum CXVisitorResult (*CXFieldVisitor)(CXCursor C,
* \returns a non-zero value if the traversal was terminated
* prematurely by the visitor returning \c CXFieldVisit_Break.
*/
-CINDEX_LINKAGE unsigned clang_Type_visitFields(CXType T,
- CXFieldVisitor visitor,
+CINDEX_LINKAGE unsigned clang_Type_visitFields(CXType T, CXFieldVisitor visitor,
CXClientData client_data);
/**
diff --git a/gnu/llvm/clang/include/clang-c/Platform.h b/gnu/llvm/clang/include/clang-c/Platform.h
index 3bb66bb0df4..67c1fff8ff7 100644
--- a/gnu/llvm/clang/include/clang-c/Platform.h
+++ b/gnu/llvm/clang/include/clang-c/Platform.h
@@ -18,14 +18,23 @@
LLVM_CLANG_C_EXTERN_C_BEGIN
-/* MSVC DLL import/export. */
-#ifdef _MSC_VER
- #ifdef _CINDEX_LIB_
- #define CINDEX_LINKAGE __declspec(dllexport)
- #else
- #define CINDEX_LINKAGE __declspec(dllimport)
+/* Windows DLL import/export. */
+#ifndef CINDEX_NO_EXPORTS
+ #define CINDEX_EXPORTS
+#endif
+#ifdef _WIN32
+ #ifdef CINDEX_EXPORTS
+ #ifdef _CINDEX_LIB_
+ #define CINDEX_LINKAGE __declspec(dllexport)
+ #else
+ #define CINDEX_LINKAGE __declspec(dllimport)
+ #endif
#endif
-#else
+#elif defined(CINDEX_EXPORTS) && defined(__GNUC__)
+ #define CINDEX_LINKAGE __attribute__((visibility("default")))
+#endif
+
+#ifndef CINDEX_LINKAGE
#define CINDEX_LINKAGE
#endif
diff --git a/gnu/llvm/clang/include/clang/AST/APValue.h b/gnu/llvm/clang/include/clang/AST/APValue.h
index 63359294ef6..cca92b5f823 100644
--- a/gnu/llvm/clang/include/clang/AST/APValue.h
+++ b/gnu/llvm/clang/include/clang/AST/APValue.h
@@ -372,7 +372,7 @@ public:
bool isAddrLabelDiff() const { return Kind == AddrLabelDiff; }
void dump() const;
- void dump(raw_ostream &OS) const;
+ void dump(raw_ostream &OS, const ASTContext &Context) const;
void printPretty(raw_ostream &OS, const ASTContext &Ctx, QualType Ty) const;
std::string getAsString(const ASTContext &Ctx, QualType Ty) const;
diff --git a/gnu/llvm/clang/include/clang/AST/ASTConcept.h b/gnu/llvm/clang/include/clang/AST/ASTConcept.h
index 3ebaad4eafd..71bf14a8786 100644
--- a/gnu/llvm/clang/include/clang/AST/ASTConcept.h
+++ b/gnu/llvm/clang/include/clang/AST/ASTConcept.h
@@ -193,4 +193,4 @@ public:
} // clang
-#endif // LLVM_CLANG_AST_ASTCONCEPT_H
\ No newline at end of file
+#endif // LLVM_CLANG_AST_ASTCONCEPT_H
diff --git a/gnu/llvm/clang/include/clang/AST/ASTContext.h b/gnu/llvm/clang/include/clang/AST/ASTContext.h
index f8403cf13c4..9020e6629d0 100644
--- a/gnu/llvm/clang/include/clang/AST/ASTContext.h
+++ b/gnu/llvm/clang/include/clang/AST/ASTContext.h
@@ -15,7 +15,7 @@
#define LLVM_CLANG_AST_ASTCONTEXT_H
#include "clang/AST/ASTContextAllocate.h"
-#include "clang/AST/ASTTypeTraits.h"
+#include "clang/AST/ASTFwd.h"
#include "clang/AST/CanonicalType.h"
#include "clang/AST/CommentCommandTraits.h"
#include "clang/AST/ComparisonCategories.h"
@@ -26,7 +26,6 @@
#include "clang/AST/NestedNameSpecifier.h"
#include "clang/AST/PrettyPrinter.h"
#include "clang/AST/RawCommentList.h"
-#include "clang/AST/TemplateBase.h"
#include "clang/AST/TemplateName.h"
#include "clang/AST/Type.h"
#include "clang/Basic/AddressSpaces.h"
@@ -40,7 +39,6 @@
#include "clang/Basic/SanitizerBlacklist.h"
#include "clang/Basic/SourceLocation.h"
#include "clang/Basic/Specifiers.h"
-#include "clang/Basic/TargetInfo.h"
#include "clang/Basic/XRayLists.h"
#include "llvm/ADT/APSInt.h"
#include "llvm/ADT/ArrayRef.h"
@@ -62,6 +60,7 @@
#include "llvm/Support/Allocator.h"
#include "llvm/Support/Casting.h"
#include "llvm/Support/Compiler.h"
+#include "llvm/Support/TypeSize.h"
#include
#include
#include
@@ -75,6 +74,7 @@
namespace llvm {
struct fltSemantics;
+template class SmallPtrSet;
} // namespace llvm
@@ -94,6 +94,9 @@ class CXXConstructorDecl;
class CXXMethodDecl;
class CXXRecordDecl;
class DiagnosticsEngine;
+class ParentMapContext;
+class DynTypedNode;
+class DynTypedNodeList;
class Expr;
class FixedPointSemantics;
class GlobalDecl;
@@ -102,6 +105,7 @@ class MangleNumberingContext;
class MaterializeTemporaryExpr;
class MemberSpecializationInfo;
class Module;
+struct MSGuidDeclParts;
class ObjCCategoryDecl;
class ObjCCategoryImplDecl;
class ObjCContainerDecl;
@@ -114,11 +118,13 @@ class ObjCPropertyDecl;
class ObjCPropertyImplDecl;
class ObjCProtocolDecl;
class ObjCTypeParamDecl;
+class OMPTraitInfo;
struct ParsedTargetAttr;
class Preprocessor;
class Stmt;
class StoredDeclsMap;
class TargetAttr;
+class TargetInfo;
class TemplateDecl;
class TemplateParameterList;
class TemplateTemplateParmDecl;
@@ -136,6 +142,7 @@ class Context;
} // namespace Builtin
enum BuiltinTemplateKind : int;
+enum OpenCLTypeKind : uint8_t;
namespace comments {
@@ -188,6 +195,8 @@ class ASTContext : public RefCountedBase {
DependentAddressSpaceTypes;
mutable llvm::FoldingSet VectorTypes;
mutable llvm::FoldingSet DependentVectorTypes;
+ mutable llvm::FoldingSet MatrixTypes;
+ mutable llvm::FoldingSet DependentSizedMatrixTypes;
mutable llvm::FoldingSet FunctionNoProtoTypes;
mutable llvm::ContextualFoldingSet
FunctionProtoTypes;
@@ -218,6 +227,8 @@ class ASTContext : public RefCountedBase {
mutable llvm::FoldingSet AtomicTypes;
llvm::FoldingSet AttributedTypes;
mutable llvm::FoldingSet PipeTypes;
+ mutable llvm::FoldingSet ExtIntTypes;
+ mutable llvm::FoldingSet DependentExtIntTypes;
mutable llvm::FoldingSet QualifiedTemplateNames;
mutable llvm::FoldingSet DependentTemplateNames;
@@ -264,6 +275,9 @@ class ASTContext : public RefCountedBase {
/// Mapping from __block VarDecls to BlockVarCopyInit.
llvm::DenseMap BlockVarCopyInits;
+ /// Mapping from GUIDs to the corresponding MSGuidDecl.
+ mutable llvm::FoldingSet MSGuidDecls;
+
/// Used to cleanups APValues stored in the AST.
mutable llvm::SmallVector APValueCleanups;
@@ -565,18 +579,9 @@ private:
const TargetInfo *AuxTarget = nullptr;
clang::PrintingPolicy PrintingPolicy;
std::unique_ptr InterpContext;
-
- ast_type_traits::TraversalKind Traversal = ast_type_traits::TK_AsIs;
+ std::unique_ptr ParentMapCtx;
public:
- ast_type_traits::TraversalKind getTraversalKind() const { return Traversal; }
- void setTraversalKind(ast_type_traits::TraversalKind TK) { Traversal = TK; }
-
- const Expr *traverseIgnored(const Expr *E) const;
- Expr *traverseIgnored(Expr *E) const;
- ast_type_traits::DynTypedNode
- traverseIgnored(const ast_type_traits::DynTypedNode &N) const;
-
IdentifierTable &Idents;
SelectorTable &Selectors;
Builtin::Context &BuiltinInfo;
@@ -587,46 +592,8 @@ public:
/// Returns the clang bytecode interpreter context.
interp::Context &getInterpContext();
- /// Container for either a single DynTypedNode or for an ArrayRef to
- /// DynTypedNode. For use with ParentMap.
- class DynTypedNodeList {
- using DynTypedNode = ast_type_traits::DynTypedNode;
-
- llvm::AlignedCharArrayUnion> Storage;
- bool IsSingleNode;
-
- public:
- DynTypedNodeList(const DynTypedNode &N) : IsSingleNode(true) {
- new (Storage.buffer) DynTypedNode(N);
- }
-
- DynTypedNodeList(ArrayRef A) : IsSingleNode(false) {
- new (Storage.buffer) ArrayRef(A);
- }
-
- const ast_type_traits::DynTypedNode *begin() const {
- if (!IsSingleNode)
- return reinterpret_cast *>(Storage.buffer)
- ->begin();
- return reinterpret_cast(Storage.buffer);
- }
-
- const ast_type_traits::DynTypedNode *end() const {
- if (!IsSingleNode)
- return reinterpret_cast *>(Storage.buffer)
- ->end();
- return reinterpret_cast(Storage.buffer) + 1;
- }
-
- size_t size() const { return end() - begin(); }
- bool empty() const { return begin() == end(); }
-
- const DynTypedNode &operator[](size_t N) const {
- assert(N < size() && "Out of bounds!");
- return *(begin() + N);
- }
- };
+ /// Returns the dynamic AST node parent map context.
+ ParentMapContext &getParentMapContext();
// A traversal scope limits the parts of the AST visible to certain analyses.
// RecursiveASTVisitor::TraverseAST will only visit reachable nodes, and
@@ -638,35 +605,9 @@ public:
std::vector getTraversalScope() const { return TraversalScope; }
void setTraversalScope(const std::vector &);
- /// Returns the parents of the given node (within the traversal scope).
- ///
- /// Note that this will lazily compute the parents of all nodes
- /// and store them for later retrieval. Thus, the first call is O(n)
- /// in the number of AST nodes.
- ///
- /// Caveats and FIXMEs:
- /// Calculating the parent map over all AST nodes will need to load the
- /// full AST. This can be undesirable in the case where the full AST is
- /// expensive to create (for example, when using precompiled header
- /// preambles). Thus, there are good opportunities for optimization here.
- /// One idea is to walk the given node downwards, looking for references
- /// to declaration contexts - once a declaration context is found, compute
- /// the parent map for the declaration context; if that can satisfy the
- /// request, loading the whole AST can be avoided. Note that this is made
- /// more complex by statements in templates having multiple parents - those
- /// problems can be solved by building closure over the templated parts of
- /// the AST, which also avoids touching large parts of the AST.
- /// Additionally, we will want to add an interface to already give a hint
- /// where to search for the parents, for example when looking at a statement
- /// inside a certain function.
- ///
- /// 'NodeT' can be one of Decl, Stmt, Type, TypeLoc,
- /// NestedNameSpecifier or NestedNameSpecifierLoc.
- template DynTypedNodeList getParents(const NodeT &Node) {
- return getParents(ast_type_traits::DynTypedNode::create(Node));
- }
-
- DynTypedNodeList getParents(const ast_type_traits::DynTypedNode &Node);
+ /// Forwards to get node parents from the ParentMapContext. New callers should
+ /// use ParentMapContext::getParents() directly.
+ template DynTypedNodeList getParents(const NodeT &Node);
const clang::PrintingPolicy &getPrintingPolicy() const {
return PrintingPolicy;
@@ -717,7 +658,7 @@ public:
/// getRealTypeForBitwidth -
/// sets floating point QualTy according to specified bitwidth.
/// Returns empty type if there is no appropriate target types.
- QualType getRealTypeForBitwidth(unsigned DestWidth) const;
+ QualType getRealTypeForBitwidth(unsigned DestWidth, bool ExplicitIEEE) const;
bool AtomicUsesUnsupportedLibcall(const AtomicExpr *E) const;
@@ -791,15 +732,7 @@ public:
RawComment *getRawCommentForDeclNoCache(const Decl *D) const;
public:
- RawCommentList &getRawCommentList() {
- return Comments;
- }
-
- void addComment(const RawComment &RC) {
- assert(LangOpts.RetainCommentsFromSystemHeaders ||
- !SourceMgr.isInSystemHeader(RC.getSourceRange().getBegin()));
- Comments.addComment(RC, LangOpts.CommentOpts, BumpAlloc);
- }
+ void addComment(const RawComment &RC);
/// Return the documentation comment attached to a given declaration.
/// Returns nullptr if no comment is attached.
@@ -959,7 +892,7 @@ public:
void addedLocalImportDecl(ImportDecl *Import);
static ImportDecl *getNextLocalImport(ImportDecl *Import) {
- return Import->NextLocalImport;
+ return Import->getNextLocalImport();
}
using import_range = llvm::iterator_range;
@@ -987,13 +920,7 @@ public:
/// Get the additional modules in which the definition \p Def has
/// been merged.
- ArrayRef getModulesWithMergedDefinition(const NamedDecl *Def) {
- auto MergedIt =
- MergedDefModules.find(cast(Def->getCanonicalDecl()));
- if (MergedIt == MergedDefModules.end())
- return None;
- return MergedIt->second;
- }
+ ArrayRef getModulesWithMergedDefinition(const NamedDecl *Def);
/// Add a declaration to the list of declarations that are initialized
/// for a module. This will typically be a global variable (with internal
@@ -1038,6 +965,7 @@ public:
CanQualType SatUnsignedShortFractTy, SatUnsignedFractTy,
SatUnsignedLongFractTy;
CanQualType HalfTy; // [OpenCL 6.1.1.1], ARM NEON
+ CanQualType BFloat16Ty;
CanQualType Float16Ty; // C11 extension ISO/IEC TS 18661-3
CanQualType FloatComplexTy, DoubleComplexTy, LongDoubleComplexTy;
CanQualType Float128ComplexTy;
@@ -1052,7 +980,8 @@ public:
#include "clang/Basic/OpenCLImageTypes.def"
CanQualType OCLSamplerTy, OCLEventTy, OCLClkEventTy;
CanQualType OCLQueueTy, OCLReserveIDTy;
- CanQualType OMPArraySectionTy;
+ CanQualType IncompleteMatrixIdxTy;
+ CanQualType OMPArraySectionTy, OMPArrayShapingTy, OMPIteratorTy;
#define EXT_OPAQUE_TYPE(ExtType, Id, Ext) \
CanQualType Id##Ty;
#include "clang/Basic/OpenCLExtensionTypes.def"
@@ -1066,7 +995,10 @@ public:
// Decl used to help define __builtin_va_list for some targets.
// The decl is built when constructing 'BuiltinVaListDecl'.
- mutable Decl *VaListTagDecl;
+ mutable Decl *VaListTagDecl = nullptr;
+
+ // Implicitly-declared type 'struct _GUID'.
+ mutable TagDecl *MSGuidTagDecl = nullptr;
ASTContext(LangOptions &LOpts, SourceManager &SM, IdentifierTable &idents,
SelectorTable &sels, Builtin::Context &builtins);
@@ -1278,12 +1210,20 @@ public:
/// Return a write_only pipe type for the specified type.
QualType getWritePipeType(QualType T) const;
+ /// Return an extended integer type with the specified signedness and bit
+ /// count.
+ QualType getExtIntType(bool Unsigned, unsigned NumBits) const;
+
+ /// Return a dependent extended integer type with the specified signedness and
+ /// bit count.
+ QualType getDependentExtIntType(bool Unsigned, Expr *BitsExpr) const;
+
/// Gets the struct used to keep track of the extended descriptor for
/// pointer to blocks.
QualType getBlockDescriptorExtendedType() const;
/// Map an AST Type to an OpenCLTypeKind enum value.
- TargetInfo::OpenCLTypeKind getOpenCLTypeKind(const Type *T) const;
+ OpenCLTypeKind getOpenCLTypeKind(const Type *T) const;
/// Get address space for OpenCL type.
LangAS getOpenCLTypeAddrSpace(const Type *T) const;
@@ -1358,6 +1298,27 @@ public:
/// Returns a vla type where known sizes are replaced with [*].
QualType getVariableArrayDecayedType(QualType Ty) const;
+ // Convenience struct to return information about a builtin vector type.
+ struct BuiltinVectorTypeInfo {
+ QualType ElementType;
+ llvm::ElementCount EC;
+ unsigned NumVectors;
+ BuiltinVectorTypeInfo(QualType ElementType, llvm::ElementCount EC,
+ unsigned NumVectors)
+ : ElementType(ElementType), EC(EC), NumVectors(NumVectors) {}
+ };
+
+ /// Returns the element type, element count and number of vectors
+ /// (in case of tuple) for a builtin vector type.
+ BuiltinVectorTypeInfo
+ getBuiltinVectorTypeInfo(const BuiltinType *VecTy) const;
+
+ /// Return the unique reference to a scalable vector type of the specified
+ /// element type and scalable number of elements.
+ ///
+ /// \pre \p EltTy must be a built-in type.
+ QualType getScalableVectorType(QualType EltTy, unsigned NumElts) const;
+
/// Return the unique reference to a vector type of the specified
/// element type and size.
///
@@ -1385,6 +1346,20 @@ public:
Expr *SizeExpr,
SourceLocation AttrLoc) const;
+ /// Return the unique reference to the matrix type of the specified element
+ /// type and size
+ ///
+ /// \pre \p ElementType must be a valid matrix element type (see
+ /// MatrixType::isValidElementType).
+ QualType getConstantMatrixType(QualType ElementType, unsigned NumRows,
+ unsigned NumColumns) const;
+
+ /// Return the unique reference to the matrix type of the specified element
+ /// type and size
+ QualType getDependentSizedMatrixType(QualType ElementType, Expr *RowExpr,
+ Expr *ColumnExpr,
+ SourceLocation AttrLoc) const;
+
QualType getDependentAddressSpaceType(QualType PointeeType,
Expr *AddrSpaceExpr,
SourceLocation AttrLoc) const;
@@ -1518,6 +1493,8 @@ public:
QualType getObjCTypeParamType(const ObjCTypeParamDecl *Decl,
ArrayRef protocols) const;
+ void adjustObjCTypeParamBoundType(const ObjCTypeParamDecl *Orig,
+ ObjCTypeParamDecl *New) const;
bool ObjCObjectAdoptsQTypeProtocols(QualType QT, ObjCInterfaceDecl *Decl);
@@ -1713,23 +1690,9 @@ public:
return NSCopyingName;
}
- CanQualType getNSUIntegerType() const {
- assert(Target && "Expected target to be initialized");
- const llvm::Triple &T = Target->getTriple();
- // Windows is LLP64 rather than LP64
- if (T.isOSWindows() && T.isArch64Bit())
- return UnsignedLongLongTy;
- return UnsignedLongTy;
- }
+ CanQualType getNSUIntegerType() const;
- CanQualType getNSIntegerType() const {
- assert(Target && "Expected target to be initialized");
- const llvm::Triple &T = Target->getTriple();
- // Windows is LLP64 rather than LP64
- if (T.isOSWindows() && T.isArch64Bit())
- return LongLongTy;
- return LongTy;
- }
+ CanQualType getNSIntegerType() const;
/// Retrieve the identifier 'bool'.
IdentifierInfo *getBoolName() const {
@@ -1944,6 +1907,15 @@ public:
return getTypeDeclType(getBuiltinMSVaListDecl());
}
+ /// Retrieve the implicitly-predeclared 'struct _GUID' declaration.
+ TagDecl *getMSGuidTagDecl() const { return MSGuidTagDecl; }
+
+ /// Retrieve the implicitly-predeclared 'struct _GUID' type.
+ QualType getMSGuidType() const {
+ assert(MSGuidTagDecl && "asked for GUID type but MS extensions disabled");
+ return getTagDeclType(MSGuidTagDecl);
+ }
+
/// Return whether a declaration to a builtin is allowed to be
/// overloaded/redeclared.
bool canBuiltinBeRedeclared(const FunctionDecl *) const;
@@ -2207,9 +2179,7 @@ public:
/// Return the alignment (in bytes) of the thrown exception object. This is
/// only meaningful for targets that allocate C++ exceptions in a system
/// runtime, such as those using the Itanium C++ ABI.
- CharUnits getExnObjectAlignment() const {
- return toCharUnitsFromBits(Target->getExnObjectAlignment());
- }
+ CharUnits getExnObjectAlignment() const;
/// Get or compute information about the layout of the specified
/// record (struct/union/class) \p D, which indicates its size and field
@@ -2627,7 +2597,7 @@ public:
QualType mergeTypes(QualType, QualType, bool OfBlockPointer=false,
bool Unqualified = false, bool BlockReturnType = false);
QualType mergeFunctionTypes(QualType, QualType, bool OfBlockPointer=false,
- bool Unqualified = false);
+ bool Unqualified = false, bool AllowCXX = false);
QualType mergeFunctionParameterTypes(QualType, QualType,
bool OfBlockPointer = false,
bool Unqualified = false);
@@ -2848,6 +2818,10 @@ public:
/// PredefinedExpr to cache evaluated results.
StringLiteral *getPredefinedStringLiteralFromCache(StringRef Key) const;
+ /// Return a declaration for the global GUID object representing the given
+ /// GUID value.
+ MSGuidDecl *getMSGuidDecl(MSGuidDeclParts Parts) const;
+
/// Parses the target attributes passed in, and returns only the ones that are
/// valid feature names.
ParsedTargetAttr filterFunctionTargetAttrs(const TargetAttr *TD) const;
@@ -3026,8 +3000,6 @@ private:
llvm::PointerIntPair LastSDM;
std::vector TraversalScope;
- class ParentMap;
- std::map> Parents;
std::unique_ptr VTContext;
@@ -3040,6 +3012,7 @@ public:
PSF_Write = 0x2,
PSF_Execute = 0x4,
PSF_Implicit = 0x8,
+ PSF_ZeroInit = 0x10,
PSF_Invalid = 0x80000000U,
};
@@ -3057,8 +3030,20 @@ public:
};
llvm::StringMap SectionInfos;
+
+ /// Return a new OMPTraitInfo object owned by this context.
+ OMPTraitInfo &getNewOMPTraitInfo();
+
+private:
+ /// All OMPTraitInfo objects live in this collection, one per
+ /// `pragma omp [begin] declare variant` directive.
+ SmallVector, 4> OMPTraitInfoVector;
};
+/// Insertion operator for diagnostics.
+const DiagnosticBuilder &operator<<(const DiagnosticBuilder &DB,
+ const ASTContext::SectionInfo &Section);
+
/// Utility function for constructing a nullary selector.
inline Selector GetNullarySelector(StringRef name, ASTContext &Ctx) {
IdentifierInfo* II = &Ctx.Idents.get(name);
@@ -3071,22 +3056,6 @@ inline Selector GetUnarySelector(StringRef name, ASTContext &Ctx) {
return Ctx.Selectors.getSelector(1, &II);
}
-class TraversalKindScope {
- ASTContext &Ctx;
- ast_type_traits::TraversalKind TK = ast_type_traits::TK_AsIs;
-
-public:
- TraversalKindScope(ASTContext &Ctx,
- llvm::Optional ScopeTK)
- : Ctx(Ctx) {
- TK = Ctx.getTraversalKind();
- if (ScopeTK)
- Ctx.setTraversalKind(*ScopeTK);
- }
-
- ~TraversalKindScope() { Ctx.setTraversalKind(TK); }
-};
-
} // namespace clang
// operator new and delete aren't allowed inside namespaces.
diff --git a/gnu/llvm/clang/include/clang/AST/ASTDumper.h b/gnu/llvm/clang/include/clang/AST/ASTDumper.h
index 61202f057a8..a154bc2db3a 100644
--- a/gnu/llvm/clang/include/clang/AST/ASTDumper.h
+++ b/gnu/llvm/clang/include/clang/AST/ASTDumper.h
@@ -11,6 +11,7 @@
#include "clang/AST/ASTNodeTraverser.h"
#include "clang/AST/TextNodeDumper.h"
+#include "clang/Basic/SourceManager.h"
namespace clang {
@@ -23,18 +24,11 @@ class ASTDumper : public ASTNodeTraverser {
const bool ShowColors;
public:
- ASTDumper(raw_ostream &OS, const comments::CommandTraits *Traits,
- const SourceManager *SM)
- : ASTDumper(OS, Traits, SM, SM && SM->getDiagnostics().getShowColors()) {}
-
- ASTDumper(raw_ostream &OS, const comments::CommandTraits *Traits,
- const SourceManager *SM, bool ShowColors)
- : ASTDumper(OS, Traits, SM, ShowColors, LangOptions()) {}
- ASTDumper(raw_ostream &OS, const comments::CommandTraits *Traits,
- const SourceManager *SM, bool ShowColors,
- const PrintingPolicy &PrintPolicy)
- : NodeDumper(OS, ShowColors, SM, PrintPolicy, Traits), OS(OS),
- ShowColors(ShowColors) {}
+ ASTDumper(raw_ostream &OS, const ASTContext &Context, bool ShowColors)
+ : NodeDumper(OS, Context, ShowColors), OS(OS), ShowColors(ShowColors) {}
+
+ ASTDumper(raw_ostream &OS, bool ShowColors)
+ : NodeDumper(OS, ShowColors), OS(OS), ShowColors(ShowColors) {}
TextNodeDumper &doGetNodeDelegate() { return NodeDumper; }
diff --git a/gnu/llvm/clang/include/clang/AST/ASTDumperUtils.h b/gnu/llvm/clang/include/clang/AST/ASTDumperUtils.h
index 55a085449a9..1dce913049a 100644
--- a/gnu/llvm/clang/include/clang/AST/ASTDumperUtils.h
+++ b/gnu/llvm/clang/include/clang/AST/ASTDumperUtils.h
@@ -62,6 +62,8 @@ static const TerminalColor LocationColor = {llvm::raw_ostream::YELLOW, false};
static const TerminalColor ValueKindColor = {llvm::raw_ostream::CYAN, false};
// bitfield/objcproperty/objcsubscript/vectorcomponent
static const TerminalColor ObjectKindColor = {llvm::raw_ostream::CYAN, false};
+// contains-errors
+static const TerminalColor ErrorsColor = {llvm::raw_ostream::RED, true};
// Null statements
static const TerminalColor NullColor = {llvm::raw_ostream::BLUE, false};
diff --git a/gnu/llvm/clang/include/clang/AST/ASTFwd.h b/gnu/llvm/clang/include/clang/AST/ASTFwd.h
index 5a891817b33..65319a19728 100644
--- a/gnu/llvm/clang/include/clang/AST/ASTFwd.h
+++ b/gnu/llvm/clang/include/clang/AST/ASTFwd.h
@@ -27,8 +27,8 @@ class Type;
#include "clang/AST/TypeNodes.inc"
class CXXCtorInitializer;
class OMPClause;
-#define OPENMP_CLAUSE(KIND, CLASSNAME) class CLASSNAME;
-#include "clang/Basic/OpenMPKinds.def"
+#define OMP_CLAUSE_CLASS(Enum, Str, Class) class Class;
+#include "llvm/Frontend/OpenMP/OMPKinds.def"
} // end namespace clang
diff --git a/gnu/llvm/clang/include/clang/AST/ASTImporter.h b/gnu/llvm/clang/include/clang/AST/ASTImporter.h
index 490b34bf95e..205d7ec6775 100644
--- a/gnu/llvm/clang/include/clang/AST/ASTImporter.h
+++ b/gnu/llvm/clang/include/clang/AST/ASTImporter.h
@@ -16,6 +16,7 @@
#include "clang/AST/DeclBase.h"
#include "clang/AST/DeclarationName.h"
+#include "clang/AST/ExprCXX.h"
#include "clang/AST/NestedNameSpecifier.h"
#include "clang/AST/TemplateName.h"
#include "clang/AST/Type.h"
@@ -349,6 +350,10 @@ class TypeSourceInfo;
return ToOrErr.takeError();
}
+ /// Import cleanup objects owned by ExprWithCleanup.
+ llvm::Expected
+ Import(ExprWithCleanups::CleanupObject From);
+
/// Import the given type from the "from" context into the "to"
/// context. A null type is imported as a null type (no error).
///
diff --git a/gnu/llvm/clang/include/clang/AST/ASTNodeTraverser.h b/gnu/llvm/clang/include/clang/AST/ASTNodeTraverser.h
index 9ebf64a12af..26656b7162b 100644
--- a/gnu/llvm/clang/include/clang/AST/ASTNodeTraverser.h
+++ b/gnu/llvm/clang/include/clang/AST/ASTNodeTraverser.h
@@ -15,16 +15,20 @@
#ifndef LLVM_CLANG_AST_ASTNODETRAVERSER_H
#define LLVM_CLANG_AST_ASTNODETRAVERSER_H
+#include "clang/AST/ASTTypeTraits.h"
#include "clang/AST/AttrVisitor.h"
#include "clang/AST/CommentVisitor.h"
#include "clang/AST/DeclVisitor.h"
#include "clang/AST/LocInfoType.h"
#include "clang/AST/StmtVisitor.h"
#include "clang/AST/TemplateArgumentVisitor.h"
+#include "clang/AST/Type.h"
#include "clang/AST/TypeVisitor.h"
namespace clang {
+class APValue;
+
/**
ASTNodeTraverser traverses the Clang AST for dumping purposes.
@@ -49,6 +53,7 @@ struct {
void Visit(const OMPClause *C);
void Visit(const BlockDecl::Capture &C);
void Visit(const GenericSelectionExpr::ConstAssociation &A);
+ void Visit(const APValue &Value, QualType Ty);
};
*/
template
@@ -65,8 +70,7 @@ class ASTNodeTraverser
/// not already been loaded.
bool Deserialize = false;
- ast_type_traits::TraversalKind Traversal =
- ast_type_traits::TraversalKind::TK_AsIs;
+ TraversalKind Traversal = TraversalKind::TK_AsIs;
NodeDelegateType &getNodeDelegate() {
return getDerived().doGetNodeDelegate();
@@ -77,7 +81,7 @@ public:
void setDeserialize(bool D) { Deserialize = D; }
bool getDeserialize() const { return Deserialize; }
- void SetTraversalKind(ast_type_traits::TraversalKind TK) { Traversal = TK; }
+ void SetTraversalKind(TraversalKind TK) { Traversal = TK; }
void Visit(const Decl *D) {
getNodeDelegate().AddChild([=] {
@@ -108,12 +112,12 @@ public:
if (auto *E = dyn_cast_or_null(S)) {
switch (Traversal) {
- case ast_type_traits::TK_AsIs:
+ case TK_AsIs:
break;
- case ast_type_traits::TK_IgnoreImplicitCastsAndParentheses:
+ case TK_IgnoreImplicitCastsAndParentheses:
S = E->IgnoreParenImpCasts();
break;
- case ast_type_traits::TK_IgnoreUnlessSpelledInSource:
+ case TK_IgnoreUnlessSpelledInSource:
S = E->IgnoreUnlessSpelledInSource();
break;
}
@@ -131,8 +135,7 @@ public:
if (isa(S) || isa(S))
return;
- if (isa(S) &&
- Traversal == ast_type_traits::TK_IgnoreUnlessSpelledInSource)
+ if (isa(S) && Traversal == TK_IgnoreUnlessSpelledInSource)
return;
for (const Stmt *SubStmt : S->children())
@@ -212,6 +215,10 @@ public:
});
}
+ void Visit(const APValue &Value, QualType Ty) {
+ getNodeDelegate().AddChild([=] { getNodeDelegate().Visit(Value, Ty); });
+ }
+
void Visit(const comments::Comment *C, const comments::FullComment *FC) {
getNodeDelegate().AddChild([=] {
getNodeDelegate().Visit(C, FC);
@@ -228,7 +235,7 @@ public:
});
}
- void Visit(const ast_type_traits::DynTypedNode &N) {
+ void Visit(const DynTypedNode &N) {
// FIXME: Improve this with a switch or a visitor pattern.
if (const auto *D = N.get())
Visit(D);
@@ -353,8 +360,6 @@ public:
void VisitTemplateSpecializationType(const TemplateSpecializationType *T) {
for (const auto &Arg : *T)
Visit(Arg);
- if (T->isTypeAlias())
- Visit(T->getAliasedType());
}
void VisitObjCObjectPointerType(const ObjCObjectPointerType *T) {
Visit(T->getPointeeType());
@@ -658,7 +663,7 @@ public:
}
void VisitLambdaExpr(const LambdaExpr *Node) {
- if (Traversal == ast_type_traits::TK_IgnoreUnlessSpelledInSource) {
+ if (Traversal == TK_IgnoreUnlessSpelledInSource) {
for (unsigned I = 0, N = Node->capture_size(); I != N; ++I) {
const auto *C = Node->capture_begin() + I;
if (!C->isExplicit())
@@ -683,6 +688,15 @@ public:
Visit(A);
}
+ void VisitSubstNonTypeTemplateParmExpr(const SubstNonTypeTemplateParmExpr *E) {
+ Visit(E->getParameter());
+ }
+ void VisitSubstNonTypeTemplateParmPackExpr(
+ const SubstNonTypeTemplateParmPackExpr *E) {
+ Visit(E->getParameterPack());
+ Visit(E->getArgumentPack());
+ }
+
void VisitObjCAtCatchStmt(const ObjCAtCatchStmt *Node) {
if (const VarDecl *CatchParam = Node->getCatchParamDecl())
Visit(CatchParam);
@@ -691,6 +705,11 @@ public:
void VisitExpressionTemplateArgument(const TemplateArgument &TA) {
Visit(TA.getAsExpr());
}
+
+ void VisitTypeTemplateArgument(const TemplateArgument &TA) {
+ Visit(TA.getAsType());
+ }
+
void VisitPackTemplateArgument(const TemplateArgument &TA) {
for (const auto &TArg : TA.pack_elements())
Visit(TArg);
diff --git a/gnu/llvm/clang/include/clang/AST/ASTTypeTraits.h b/gnu/llvm/clang/include/clang/AST/ASTTypeTraits.h
index 1a12281d039..328b7bce6ba 100644
--- a/gnu/llvm/clang/include/clang/AST/ASTTypeTraits.h
+++ b/gnu/llvm/clang/include/clang/AST/ASTTypeTraits.h
@@ -16,6 +16,7 @@
#define LLVM_CLANG_AST_ASTTYPETRAITS_H
#include "clang/AST/ASTFwd.h"
+#include "clang/AST/DeclCXX.h"
#include "clang/AST/NestedNameSpecifier.h"
#include "clang/AST/TemplateBase.h"
#include "clang/AST/TypeLoc.h"
@@ -33,8 +34,6 @@ namespace clang {
struct PrintingPolicy;
-namespace ast_type_traits {
-
/// Defines how we descend a level in the AST when we pass
/// through expressions.
enum TraversalKind {
@@ -138,6 +137,7 @@ private:
NKI_QualType,
NKI_TypeLoc,
NKI_LastKindWithoutPointerIdentity = NKI_TypeLoc,
+ NKI_CXXBaseSpecifier,
NKI_CXXCtorInitializer,
NKI_NestedNameSpecifier,
NKI_Decl,
@@ -150,8 +150,8 @@ private:
#define TYPE(DERIVED, BASE) NKI_##DERIVED##Type,
#include "clang/AST/TypeNodes.inc"
NKI_OMPClause,
-#define OPENMP_CLAUSE(TextualSpelling, Class) NKI_##Class,
-#include "clang/Basic/OpenMPKinds.def"
+#define OMP_CLAUSE_CLASS(Enum, Str, Class) NKI_##Class,
+#include "llvm/Frontend/OpenMP/OMPKinds.def"
NKI_NumberOfKinds
};
@@ -200,14 +200,15 @@ KIND_TO_KIND_ID(Decl)
KIND_TO_KIND_ID(Stmt)
KIND_TO_KIND_ID(Type)
KIND_TO_KIND_ID(OMPClause)
+KIND_TO_KIND_ID(CXXBaseSpecifier)
#define DECL(DERIVED, BASE) KIND_TO_KIND_ID(DERIVED##Decl)
#include "clang/AST/DeclNodes.inc"
#define STMT(DERIVED, BASE) KIND_TO_KIND_ID(DERIVED)
#include "clang/AST/StmtNodes.inc"
#define TYPE(DERIVED, BASE) KIND_TO_KIND_ID(DERIVED##Type)
#include "clang/AST/TypeNodes.inc"
-#define OPENMP_CLAUSE(TextualSpelling, Class) KIND_TO_KIND_ID(Class)
-#include "clang/Basic/OpenMPKinds.def"
+#define OMP_CLAUSE_CLASS(Enum, Str, Class) KIND_TO_KIND_ID(Class)
+#include "llvm/Frontend/OpenMP/OMPKinds.def"
#undef KIND_TO_KIND_ID
inline raw_ostream &operator<<(raw_ostream &OS, ASTNodeKind K) {
@@ -277,7 +278,7 @@ public:
void print(llvm::raw_ostream &OS, const PrintingPolicy &PP) const;
/// Dumps the node to the given output stream.
- void dump(llvm::raw_ostream &OS, SourceManager &SM) const;
+ void dump(llvm::raw_ostream &OS, const ASTContext &Context) const;
/// For nodes which represent textual entities in the source code,
/// return their SourceRange. For all other nodes, return SourceRange().
@@ -465,22 +466,22 @@ private:
template
struct DynTypedNode::BaseConverter<
- T, typename std::enable_if::value>::type>
+ T, std::enable_if_t::value>>
: public DynCastPtrConverter {};
template
struct DynTypedNode::BaseConverter<
- T, typename std::enable_if::value>::type>
+ T, std::enable_if_t::value>>
: public DynCastPtrConverter {};
template
struct DynTypedNode::BaseConverter<
- T, typename std::enable_if::value>::type>
+ T, std::enable_if_t::value>>
: public DynCastPtrConverter {};
template
struct DynTypedNode::BaseConverter<
- T, typename std::enable_if::value>::type>
+ T, std::enable_if_t::value>>
: public DynCastPtrConverter {};
template <>
@@ -512,6 +513,10 @@ template <>
struct DynTypedNode::BaseConverter<
TypeLoc, void> : public ValueConverter {};
+template <>
+struct DynTypedNode::BaseConverter
+ : public PtrConverter {};
+
// The only operation we allow on unsupported types is \c get.
// This allows to conveniently use \c DynTypedNode when having an arbitrary
// AST node that is not supported, but prevents misuse - a user cannot create
@@ -522,18 +527,29 @@ template struct DynTypedNode::BaseConverter {
}
};
-} // end namespace ast_type_traits
+// Previously these types were defined in the clang::ast_type_traits namespace.
+// Provide typedefs so that legacy code can be fixed asynchronously.
+namespace ast_type_traits {
+using DynTypedNode = ::clang::DynTypedNode;
+using ASTNodeKind = ::clang::ASTNodeKind;
+using TraversalKind = ::clang::TraversalKind;
+
+constexpr TraversalKind TK_AsIs = ::clang::TK_AsIs;
+constexpr TraversalKind TK_IgnoreImplicitCastsAndParentheses =
+ ::clang::TK_IgnoreImplicitCastsAndParentheses;
+constexpr TraversalKind TK_IgnoreUnlessSpelledInSource =
+ ::clang::TK_IgnoreUnlessSpelledInSource;
+} // namespace ast_type_traits
+
} // end namespace clang
namespace llvm {
template <>
-struct DenseMapInfo
- : clang::ast_type_traits::ASTNodeKind::DenseMapInfo {};
+struct DenseMapInfo : clang::ASTNodeKind::DenseMapInfo {};
template <>
-struct DenseMapInfo
- : clang::ast_type_traits::DynTypedNode::DenseMapInfo {};
+struct DenseMapInfo : clang::DynTypedNode::DenseMapInfo {};
} // end namespace llvm
diff --git a/gnu/llvm/clang/include/clang/AST/Attr.h b/gnu/llvm/clang/include/clang/AST/Attr.h
index bbaa46363d9..1b457337d65 100644
--- a/gnu/llvm/clang/include/clang/AST/Attr.h
+++ b/gnu/llvm/clang/include/clang/AST/Attr.h
@@ -13,13 +13,13 @@
#ifndef LLVM_CLANG_AST_ATTR_H
#define LLVM_CLANG_AST_ATTR_H
-#include "clang/AST/ASTContextAllocate.h" // For Attrs.inc
+#include "clang/AST/ASTFwd.h"
#include "clang/AST/AttrIterator.h"
#include "clang/AST/Decl.h"
-#include "clang/AST/Expr.h"
#include "clang/AST/Type.h"
#include "clang/Basic/AttrKinds.h"
#include "clang/Basic/AttributeCommonInfo.h"
+#include "clang/Basic/LangOptions.h"
#include "clang/Basic/LLVM.h"
#include "clang/Basic/OpenMPKinds.h"
#include "clang/Basic/Sanitizers.h"
@@ -40,6 +40,7 @@ class Expr;
class QualType;
class FunctionDecl;
class TypeSourceInfo;
+class OMPTraitInfo;
/// Attr - This represents one attribute.
class Attr : public AttributeCommonInfo {
diff --git a/gnu/llvm/clang/include/clang/AST/BuiltinTypes.def b/gnu/llvm/clang/include/clang/AST/BuiltinTypes.def
index 74a45ee4ccc..039765dfdfe 100644
--- a/gnu/llvm/clang/include/clang/AST/BuiltinTypes.def
+++ b/gnu/llvm/clang/include/clang/AST/BuiltinTypes.def
@@ -212,6 +212,9 @@ FLOATING_TYPE(LongDouble, LongDoubleTy)
// '_Float16'
FLOATING_TYPE(Float16, HalfTy)
+// '__bf16'
+FLOATING_TYPE(BFloat16, BFloat16Ty)
+
// '__float128'
FLOATING_TYPE(Float128, Float128Ty)
@@ -310,11 +313,20 @@ PLACEHOLDER_TYPE(BuiltinFn, BuiltinFnTy)
// context.
PLACEHOLDER_TYPE(ARCUnbridgedCast, ARCUnbridgedCastTy)
+// A placeholder type for incomplete matrix index expressions.
+PLACEHOLDER_TYPE(IncompleteMatrixIdx, IncompleteMatrixIdxTy)
+
// A placeholder type for OpenMP array sections.
PLACEHOLDER_TYPE(OMPArraySection, OMPArraySectionTy)
+// A placeholder type for OpenMP array shaping operation.
+PLACEHOLDER_TYPE(OMPArrayShaping, OMPArrayShapingTy)
+
+// A placeholder type for OpenMP iterators.
+PLACEHOLDER_TYPE(OMPIterator, OMPIteratorTy)
+
#ifdef LAST_BUILTIN_TYPE
-LAST_BUILTIN_TYPE(OMPArraySection)
+LAST_BUILTIN_TYPE(OMPIterator)
#undef LAST_BUILTIN_TYPE
#endif
diff --git a/gnu/llvm/clang/include/clang/AST/CXXInheritance.h b/gnu/llvm/clang/include/clang/AST/CXXInheritance.h
index f223c1f2f4f..8b1bcb367b3 100644
--- a/gnu/llvm/clang/include/clang/AST/CXXInheritance.h
+++ b/gnu/llvm/clang/include/clang/AST/CXXInheritance.h
@@ -119,7 +119,7 @@ class CXXBasePaths {
friend class CXXRecordDecl;
/// The type from which this search originated.
- CXXRecordDecl *Origin = nullptr;
+ const CXXRecordDecl *Origin = nullptr;
/// Paths - The actual set of paths that can be taken from the
/// derived class to the same base class.
@@ -225,8 +225,8 @@ public:
/// Retrieve the type from which this base-paths search
/// began
- CXXRecordDecl *getOrigin() const { return Origin; }
- void setOrigin(CXXRecordDecl *Rec) { Origin = Rec; }
+ const CXXRecordDecl *getOrigin() const { return Origin; }
+ void setOrigin(const CXXRecordDecl *Rec) { Origin = Rec; }
/// Clear the base-paths results.
void clear();
diff --git a/gnu/llvm/clang/include/clang/AST/CXXRecordDeclDefinitionBits.def b/gnu/llvm/clang/include/clang/AST/CXXRecordDeclDefinitionBits.def
index bd4d8247aec..33e65f8ebf4 100644
--- a/gnu/llvm/clang/include/clang/AST/CXXRecordDeclDefinitionBits.def
+++ b/gnu/llvm/clang/include/clang/AST/CXXRecordDeclDefinitionBits.def
@@ -140,6 +140,7 @@ FIELD(HasInheritedAssignment, 1, NO_MERGE)
/// @{
FIELD(NeedOverloadResolutionForCopyConstructor, 1, NO_MERGE)
FIELD(NeedOverloadResolutionForMoveConstructor, 1, NO_MERGE)
+FIELD(NeedOverloadResolutionForCopyAssignment, 1, NO_MERGE)
FIELD(NeedOverloadResolutionForMoveAssignment, 1, NO_MERGE)
FIELD(NeedOverloadResolutionForDestructor, 1, NO_MERGE)
/// @}
@@ -149,6 +150,7 @@ FIELD(NeedOverloadResolutionForDestructor, 1, NO_MERGE)
/// @{
FIELD(DefaultedCopyConstructorIsDeleted, 1, NO_MERGE)
FIELD(DefaultedMoveConstructorIsDeleted, 1, NO_MERGE)
+FIELD(DefaultedCopyAssignmentIsDeleted, 1, NO_MERGE)
FIELD(DefaultedMoveAssignmentIsDeleted, 1, NO_MERGE)
FIELD(DefaultedDestructorIsDeleted, 1, NO_MERGE)
/// @}
diff --git a/gnu/llvm/clang/include/clang/AST/CanonicalType.h b/gnu/llvm/clang/include/clang/AST/CanonicalType.h
index 2e00d344533..488284713bc 100644
--- a/gnu/llvm/clang/include/clang/AST/CanonicalType.h
+++ b/gnu/llvm/clang/include/clang/AST/CanonicalType.h
@@ -74,7 +74,7 @@ public:
/// canonical type pointers.
template
CanQual(const CanQual &Other,
- typename std::enable_if::value, int>::type = 0);
+ std::enable_if_t::value, int> = 0);
/// Retrieve the underlying type pointer, which refers to a
/// canonical type.
@@ -264,6 +264,8 @@ public:
// Type predicates
LLVM_CLANG_CANPROXY_SIMPLE_ACCESSOR(bool, isObjectType)
LLVM_CLANG_CANPROXY_SIMPLE_ACCESSOR(bool, isIncompleteType)
+ LLVM_CLANG_CANPROXY_SIMPLE_ACCESSOR(bool, isSizelessType)
+ LLVM_CLANG_CANPROXY_SIMPLE_ACCESSOR(bool, isSizelessBuiltinType)
LLVM_CLANG_CANPROXY_SIMPLE_ACCESSOR(bool, isIncompleteOrObjectType)
LLVM_CLANG_CANPROXY_SIMPLE_ACCESSOR(bool, isVariablyModifiedType)
LLVM_CLANG_CANPROXY_SIMPLE_ACCESSOR(bool, isIntegerType)
@@ -384,7 +386,7 @@ struct PointerLikeTypeTraits> {
}
// qualifier information is encoded in the low bits.
- enum { NumLowBitsAvailable = 0 };
+ static constexpr int NumLowBitsAvailable = 0;
};
} // namespace llvm
diff --git a/gnu/llvm/clang/include/clang/AST/Comment.h b/gnu/llvm/clang/include/clang/AST/Comment.h
index cd9c1ce2bce..54a4b0a9cfe 100644
--- a/gnu/llvm/clang/include/clang/AST/Comment.h
+++ b/gnu/llvm/clang/include/clang/AST/Comment.h
@@ -209,9 +209,7 @@ public:
void dump() const;
void dumpColor() const;
- void dump(const ASTContext &Context) const;
- void dump(raw_ostream &OS, const CommandTraits *Traits,
- const SourceManager *SM) const;
+ void dump(raw_ostream &OS, const ASTContext &Context) const;
SourceRange getSourceRange() const LLVM_READONLY { return Range; }
diff --git a/gnu/llvm/clang/include/clang/AST/CommentCommands.td b/gnu/llvm/clang/include/clang/AST/CommentCommands.td
index d387df7ce57..fbbfc9f7e0b 100644
--- a/gnu/llvm/clang/include/clang/AST/CommentCommands.td
+++ b/gnu/llvm/clang/include/clang/AST/CommentCommands.td
@@ -87,6 +87,7 @@ def P : InlineCommand<"p">;
def A : InlineCommand<"a">;
def E : InlineCommand<"e">;
def Em : InlineCommand<"em">;
+def Ref : InlineCommand<"ref">;
def Anchor : InlineCommand<"anchor">;
//===----------------------------------------------------------------------===//
@@ -205,7 +206,6 @@ def Paragraph : VerbatimLineCommand<"paragraph">;
def Mainpage : VerbatimLineCommand<"mainpage">;
def Subpage : VerbatimLineCommand<"subpage">;
-def Ref : VerbatimLineCommand<"ref">;
def Relates : VerbatimLineCommand<"relates">;
def Related : VerbatimLineCommand<"related">;
diff --git a/gnu/llvm/clang/include/clang/AST/CommentSema.h b/gnu/llvm/clang/include/clang/AST/CommentSema.h
index 307618fa536..6dfe0f4920d 100644
--- a/gnu/llvm/clang/include/clang/AST/CommentSema.h
+++ b/gnu/llvm/clang/include/clang/AST/CommentSema.h
@@ -217,6 +217,9 @@ public:
bool isTemplateOrSpecialization();
bool isRecordLikeDecl();
bool isClassOrStructDecl();
+ /// \return \c true if the declaration that this comment is attached to
+ /// declares either struct, class or tag typedef.
+ bool isClassOrStructOrTagTypedefDecl();
bool isUnionDecl();
bool isObjCInterfaceDecl();
bool isObjCProtocolDecl();
diff --git a/gnu/llvm/clang/include/clang/AST/ComputeDependence.h b/gnu/llvm/clang/include/clang/AST/ComputeDependence.h
new file mode 100644
index 00000000000..ac2daf9eb95
--- /dev/null
+++ b/gnu/llvm/clang/include/clang/AST/ComputeDependence.h
@@ -0,0 +1,194 @@
+//===--- ComputeDependence.h -------------------------------------- C++ -*-===//
+//
+// 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
+//
+//===----------------------------------------------------------------------===//
+//
+// Calculate various template dependency flags for the AST.
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef LLVM_CLANG_AST_COMPUTE_DEPENDENCE_H
+#define LLVM_CLANG_AST_COMPUTE_DEPENDENCE_H
+
+#include "clang/AST/DependenceFlags.h"
+#include "clang/Basic/ExceptionSpecificationType.h"
+#include "llvm/ADT/ArrayRef.h"
+
+namespace clang {
+
+class ASTContext;
+
+class Expr;
+class FullExpr;
+class OpaqueValueExpr;
+class ParenExpr;
+class UnaryOperator;
+class UnaryExprOrTypeTraitExpr;
+class ArraySubscriptExpr;
+class MatrixSubscriptExpr;
+class CompoundLiteralExpr;
+class CastExpr;
+class BinaryOperator;
+class ConditionalOperator;
+class BinaryConditionalOperator;
+class StmtExpr;
+class ConvertVectorExpr;
+class VAArgExpr;
+class ChooseExpr;
+class NoInitExpr;
+class ArrayInitLoopExpr;
+class ImplicitValueInitExpr;
+class InitListExpr;
+class ExtVectorElementExpr;
+class BlockExpr;
+class AsTypeExpr;
+class DeclRefExpr;
+class RecoveryExpr;
+class CXXRewrittenBinaryOperator;
+class CXXStdInitializerListExpr;
+class CXXTypeidExpr;
+class MSPropertyRefExpr;
+class MSPropertySubscriptExpr;
+class CXXUuidofExpr;
+class CXXThisExpr;
+class CXXThrowExpr;
+class CXXBindTemporaryExpr;
+class CXXScalarValueInitExpr;
+class CXXDeleteExpr;
+class ArrayTypeTraitExpr;
+class ExpressionTraitExpr;
+class CXXNoexceptExpr;
+class PackExpansionExpr;
+class SubstNonTypeTemplateParmExpr;
+class CoroutineSuspendExpr;
+class DependentCoawaitExpr;
+class CXXNewExpr;
+class CXXPseudoDestructorExpr;
+class OverloadExpr;
+class DependentScopeDeclRefExpr;
+class CXXConstructExpr;
+class LambdaExpr;
+class CXXUnresolvedConstructExpr;
+class CXXDependentScopeMemberExpr;
+class MaterializeTemporaryExpr;
+class CXXFoldExpr;
+class TypeTraitExpr;
+class ConceptSpecializationExpr;
+class PredefinedExpr;
+class CallExpr;
+class OffsetOfExpr;
+class MemberExpr;
+class ShuffleVectorExpr;
+class GenericSelectionExpr;
+class DesignatedInitExpr;
+class ParenListExpr;
+class PseudoObjectExpr;
+class AtomicExpr;
+class OMPArraySectionExpr;
+class OMPArrayShapingExpr;
+class OMPIteratorExpr;
+class ObjCArrayLiteral;
+class ObjCDictionaryLiteral;
+class ObjCBoxedExpr;
+class ObjCEncodeExpr;
+class ObjCIvarRefExpr;
+class ObjCPropertyRefExpr;
+class ObjCSubscriptRefExpr;
+class ObjCIsaExpr;
+class ObjCIndirectCopyRestoreExpr;
+class ObjCMessageExpr;
+
+// The following functions are called from constructors of `Expr`, so they
+// should not access anything beyond basic
+ExprDependence computeDependence(FullExpr *E);
+ExprDependence computeDependence(OpaqueValueExpr *E);
+ExprDependence computeDependence(ParenExpr *E);
+ExprDependence computeDependence(UnaryOperator *E);
+ExprDependence computeDependence(UnaryExprOrTypeTraitExpr *E);
+ExprDependence computeDependence(ArraySubscriptExpr *E);
+ExprDependence computeDependence(MatrixSubscriptExpr *E);
+ExprDependence computeDependence(CompoundLiteralExpr *E);
+ExprDependence computeDependence(CastExpr *E);
+ExprDependence computeDependence(BinaryOperator *E);
+ExprDependence computeDependence(ConditionalOperator *E);
+ExprDependence computeDependence(BinaryConditionalOperator *E);
+ExprDependence computeDependence(StmtExpr *E, unsigned TemplateDepth);
+ExprDependence computeDependence(ConvertVectorExpr *E);
+ExprDependence computeDependence(VAArgExpr *E);
+ExprDependence computeDependence(ChooseExpr *E);
+ExprDependence computeDependence(NoInitExpr *E);
+ExprDependence computeDependence(ArrayInitLoopExpr *E);
+ExprDependence computeDependence(ImplicitValueInitExpr *E);
+ExprDependence computeDependence(InitListExpr *E);
+ExprDependence computeDependence(ExtVectorElementExpr *E);
+ExprDependence computeDependence(BlockExpr *E);
+ExprDependence computeDependence(AsTypeExpr *E);
+ExprDependence computeDependence(DeclRefExpr *E, const ASTContext &Ctx);
+ExprDependence computeDependence(RecoveryExpr *E);
+ExprDependence computeDependence(CXXRewrittenBinaryOperator *E);
+ExprDependence computeDependence(CXXStdInitializerListExpr *E);
+ExprDependence computeDependence(CXXTypeidExpr *E);
+ExprDependence computeDependence(MSPropertyRefExpr *E);
+ExprDependence computeDependence(MSPropertySubscriptExpr *E);
+ExprDependence computeDependence(CXXUuidofExpr *E);
+ExprDependence computeDependence(CXXThisExpr *E);
+ExprDependence computeDependence(CXXThrowExpr *E);
+ExprDependence computeDependence(CXXBindTemporaryExpr *E);
+ExprDependence computeDependence(CXXScalarValueInitExpr *E);
+ExprDependence computeDependence(CXXDeleteExpr *E);
+ExprDependence computeDependence(ArrayTypeTraitExpr *E);
+ExprDependence computeDependence(ExpressionTraitExpr *E);
+ExprDependence computeDependence(CXXNoexceptExpr *E, CanThrowResult CT);
+ExprDependence computeDependence(PackExpansionExpr *E);
+ExprDependence computeDependence(SubstNonTypeTemplateParmExpr *E);
+ExprDependence computeDependence(CoroutineSuspendExpr *E);
+ExprDependence computeDependence(DependentCoawaitExpr *E);
+ExprDependence computeDependence(CXXNewExpr *E);
+ExprDependence computeDependence(CXXPseudoDestructorExpr *E);
+ExprDependence computeDependence(OverloadExpr *E, bool KnownDependent,
+ bool KnownInstantiationDependent,
+ bool KnownContainsUnexpandedParameterPack);
+ExprDependence computeDependence(DependentScopeDeclRefExpr *E);
+ExprDependence computeDependence(CXXConstructExpr *E);
+ExprDependence computeDependence(LambdaExpr *E,
+ bool ContainsUnexpandedParameterPack);
+ExprDependence computeDependence(CXXUnresolvedConstructExpr *E);
+ExprDependence computeDependence(CXXDependentScopeMemberExpr *E);
+ExprDependence computeDependence(MaterializeTemporaryExpr *E);
+ExprDependence computeDependence(CXXFoldExpr *E);
+ExprDependence computeDependence(TypeTraitExpr *E);
+ExprDependence computeDependence(ConceptSpecializationExpr *E,
+ bool ValueDependent);
+
+ExprDependence computeDependence(PredefinedExpr *E);
+ExprDependence computeDependence(CallExpr *E, llvm::ArrayRef PreArgs);
+ExprDependence computeDependence(OffsetOfExpr *E);
+ExprDependence computeDependence(MemberExpr *E);
+ExprDependence computeDependence(ShuffleVectorExpr *E);
+ExprDependence computeDependence(GenericSelectionExpr *E,
+ bool ContainsUnexpandedPack);
+ExprDependence computeDependence(DesignatedInitExpr *E);
+ExprDependence computeDependence(ParenListExpr *E);
+ExprDependence computeDependence(PseudoObjectExpr *E);
+ExprDependence computeDependence(AtomicExpr *E);
+
+ExprDependence computeDependence(OMPArraySectionExpr *E);
+ExprDependence computeDependence(OMPArrayShapingExpr *E);
+ExprDependence computeDependence(OMPIteratorExpr *E);
+
+ExprDependence computeDependence(ObjCArrayLiteral *E);
+ExprDependence computeDependence(ObjCDictionaryLiteral *E);
+ExprDependence computeDependence(ObjCBoxedExpr *E);
+ExprDependence computeDependence(ObjCEncodeExpr *E);
+ExprDependence computeDependence(ObjCIvarRefExpr *E);
+ExprDependence computeDependence(ObjCPropertyRefExpr *E);
+ExprDependence computeDependence(ObjCSubscriptRefExpr *E);
+ExprDependence computeDependence(ObjCIsaExpr *E);
+ExprDependence computeDependence(ObjCIndirectCopyRestoreExpr *E);
+ExprDependence computeDependence(ObjCMessageExpr *E);
+
+} // namespace clang
+#endif
diff --git a/gnu/llvm/clang/include/clang/AST/DataCollection.h b/gnu/llvm/clang/include/clang/AST/DataCollection.h
index 37f101793ec..14d1bc18862 100644
--- a/gnu/llvm/clang/include/clang/AST/DataCollection.h
+++ b/gnu/llvm/clang/include/clang/AST/DataCollection.h
@@ -50,10 +50,9 @@ template void addDataToConsumer(T &DataConsumer, const QualType &QT) {
}
template
-typename std::enable_if<
- std::is_integral::value || std::is_enum::value ||
- std::is_convertible::value // for llvm::hash_code
- >::type
+std::enable_if_t::value || std::is_enum::value ||
+ std::is_convertible::value // for llvm::hash_code
+ >
addDataToConsumer(T &DataConsumer, Type Data) {
DataConsumer.update(StringRef(reinterpret_cast(&Data), sizeof(Data)));
}
diff --git a/gnu/llvm/clang/include/clang/AST/Decl.h b/gnu/llvm/clang/include/clang/AST/Decl.h
index 43c6c7b85db..28faa2c1fc7 100644
--- a/gnu/llvm/clang/include/clang/AST/Decl.h
+++ b/gnu/llvm/clang/include/clang/AST/Decl.h
@@ -2030,7 +2030,7 @@ public:
/// declaration to the declaration that is a definition (if there is one).
bool isDefined(const FunctionDecl *&Definition) const;
- virtual bool isDefined() const {
+ bool isDefined() const {
const FunctionDecl* Definition;
return isDefined(Definition);
}
@@ -2125,19 +2125,17 @@ public:
bool isTrivialForCall() const { return FunctionDeclBits.IsTrivialForCall; }
void setTrivialForCall(bool IT) { FunctionDeclBits.IsTrivialForCall = IT; }
- /// Whether this function is defaulted per C++0x. Only valid for
- /// special member functions.
+ /// Whether this function is defaulted. Valid for e.g.
+ /// special member functions, defaulted comparisions (not methods!).
bool isDefaulted() const { return FunctionDeclBits.IsDefaulted; }
void setDefaulted(bool D = true) { FunctionDeclBits.IsDefaulted = D; }
- /// Whether this function is explicitly defaulted per C++0x. Only valid
- /// for special member functions.
+ /// Whether this function is explicitly defaulted.
bool isExplicitlyDefaulted() const {
return FunctionDeclBits.IsExplicitlyDefaulted;
}
- /// State that this function is explicitly defaulted per C++0x. Only valid
- /// for special member functions.
+ /// State that this function is explicitly defaulted.
void setExplicitlyDefaulted(bool ED = true) {
FunctionDeclBits.IsExplicitlyDefaulted = ED;
}
@@ -2306,8 +2304,13 @@ public:
/// allocation function. [...]
///
/// If this function is an aligned allocation/deallocation function, return
- /// true through IsAligned.
- bool isReplaceableGlobalAllocationFunction(bool *IsAligned = nullptr) const;
+ /// the parameter number of the requested alignment through AlignmentParam.
+ ///
+ /// If this function is an allocation/deallocation function that takes
+ /// the `std::nothrow_t` tag, return true through IsNothrow,
+ bool isReplaceableGlobalAllocationFunction(
+ Optional *AlignmentParam = nullptr,
+ bool *IsNothrow = nullptr) const;
/// Determine if this function provides an inline implementation of a builtin.
bool isInlineBuiltinDeclaration() const;
@@ -2436,6 +2439,14 @@ public:
/// parameters have default arguments (in C++).
unsigned getMinRequiredArguments() const;
+ /// Determine whether this function has a single parameter, or multiple
+ /// parameters where all but the first have default arguments.
+ ///
+ /// This notion is used in the definition of copy/move constructors and
+ /// initializer list constructors. Note that, unlike getMinRequiredArguments,
+ /// parameter packs are not treated specially here.
+ bool hasOneParamOrDefaultArgs() const;
+
/// Find the source location information for how the type of this function
/// was written. May be absent (for example if the function was declared via
/// a typedef) and may contain a different type from that of the function
@@ -2607,7 +2618,13 @@ public:
/// Retrieve the function declaration from which this function could
/// be instantiated, if it is an instantiation (rather than a non-template
/// or a specialization, for example).
- FunctionDecl *getTemplateInstantiationPattern() const;
+ ///
+ /// If \p ForDefinition is \c false, explicit specializations will be treated
+ /// as if they were implicit instantiations. This will then find the pattern
+ /// corresponding to non-definition portions of the declaration, such as
+ /// default arguments and the exception specification.
+ FunctionDecl *
+ getTemplateInstantiationPattern(bool ForDefinition = true) const;
/// Retrieve the primary template that this function template
/// specialization either specializes or was instantiated from.
@@ -2915,12 +2932,15 @@ public:
/// Returns the parent of this field declaration, which
/// is the struct in which this field is defined.
+ ///
+ /// Returns null if this is not a normal class/struct field declaration, e.g.
+ /// ObjCAtDefsFieldDecl, ObjCIvarDecl.
const RecordDecl *getParent() const {
- return cast(getDeclContext());
+ return dyn_cast(getDeclContext());
}
RecordDecl *getParent() {
- return cast(getDeclContext());
+ return dyn_cast(getDeclContext());
}
SourceRange getSourceRange() const override LLVM_READONLY;
@@ -3534,6 +3554,7 @@ class EnumDecl : public TagDecl {
/// negative enumerators of this enum. (see getNumNegativeBits)
void setNumNegativeBits(unsigned Num) { EnumDeclBits.NumNegativeBits = Num; }
+public:
/// True if this tag declaration is a scoped enumeration. Only
/// possible in C++11 mode.
void setScoped(bool Scoped = true) { EnumDeclBits.IsScoped = Scoped; }
@@ -3550,6 +3571,7 @@ class EnumDecl : public TagDecl {
/// Microsoft-style enumeration with a fixed underlying type.
void setFixed(bool Fixed = true) { EnumDeclBits.IsFixed = Fixed; }
+private:
/// True if a valid hash is stored in ODRHash.
bool hasODRHash() const { return EnumDeclBits.HasODRHash; }
void setHasODRHash(bool Hash = true) { EnumDeclBits.HasODRHash = Hash; }
@@ -3954,6 +3976,11 @@ public:
return cast_or_null