svn commit: r321186 - in vendor/clang/dist: . cmake/caches docs include/clang include/clang-c include/clang/AST include/clang/Analysis/Analyses include/clang/Basic include/clang/Config include/clan...
Dimitry Andric
dim at FreeBSD.org
Wed Jul 19 07:02:34 UTC 2017
Author: dim
Date: Wed Jul 19 07:02:30 2017
New Revision: 321186
URL: https://svnweb.freebsd.org/changeset/base/321186
Log:
Vendor import of clang trunk r308421:
https://llvm.org/svn/llvm-project/cfe/trunk@308421
Added:
vendor/clang/dist/include/clang/Tooling/Refactoring/RecursiveSymbolVisitor.h (contents, props changed)
vendor/clang/dist/test/CodeGen/aarch64-varargs-ms.c (contents, props changed)
vendor/clang/dist/test/CodeGen/builtins-systemz-vector2-error.c (contents, props changed)
vendor/clang/dist/test/CodeGen/builtins-systemz-vector2.c (contents, props changed)
vendor/clang/dist/test/CodeGen/builtins-systemz-zvector2-error.c (contents, props changed)
vendor/clang/dist/test/CodeGen/builtins-systemz-zvector2.c (contents, props changed)
vendor/clang/dist/test/CodeGen/coff-aarch64-type-sizes.c (contents, props changed)
vendor/clang/dist/test/CodeGen/ms_abi_aarch64.c (contents, props changed)
vendor/clang/dist/test/CodeGen/zvector2.c (contents, props changed)
vendor/clang/dist/test/Index/Core/no-templated-canonical-decl.cpp (contents, props changed)
vendor/clang/dist/test/Modules/Inputs/DebugObjCImport.h (contents, props changed)
vendor/clang/dist/test/Modules/debug-info-moduleimport-in-module.m
vendor/clang/dist/test/OpenMP/taskgroup_task_reduction_messages.cpp (contents, props changed)
vendor/clang/dist/test/OpenMP/taskloop_reduction_codegen.cpp (contents, props changed)
vendor/clang/dist/test/OpenMP/taskloop_simd_reduction_codegen.cpp (contents, props changed)
vendor/clang/dist/test/Sema/varargs-aarch64.c (contents, props changed)
vendor/clang/dist/test/Sema/zvector2.c (contents, props changed)
vendor/clang/dist/test/SemaObjC/attr-ns_returns_retained.m
vendor/clang/dist/unittests/Tooling/DiagnosticsYamlTest.cpp (contents, props changed)
Modified:
vendor/clang/dist/CMakeLists.txt
vendor/clang/dist/cmake/caches/Fuchsia-stage2.cmake
vendor/clang/dist/cmake/caches/Fuchsia.cmake
vendor/clang/dist/docs/LanguageExtensions.rst
vendor/clang/dist/docs/ReleaseNotes.rst
vendor/clang/dist/include/clang-c/Index.h
vendor/clang/dist/include/clang/AST/ASTContext.h
vendor/clang/dist/include/clang/AST/DeclObjC.h
vendor/clang/dist/include/clang/AST/OpenMPClause.h
vendor/clang/dist/include/clang/AST/RecursiveASTVisitor.h
vendor/clang/dist/include/clang/AST/StmtOpenMP.h
vendor/clang/dist/include/clang/AST/Type.h
vendor/clang/dist/include/clang/Analysis/Analyses/Dominators.h
vendor/clang/dist/include/clang/Basic/Attr.td
vendor/clang/dist/include/clang/Basic/AttrDocs.td
vendor/clang/dist/include/clang/Basic/Builtins.def
vendor/clang/dist/include/clang/Basic/BuiltinsHexagon.def
vendor/clang/dist/include/clang/Basic/BuiltinsSystemZ.def
vendor/clang/dist/include/clang/Basic/BuiltinsX86.def
vendor/clang/dist/include/clang/Basic/DiagnosticGroups.td
vendor/clang/dist/include/clang/Basic/DiagnosticIDs.h
vendor/clang/dist/include/clang/Basic/DiagnosticSemaKinds.td
vendor/clang/dist/include/clang/Basic/DiagnosticSerializationKinds.td
vendor/clang/dist/include/clang/Basic/IdentifierTable.h
vendor/clang/dist/include/clang/Basic/LangOptions.def
vendor/clang/dist/include/clang/Basic/OpenMPKinds.def
vendor/clang/dist/include/clang/Basic/Specifiers.h
vendor/clang/dist/include/clang/Basic/TargetInfo.h
vendor/clang/dist/include/clang/Config/config.h.cmake
vendor/clang/dist/include/clang/Driver/Options.td
vendor/clang/dist/include/clang/Frontend/LangStandard.h
vendor/clang/dist/include/clang/Frontend/LangStandards.def
vendor/clang/dist/include/clang/Index/IndexingAction.h
vendor/clang/dist/include/clang/Lex/MacroInfo.h
vendor/clang/dist/include/clang/Lex/Preprocessor.h
vendor/clang/dist/include/clang/Sema/Sema.h
vendor/clang/dist/include/clang/Tooling/DiagnosticsYaml.h
vendor/clang/dist/include/clang/Tooling/Refactoring/Rename/USRFinder.h
vendor/clang/dist/include/clang/module.modulemap
vendor/clang/dist/lib/AST/ASTContext.cpp
vendor/clang/dist/lib/AST/ASTDumper.cpp
vendor/clang/dist/lib/AST/DeclObjC.cpp
vendor/clang/dist/lib/AST/ItaniumMangle.cpp
vendor/clang/dist/lib/AST/MicrosoftMangle.cpp
vendor/clang/dist/lib/AST/ODRHash.cpp
vendor/clang/dist/lib/AST/OpenMPClause.cpp
vendor/clang/dist/lib/AST/StmtOpenMP.cpp
vendor/clang/dist/lib/AST/StmtPrinter.cpp
vendor/clang/dist/lib/AST/StmtProfile.cpp
vendor/clang/dist/lib/AST/Type.cpp
vendor/clang/dist/lib/AST/TypePrinter.cpp
vendor/clang/dist/lib/Analysis/PrintfFormatString.cpp
vendor/clang/dist/lib/Basic/CMakeLists.txt
vendor/clang/dist/lib/Basic/DiagnosticIDs.cpp
vendor/clang/dist/lib/Basic/OpenMPKinds.cpp
vendor/clang/dist/lib/Basic/Targets.cpp
vendor/clang/dist/lib/CodeGen/CGBuiltin.cpp
vendor/clang/dist/lib/CodeGen/CGCall.cpp
vendor/clang/dist/lib/CodeGen/CGDebugInfo.cpp
vendor/clang/dist/lib/CodeGen/CGExpr.cpp
vendor/clang/dist/lib/CodeGen/CGExprScalar.cpp
vendor/clang/dist/lib/CodeGen/CGOpenMPRuntime.cpp
vendor/clang/dist/lib/CodeGen/CGOpenMPRuntime.h
vendor/clang/dist/lib/CodeGen/CGStmtOpenMP.cpp
vendor/clang/dist/lib/CodeGen/CodeGenFunction.h
vendor/clang/dist/lib/CodeGen/CodeGenModule.cpp
vendor/clang/dist/lib/CodeGen/MacroPPCallbacks.cpp
vendor/clang/dist/lib/CodeGen/ObjectFilePCHContainerOperations.cpp
vendor/clang/dist/lib/CodeGen/TargetInfo.cpp
vendor/clang/dist/lib/Driver/Driver.cpp
vendor/clang/dist/lib/Driver/ToolChains/Clang.cpp
vendor/clang/dist/lib/Driver/ToolChains/Darwin.cpp
vendor/clang/dist/lib/Driver/ToolChains/Fuchsia.cpp
vendor/clang/dist/lib/Driver/ToolChains/Gnu.cpp
vendor/clang/dist/lib/Driver/ToolChains/Solaris.cpp
vendor/clang/dist/lib/Driver/ToolChains/Solaris.h
vendor/clang/dist/lib/Format/TokenAnnotator.cpp
vendor/clang/dist/lib/Format/UnwrappedLineParser.cpp
vendor/clang/dist/lib/Frontend/CompilerInvocation.cpp
vendor/clang/dist/lib/Frontend/InitPreprocessor.cpp
vendor/clang/dist/lib/Frontend/PrintPreprocessedOutput.cpp
vendor/clang/dist/lib/Frontend/Rewrite/FrontendActions.cpp
vendor/clang/dist/lib/Frontend/Rewrite/RewriteModernObjC.cpp
vendor/clang/dist/lib/Frontend/Rewrite/RewriteObjC.cpp
vendor/clang/dist/lib/FrontendTool/ExecuteCompilerInvocation.cpp
vendor/clang/dist/lib/Headers/vecintrin.h
vendor/clang/dist/lib/Index/IndexingAction.cpp
vendor/clang/dist/lib/Index/IndexingContext.cpp
vendor/clang/dist/lib/Lex/MacroArgs.cpp
vendor/clang/dist/lib/Lex/MacroInfo.cpp
vendor/clang/dist/lib/Lex/PPDirectives.cpp
vendor/clang/dist/lib/Lex/PPExpressions.cpp
vendor/clang/dist/lib/Lex/PPMacroExpansion.cpp
vendor/clang/dist/lib/Lex/Preprocessor.cpp
vendor/clang/dist/lib/Lex/TokenLexer.cpp
vendor/clang/dist/lib/Parse/ParseObjc.cpp
vendor/clang/dist/lib/Parse/ParseOpenMP.cpp
vendor/clang/dist/lib/Sema/DeclSpec.cpp
vendor/clang/dist/lib/Sema/Sema.cpp
vendor/clang/dist/lib/Sema/SemaChecking.cpp
vendor/clang/dist/lib/Sema/SemaCodeComplete.cpp
vendor/clang/dist/lib/Sema/SemaDeclAttr.cpp
vendor/clang/dist/lib/Sema/SemaDeclObjC.cpp
vendor/clang/dist/lib/Sema/SemaExpr.cpp
vendor/clang/dist/lib/Sema/SemaObjCProperty.cpp
vendor/clang/dist/lib/Sema/SemaOpenMP.cpp
vendor/clang/dist/lib/Sema/SemaType.cpp
vendor/clang/dist/lib/Sema/TreeTransform.h
vendor/clang/dist/lib/Serialization/ASTReader.cpp
vendor/clang/dist/lib/Serialization/ASTReaderStmt.cpp
vendor/clang/dist/lib/Serialization/ASTWriter.cpp
vendor/clang/dist/lib/Serialization/ASTWriterStmt.cpp
vendor/clang/dist/lib/StaticAnalyzer/Checkers/LocalizationChecker.cpp
vendor/clang/dist/lib/StaticAnalyzer/Checkers/RetainCountChecker.cpp
vendor/clang/dist/lib/Tooling/Refactoring/Rename/USRFinder.cpp
vendor/clang/dist/lib/Tooling/Refactoring/Rename/USRLocFinder.cpp
vendor/clang/dist/lib/Tooling/Tooling.cpp
vendor/clang/dist/test/Analysis/localization-aggressive.m
vendor/clang/dist/test/Analysis/retain-release-inline.m
vendor/clang/dist/test/Analysis/retain-release.m
vendor/clang/dist/test/CodeGen/aarch64-type-sizes.c
vendor/clang/dist/test/CodeGen/builtins-hexagon.c
vendor/clang/dist/test/CodeGen/builtins-systemz-zvector-error.c
vendor/clang/dist/test/CodeGen/builtins-systemz-zvector.c
vendor/clang/dist/test/CodeGen/debug-info-imported-entity.cpp
vendor/clang/dist/test/CodeGen/ms_abi.c
vendor/clang/dist/test/CodeGen/systemz-abi-vector.c
vendor/clang/dist/test/CodeGen/systemz-abi.c
vendor/clang/dist/test/CodeGen/target-data.c
vendor/clang/dist/test/CodeGen/ubsan-pointer-overflow.m
vendor/clang/dist/test/CodeGenCXX/amdgcn-automatic-variable.cpp
vendor/clang/dist/test/CodeGenCXX/debug-info-anon-namespace.cpp
vendor/clang/dist/test/CodeGenCXX/debug-info-namespace.cpp
vendor/clang/dist/test/CodeGenCXX/implicit-exception-spec.cpp
vendor/clang/dist/test/CodeGenObjC/arc-property.m
vendor/clang/dist/test/CodeGenObjC/attr-callconv.m
vendor/clang/dist/test/CodeGenOpenCL/kernel-arg-info.cl
vendor/clang/dist/test/Driver/autocomplete.c
vendor/clang/dist/test/Driver/constructors.c
vendor/clang/dist/test/Driver/darwin-version.c
vendor/clang/dist/test/Driver/emulated-tls.cpp
vendor/clang/dist/test/Driver/fuchsia.c
vendor/clang/dist/test/Driver/fuchsia.cpp
vendor/clang/dist/test/Driver/lto-unit.c
vendor/clang/dist/test/Driver/pic.c
vendor/clang/dist/test/Driver/std.cpp
vendor/clang/dist/test/Driver/systemz-march.c
vendor/clang/dist/test/Driver/unknown-std.cpp
vendor/clang/dist/test/FixIt/format.m
vendor/clang/dist/test/Index/Core/index-source.m
vendor/clang/dist/test/Index/complete-available.m
vendor/clang/dist/test/Misc/ast-dump-decl.c
vendor/clang/dist/test/Misc/ast-dump-decl.cpp
vendor/clang/dist/test/Modules/DebugInfoTransitiveImport.m
vendor/clang/dist/test/Modules/ExtDebugInfo.cpp
vendor/clang/dist/test/Modules/Inputs/module.map
vendor/clang/dist/test/Modules/ModuleDebugInfo.m
vendor/clang/dist/test/Modules/debug-info-moduleimport.m
vendor/clang/dist/test/Modules/odr_hash.cpp
vendor/clang/dist/test/OpenMP/distribute_parallel_for_if_codegen.cpp
vendor/clang/dist/test/OpenMP/for_reduction_codegen.cpp
vendor/clang/dist/test/OpenMP/for_reduction_codegen_UDR.cpp
vendor/clang/dist/test/OpenMP/parallel_if_codegen.cpp
vendor/clang/dist/test/OpenMP/taskgroup_ast_print.cpp
vendor/clang/dist/test/OpenMP/taskgroup_messages.cpp
vendor/clang/dist/test/OpenMP/taskloop_codegen.cpp
vendor/clang/dist/test/OpenMP/taskloop_firstprivate_codegen.cpp
vendor/clang/dist/test/OpenMP/taskloop_lastprivate_codegen.cpp
vendor/clang/dist/test/OpenMP/taskloop_private_codegen.cpp
vendor/clang/dist/test/OpenMP/taskloop_simd_codegen.cpp
vendor/clang/dist/test/OpenMP/taskloop_simd_firstprivate_codegen.cpp
vendor/clang/dist/test/OpenMP/taskloop_simd_lastprivate_codegen.cpp
vendor/clang/dist/test/OpenMP/taskloop_simd_private_codegen.cpp
vendor/clang/dist/test/Parser/MicrosoftExtensions.cpp
vendor/clang/dist/test/Preprocessor/aarch64-target-features.c
vendor/clang/dist/test/Preprocessor/cxx_oper_keyword.cpp
vendor/clang/dist/test/Preprocessor/init.c
vendor/clang/dist/test/Preprocessor/predefined-arch-macros.c
vendor/clang/dist/test/Sema/tls.c
vendor/clang/dist/test/Sema/varargs-x86-32.c
vendor/clang/dist/test/SemaCXX/attr-x86-no_caller_saved_registers.cpp
vendor/clang/dist/test/SemaCXX/cxx1z-noexcept-function-type.cpp
vendor/clang/dist/test/SemaObjC/arc-property-decl-attrs.m
vendor/clang/dist/test/SemaObjC/property-ambiguous-synthesis.m
vendor/clang/dist/test/SemaObjC/warn-deprecated-implementations.m
vendor/clang/dist/tools/clang-fuzzer/CMakeLists.txt
vendor/clang/dist/tools/clang-fuzzer/ClangFuzzer.cpp
vendor/clang/dist/tools/libclang/ARCMigrate.cpp
vendor/clang/dist/tools/libclang/CIndex.cpp
vendor/clang/dist/tools/libclang/CXType.cpp
vendor/clang/dist/tools/scan-build-py/libscanbuild/analyze.py
vendor/clang/dist/unittests/ASTMatchers/Dynamic/ParserTest.cpp
vendor/clang/dist/unittests/Format/FormatTest.cpp
vendor/clang/dist/unittests/Format/FormatTestJS.cpp
vendor/clang/dist/unittests/Format/SortImportsTestJS.cpp
vendor/clang/dist/unittests/Lex/LexerTest.cpp
vendor/clang/dist/unittests/Tooling/CMakeLists.txt
vendor/clang/dist/utils/bash-autocomplete.sh
vendor/clang/dist/www/analyzer/alpha_checks.html
vendor/clang/dist/www/analyzer/available_checks.html
vendor/clang/dist/www/analyzer/implicit_checks.html
vendor/clang/dist/www/cxx_status.html
Modified: vendor/clang/dist/CMakeLists.txt
==============================================================================
--- vendor/clang/dist/CMakeLists.txt Wed Jul 19 07:02:18 2017 (r321185)
+++ vendor/clang/dist/CMakeLists.txt Wed Jul 19 07:02:30 2017 (r321186)
@@ -389,11 +389,7 @@ if(CLANG_ANALYZER_BUILD_Z3)
endif()
if(CLANG_ENABLE_ARCMT)
- add_definitions(-DCLANG_ENABLE_ARCMT)
- add_definitions(-DCLANG_ENABLE_OBJC_REWRITER)
-endif()
-if(CLANG_ENABLE_STATIC_ANALYZER)
- add_definitions(-DCLANG_ENABLE_STATIC_ANALYZER)
+ set(CLANG_ENABLE_OBJC_REWRITER ON)
endif()
# Clang version information
Modified: vendor/clang/dist/cmake/caches/Fuchsia-stage2.cmake
==============================================================================
--- vendor/clang/dist/cmake/caches/Fuchsia-stage2.cmake Wed Jul 19 07:02:18 2017 (r321185)
+++ vendor/clang/dist/cmake/caches/Fuchsia-stage2.cmake Wed Jul 19 07:02:30 2017 (r321186)
@@ -7,7 +7,6 @@ set(PACKAGE_VENDOR Fuchsia CACHE STRING "")
set(LLVM_INCLUDE_EXAMPLES OFF CACHE BOOL "")
set(LLVM_INCLUDE_DOCS OFF CACHE BOOL "")
-set(LLVM_TOOL_CLANG_TOOLS_EXTRA_BUILD OFF CACHE BOOL "")
set(LLVM_ENABLE_ZLIB ON CACHE BOOL "")
set(LLVM_ENABLE_BACKTRACES OFF CACHE BOOL "")
set(LLVM_EXTERNALIZE_DEBUGINFO ON CACHE BOOL "")
@@ -27,12 +26,28 @@ set(CMAKE_BUILD_TYPE RelWithDebInfo CACHE STRING "")
set(CMAKE_C_FLAGS_RELWITHDEBINFO "-O2 -gline-tables-only -DNDEBUG" CACHE STRING "")
set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-O2 -gline-tables-only -DNDEBUG" CACHE STRING "")
-set(LLVM_BUILTIN_TARGETS "x86_64-fuchsia-none;aarch64-fuchsia-none" CACHE STRING "")
-set(BUILTINS_x86_64-fuchsia-none_CMAKE_SYSROOT ${FUCHSIA_SYSROOT} CACHE STRING "")
-set(BUILTINS_x86_64-fuchsia-none_CMAKE_SYSTEM_NAME Fuchsia CACHE STRING "")
-set(BUILTINS_aarch64-fuchsia-none_CMAKE_SYSROOT ${FUCHSIA_SYSROOT} CACHE STRING "")
-set(BUILTINS_aarch64-fuchsia-none_CMAKE_SYSTEM_NAME Fuchsia CACHE STRING "")
+set(LLVM_BUILTIN_TARGETS "x86_64-fuchsia;aarch64-fuchsia" CACHE STRING "")
+foreach(target x86_64;aarch64)
+ set(BUILTINS_${target}-fuchsia_CMAKE_SYSROOT ${FUCHSIA_${target}_SYSROOT} CACHE PATH "")
+ set(BUILTINS_${target}-fuchsia_CMAKE_SYSTEM_NAME Fuchsia CACHE STRING "")
+endforeach()
+if(NOT APPLE)
+ list(APPEND LLVM_BUILTIN_TARGETS "default")
+endif()
+set(LLVM_RUNTIME_TARGETS "default;x86_64-fuchsia;aarch64-fuchsia" CACHE STRING "")
+foreach(target x86_64;aarch64)
+ set(RUNTIMES_${target}-fuchsia_CMAKE_BUILD_WITH_INSTALL_RPATH ON CACHE BOOL "")
+ set(RUNTIMES_${target}-fuchsia_CMAKE_SYSROOT ${FUCHSIA_${target}_SYSROOT} CACHE PATH "")
+ set(RUNTIMES_${target}-fuchsia_CMAKE_SYSTEM_NAME Fuchsia CACHE STRING "")
+ set(RUNTIMES_${target}-fuchsia_UNIX 1 CACHE BOOL "")
+ set(RUNTIMES_${target}-fuchsia_LLVM_ENABLE_LIBCXX ON CACHE BOOL "")
+ set(RUNTIMES_${target}-fuchsia_LIBUNWIND_USE_COMPILER_RT ON CACHE BOOL "")
+ set(RUNTIMES_${target}-fuchsia_LIBCXXABI_USE_COMPILER_RT ON CACHE BOOL "")
+ set(RUNTIMES_${target}-fuchsia_LIBCXXABI_USE_LLVM_UNWINDER ON CACHE BOOL "")
+ set(RUNTIMES_${target}-fuchsia_LIBCXX_USE_COMPILER_RT ON CACHE BOOL "")
+endforeach()
+
# Setup toolchain.
set(LLVM_INSTALL_TOOLCHAIN_ONLY ON CACHE BOOL "")
set(LLVM_TOOLCHAIN_TOOLS
@@ -47,6 +62,7 @@ set(LLVM_TOOLCHAIN_TOOLS
llvm-objdump
llvm-profdata
llvm-ranlib
+ llvm-readelf
llvm-readobj
llvm-size
llvm-symbolizer
@@ -61,8 +77,9 @@ set(LLVM_DISTRIBUTION_COMPONENTS
LTO
clang-format
clang-headers
- builtins-x86_64-fuchsia-none
- builtins-aarch64-fuchsia-none
+ clang-tidy
+ clangd
+ builtins
runtimes
${LLVM_TOOLCHAIN_TOOLS}
CACHE STRING "")
Modified: vendor/clang/dist/cmake/caches/Fuchsia.cmake
==============================================================================
--- vendor/clang/dist/cmake/caches/Fuchsia.cmake Wed Jul 19 07:02:18 2017 (r321185)
+++ vendor/clang/dist/cmake/caches/Fuchsia.cmake Wed Jul 19 07:02:30 2017 (r321186)
@@ -38,9 +38,11 @@ set(CLANG_BOOTSTRAP_TARGETS
install-distribution
clang CACHE STRING "")
-if(FUCHSIA_SYSROOT)
- set(EXTRA_ARGS -DFUCHSIA_SYSROOT=${FUCHSIA_SYSROOT})
-endif()
+foreach(target x86_64;aarch64)
+ if(FUCHSIA_${target}_SYSROOT)
+ list(APPEND EXTRA_ARGS -DFUCHSIA_${target}_SYSROOT=${FUCHSIA_${target}_SYSROOT})
+ endif()
+endforeach()
# Setup the bootstrap build.
set(CLANG_ENABLE_BOOTSTRAP ON CACHE BOOL "")
Modified: vendor/clang/dist/docs/LanguageExtensions.rst
==============================================================================
--- vendor/clang/dist/docs/LanguageExtensions.rst Wed Jul 19 07:02:18 2017 (r321185)
+++ vendor/clang/dist/docs/LanguageExtensions.rst Wed Jul 19 07:02:30 2017 (r321186)
@@ -1271,7 +1271,88 @@ Further examples of these attributes are available in
Query for these features with ``__has_attribute(ns_consumed)``,
``__has_attribute(ns_returns_retained)``, etc.
+Objective-C @available
+----------------------
+It is possible to use the newest SDK but still build a program that can run on
+older versions of macOS and iOS by passing ``-mmacosx-version-min=`` /
+``-miphoneos-version-min=``.
+
+Before LLVM 5.0, when calling a function that exists only in the OS that's
+newer than the target OS (as determined by the minimum deployment version),
+programmers had to carefully check if the function exists at runtime, using
+null checks for weakly-linked C functions, ``+class`` for Objective-C classes,
+and ``-respondsToSelector:`` or ``+instancesRespondToSelector:`` for
+Objective-C methods. If such a check was missed, the program would compile
+fine, run fine on newer systems, but crash on older systems.
+
+As of LLVM 5.0, ``-Wunguarded-availability`` uses the `availability attributes
+<http://clang.llvm.org/docs/AttributeReference.html#availability>`_ together
+with the new ``@available()`` keyword to assist with this issue.
+When a method that's introduced in the OS newer than the target OS is called, a
+-Wunguarded-availability warning is emitted if that call is not guarded:
+
+.. code-block:: objc
+
+ void my_fun(NSSomeClass* var) {
+ // If fancyNewMethod was added in e.g. macOS 10.12, but the code is
+ // built with -mmacosx-version-min=10.11, then this unconditional call
+ // will emit a -Wunguarded-availability warning:
+ [var fancyNewMethod];
+ }
+
+To fix the warning and to avoid the crash on macOS 10.11, wrap it in
+``if(@available())``:
+
+.. code-block:: objc
+
+ void my_fun(NSSomeClass* var) {
+ if (@available(macOS 10.12, *)) {
+ [var fancyNewMethod];
+ } else {
+ // Put fallback behavior for old macOS versions (and for non-mac
+ // platforms) here.
+ }
+ }
+
+The ``*`` is required and means that platforms not explicitly listed will take
+the true branch, and the compiler will emit ``-Wunguarded-availability``
+warnings for unlisted platforms based on those platform's deployment target.
+More than one platform can be listed in ``@available()``:
+
+.. code-block:: objc
+
+ void my_fun(NSSomeClass* var) {
+ if (@available(macOS 10.12, iOS 10, *)) {
+ [var fancyNewMethod];
+ }
+ }
+
+If the caller of ``my_fun()`` already checks that ``my_fun()`` is only called
+on 10.12, then add an `availability attribute
+<http://clang.llvm.org/docs/AttributeReference.html#availability>`_ to it,
+which will also suppress the warning and require that calls to my_fun() are
+checked:
+
+.. code-block:: objc
+
+ API_AVAILABLE(macos(10.12)) void my_fun(NSSomeClass* var) {
+ [var fancyNewMethod]; // Now ok.
+ }
+
+``@available()`` is only available in Objective-C code. To use the feature
+in C and C++ code, use the ``__builtin_available()`` spelling instead.
+
+If existing code uses null checks or ``-respondsToSelector:``, it should
+be changed to use ``@available()`` (or ``__builtin_available``) instead.
+
+``-Wunguarded-availability`` is disabled by default, but
+``-Wunguarded-availability-new``, which only emits this warning for APIs
+that have been introduced in macOS >= 10.13, iOS >= 11, watchOS >= 4 and
+tvOS >= 11, is enabled by default.
+
+.. _langext-overloading:
+
Objective-C++ ABI: protocol-qualifier mangling of parameters
------------------------------------------------------------
@@ -1286,8 +1367,6 @@ parameters of protocol-qualified type.
Query the presence of this new mangling with
``__has_feature(objc_protocol_qualifier_mangling)``.
-
-.. _langext-overloading:
Initializer lists for complex numbers in C
==========================================
Modified: vendor/clang/dist/docs/ReleaseNotes.rst
==============================================================================
--- vendor/clang/dist/docs/ReleaseNotes.rst Wed Jul 19 07:02:18 2017 (r321185)
+++ vendor/clang/dist/docs/ReleaseNotes.rst Wed Jul 19 07:02:30 2017 (r321186)
@@ -82,7 +82,9 @@ Clang now supports the ...
Attribute Changes in Clang
--------------------------
-- ...
+- The ``overloadable`` attribute now allows at most one function with a given
+ name to lack the ``overloadable`` attribute. This unmarked function will not
+ have its name mangled.
Windows Support
---------------
Modified: vendor/clang/dist/include/clang-c/Index.h
==============================================================================
--- vendor/clang/dist/include/clang-c/Index.h Wed Jul 19 07:02:18 2017 (r321185)
+++ vendor/clang/dist/include/clang-c/Index.h Wed Jul 19 07:02:30 2017 (r321186)
@@ -3205,7 +3205,7 @@ enum CXCallingConv {
CXCallingConv_AAPCS_VFP = 7,
CXCallingConv_X86RegCall = 8,
CXCallingConv_IntelOclBicc = 9,
- CXCallingConv_X86_64Win64 = 10,
+ CXCallingConv_Win64 = 10,
CXCallingConv_X86_64SysV = 11,
CXCallingConv_X86VectorCall = 12,
CXCallingConv_Swift = 13,
Modified: vendor/clang/dist/include/clang/AST/ASTContext.h
==============================================================================
--- vendor/clang/dist/include/clang/AST/ASTContext.h Wed Jul 19 07:02:18 2017 (r321185)
+++ vendor/clang/dist/include/clang/AST/ASTContext.h Wed Jul 19 07:02:30 2017 (r321186)
@@ -1441,6 +1441,10 @@ class ASTContext : public RefCountedBase<ASTContext> {
/// The sizeof operator requires this (C99 6.5.3.4p4).
CanQualType getSizeType() const;
+ /// \brief Return the unique signed counterpart of
+ /// the integer type corresponding to size_t.
+ CanQualType getSignedSizeType() const;
+
/// \brief Return the unique type for "intmax_t" (C99 7.18.1.5), defined in
/// <stdint.h>.
CanQualType getIntMaxType() const;
Modified: vendor/clang/dist/include/clang/AST/DeclObjC.h
==============================================================================
--- vendor/clang/dist/include/clang/AST/DeclObjC.h Wed Jul 19 07:02:18 2017 (r321185)
+++ vendor/clang/dist/include/clang/AST/DeclObjC.h Wed Jul 19 07:02:30 2017 (r321186)
@@ -1039,10 +1039,9 @@ class ObjCContainerDecl : public NamedDecl, public Dec
typedef llvm::DenseMap<std::pair<IdentifierInfo*,
unsigned/*isClassProperty*/>,
ObjCPropertyDecl*> PropertyMap;
-
- typedef llvm::DenseMap<const ObjCProtocolDecl *, ObjCPropertyDecl*>
- ProtocolPropertyMap;
-
+
+ typedef llvm::SmallDenseSet<const ObjCProtocolDecl *, 8> ProtocolPropertySet;
+
typedef llvm::SmallVector<ObjCPropertyDecl*, 8> PropertyDeclOrder;
/// This routine collects list of properties to be implemented in the class.
@@ -2159,7 +2158,8 @@ class ObjCProtocolDecl : public ObjCContainerDecl, (pu
PropertyDeclOrder &PO) const override;
void collectInheritedProtocolProperties(const ObjCPropertyDecl *Property,
- ProtocolPropertyMap &PM) const;
+ ProtocolPropertySet &PS,
+ PropertyDeclOrder &PO) const;
static bool classof(const Decl *D) { return classofKind(D->getKind()); }
static bool classofKind(Kind K) { return K == ObjCProtocol; }
Modified: vendor/clang/dist/include/clang/AST/OpenMPClause.h
==============================================================================
--- vendor/clang/dist/include/clang/AST/OpenMPClause.h Wed Jul 19 07:02:18 2017 (r321185)
+++ vendor/clang/dist/include/clang/AST/OpenMPClause.h Wed Jul 19 07:02:30 2017 (r321186)
@@ -1890,6 +1890,217 @@ class OMPReductionClause final (public)
}
};
+/// This represents clause 'task_reduction' in the '#pragma omp taskgroup'
+/// directives.
+///
+/// \code
+/// #pragma omp taskgroup task_reduction(+:a,b)
+/// \endcode
+/// In this example directive '#pragma omp taskgroup' has clause
+/// 'task_reduction' with operator '+' and the variables 'a' and 'b'.
+///
+class OMPTaskReductionClause final
+ : public OMPVarListClause<OMPTaskReductionClause>,
+ public OMPClauseWithPostUpdate,
+ private llvm::TrailingObjects<OMPTaskReductionClause, Expr *> {
+ friend TrailingObjects;
+ friend OMPVarListClause;
+ friend class OMPClauseReader;
+ /// Location of ':'.
+ SourceLocation ColonLoc;
+ /// Nested name specifier for C++.
+ NestedNameSpecifierLoc QualifierLoc;
+ /// Name of custom operator.
+ DeclarationNameInfo NameInfo;
+
+ /// Build clause with number of variables \a N.
+ ///
+ /// \param StartLoc Starting location of the clause.
+ /// \param LParenLoc Location of '('.
+ /// \param EndLoc Ending location of the clause.
+ /// \param ColonLoc Location of ':'.
+ /// \param N Number of the variables in the clause.
+ /// \param QualifierLoc The nested-name qualifier with location information
+ /// \param NameInfo The full name info for reduction identifier.
+ ///
+ OMPTaskReductionClause(SourceLocation StartLoc, SourceLocation LParenLoc,
+ SourceLocation ColonLoc, SourceLocation EndLoc,
+ unsigned N, NestedNameSpecifierLoc QualifierLoc,
+ const DeclarationNameInfo &NameInfo)
+ : OMPVarListClause<OMPTaskReductionClause>(OMPC_task_reduction, StartLoc,
+ LParenLoc, EndLoc, N),
+ OMPClauseWithPostUpdate(this), ColonLoc(ColonLoc),
+ QualifierLoc(QualifierLoc), NameInfo(NameInfo) {}
+
+ /// Build an empty clause.
+ ///
+ /// \param N Number of variables.
+ ///
+ explicit OMPTaskReductionClause(unsigned N)
+ : OMPVarListClause<OMPTaskReductionClause>(
+ OMPC_task_reduction, SourceLocation(), SourceLocation(),
+ SourceLocation(), N),
+ OMPClauseWithPostUpdate(this), ColonLoc(), QualifierLoc(), NameInfo() {}
+
+ /// Sets location of ':' symbol in clause.
+ void setColonLoc(SourceLocation CL) { ColonLoc = CL; }
+ /// Sets the name info for specified reduction identifier.
+ void setNameInfo(DeclarationNameInfo DNI) { NameInfo = DNI; }
+ /// Sets the nested name specifier.
+ void setQualifierLoc(NestedNameSpecifierLoc NSL) { QualifierLoc = NSL; }
+
+ /// Set list of helper expressions, required for proper codegen of the clause.
+ /// These expressions represent private copy of the reduction variable.
+ void setPrivates(ArrayRef<Expr *> Privates);
+
+ /// Get the list of helper privates.
+ MutableArrayRef<Expr *> getPrivates() {
+ return MutableArrayRef<Expr *>(varlist_end(), varlist_size());
+ }
+ ArrayRef<const Expr *> getPrivates() const {
+ return llvm::makeArrayRef(varlist_end(), varlist_size());
+ }
+
+ /// Set list of helper expressions, required for proper codegen of the clause.
+ /// These expressions represent LHS expression in the final reduction
+ /// expression performed by the reduction clause.
+ void setLHSExprs(ArrayRef<Expr *> LHSExprs);
+
+ /// Get the list of helper LHS expressions.
+ MutableArrayRef<Expr *> getLHSExprs() {
+ return MutableArrayRef<Expr *>(getPrivates().end(), varlist_size());
+ }
+ ArrayRef<const Expr *> getLHSExprs() const {
+ return llvm::makeArrayRef(getPrivates().end(), varlist_size());
+ }
+
+ /// Set list of helper expressions, required for proper codegen of the clause.
+ /// These expressions represent RHS expression in the final reduction
+ /// expression performed by the reduction clause. Also, variables in these
+ /// expressions are used for proper initialization of reduction copies.
+ void setRHSExprs(ArrayRef<Expr *> RHSExprs);
+
+ /// Get the list of helper destination expressions.
+ MutableArrayRef<Expr *> getRHSExprs() {
+ return MutableArrayRef<Expr *>(getLHSExprs().end(), varlist_size());
+ }
+ ArrayRef<const Expr *> getRHSExprs() const {
+ return llvm::makeArrayRef(getLHSExprs().end(), varlist_size());
+ }
+
+ /// Set list of helper reduction expressions, required for proper
+ /// codegen of the clause. These expressions are binary expressions or
+ /// operator/custom reduction call that calculates new value from source
+ /// helper expressions to destination helper expressions.
+ void setReductionOps(ArrayRef<Expr *> ReductionOps);
+
+ /// Get the list of helper reduction expressions.
+ MutableArrayRef<Expr *> getReductionOps() {
+ return MutableArrayRef<Expr *>(getRHSExprs().end(), varlist_size());
+ }
+ ArrayRef<const Expr *> getReductionOps() const {
+ return llvm::makeArrayRef(getRHSExprs().end(), varlist_size());
+ }
+
+public:
+ /// Creates clause with a list of variables \a VL.
+ ///
+ /// \param StartLoc Starting location of the clause.
+ /// \param LParenLoc Location of '('.
+ /// \param ColonLoc Location of ':'.
+ /// \param EndLoc Ending location of the clause.
+ /// \param VL The variables in the clause.
+ /// \param QualifierLoc The nested-name qualifier with location information
+ /// \param NameInfo The full name info for reduction identifier.
+ /// \param Privates List of helper expressions for proper generation of
+ /// private copies.
+ /// \param LHSExprs List of helper expressions for proper generation of
+ /// assignment operation required for copyprivate clause. This list represents
+ /// LHSs of the reduction expressions.
+ /// \param RHSExprs List of helper expressions for proper generation of
+ /// assignment operation required for copyprivate clause. This list represents
+ /// RHSs of the reduction expressions.
+ /// Also, variables in these expressions are used for proper initialization of
+ /// reduction copies.
+ /// \param ReductionOps List of helper expressions that represents reduction
+ /// expressions:
+ /// \code
+ /// LHSExprs binop RHSExprs;
+ /// operator binop(LHSExpr, RHSExpr);
+ /// <CutomReduction>(LHSExpr, RHSExpr);
+ /// \endcode
+ /// Required for proper codegen of final reduction operation performed by the
+ /// reduction clause.
+ /// \param PreInit Statement that must be executed before entering the OpenMP
+ /// region with this clause.
+ /// \param PostUpdate Expression that must be executed after exit from the
+ /// OpenMP region with this clause.
+ ///
+ static OMPTaskReductionClause *
+ Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation LParenLoc,
+ SourceLocation ColonLoc, SourceLocation EndLoc, ArrayRef<Expr *> VL,
+ NestedNameSpecifierLoc QualifierLoc,
+ const DeclarationNameInfo &NameInfo, ArrayRef<Expr *> Privates,
+ ArrayRef<Expr *> LHSExprs, ArrayRef<Expr *> RHSExprs,
+ ArrayRef<Expr *> ReductionOps, Stmt *PreInit, Expr *PostUpdate);
+
+ /// Creates an empty clause with the place for \a N variables.
+ ///
+ /// \param C AST context.
+ /// \param N The number of variables.
+ ///
+ static OMPTaskReductionClause *CreateEmpty(const ASTContext &C, unsigned N);
+
+ /// Gets location of ':' symbol in clause.
+ SourceLocation getColonLoc() const { return ColonLoc; }
+ /// Gets the name info for specified reduction identifier.
+ const DeclarationNameInfo &getNameInfo() const { return NameInfo; }
+ /// Gets the nested name specifier.
+ NestedNameSpecifierLoc getQualifierLoc() const { return QualifierLoc; }
+
+ typedef MutableArrayRef<Expr *>::iterator helper_expr_iterator;
+ typedef ArrayRef<const Expr *>::iterator helper_expr_const_iterator;
+ typedef llvm::iterator_range<helper_expr_iterator> helper_expr_range;
+ typedef llvm::iterator_range<helper_expr_const_iterator>
+ helper_expr_const_range;
+
+ helper_expr_const_range privates() const {
+ return helper_expr_const_range(getPrivates().begin(), getPrivates().end());
+ }
+ helper_expr_range privates() {
+ return helper_expr_range(getPrivates().begin(), getPrivates().end());
+ }
+ helper_expr_const_range lhs_exprs() const {
+ return helper_expr_const_range(getLHSExprs().begin(), getLHSExprs().end());
+ }
+ helper_expr_range lhs_exprs() {
+ return helper_expr_range(getLHSExprs().begin(), getLHSExprs().end());
+ }
+ helper_expr_const_range rhs_exprs() const {
+ return helper_expr_const_range(getRHSExprs().begin(), getRHSExprs().end());
+ }
+ helper_expr_range rhs_exprs() {
+ return helper_expr_range(getRHSExprs().begin(), getRHSExprs().end());
+ }
+ helper_expr_const_range reduction_ops() const {
+ return helper_expr_const_range(getReductionOps().begin(),
+ getReductionOps().end());
+ }
+ helper_expr_range reduction_ops() {
+ return helper_expr_range(getReductionOps().begin(),
+ getReductionOps().end());
+ }
+
+ child_range children() {
+ return child_range(reinterpret_cast<Stmt **>(varlist_begin()),
+ reinterpret_cast<Stmt **>(varlist_end()));
+ }
+
+ static bool classof(const OMPClause *T) {
+ return T->getClauseKind() == OMPC_task_reduction;
+ }
+};
+
/// \brief This represents clause 'linear' in the '#pragma omp ...'
/// directives.
///
Modified: vendor/clang/dist/include/clang/AST/RecursiveASTVisitor.h
==============================================================================
--- vendor/clang/dist/include/clang/AST/RecursiveASTVisitor.h Wed Jul 19 07:02:18 2017 (r321185)
+++ vendor/clang/dist/include/clang/AST/RecursiveASTVisitor.h Wed Jul 19 07:02:30 2017 (r321186)
@@ -3017,6 +3017,28 @@ RecursiveASTVisitor<Derived>::VisitOMPReductionClause(
}
template <typename Derived>
+bool RecursiveASTVisitor<Derived>::VisitOMPTaskReductionClause(
+ OMPTaskReductionClause *C) {
+ TRY_TO(TraverseNestedNameSpecifierLoc(C->getQualifierLoc()));
+ TRY_TO(TraverseDeclarationNameInfo(C->getNameInfo()));
+ TRY_TO(VisitOMPClauseList(C));
+ TRY_TO(VisitOMPClauseWithPostUpdate(C));
+ for (auto *E : C->privates()) {
+ TRY_TO(TraverseStmt(E));
+ }
+ for (auto *E : C->lhs_exprs()) {
+ TRY_TO(TraverseStmt(E));
+ }
+ for (auto *E : C->rhs_exprs()) {
+ TRY_TO(TraverseStmt(E));
+ }
+ for (auto *E : C->reduction_ops()) {
+ TRY_TO(TraverseStmt(E));
+ }
+ return true;
+}
+
+template <typename Derived>
bool RecursiveASTVisitor<Derived>::VisitOMPFlushClause(OMPFlushClause *C) {
TRY_TO(VisitOMPClauseList(C));
return true;
Modified: vendor/clang/dist/include/clang/AST/StmtOpenMP.h
==============================================================================
--- vendor/clang/dist/include/clang/AST/StmtOpenMP.h Wed Jul 19 07:02:18 2017 (r321185)
+++ vendor/clang/dist/include/clang/AST/StmtOpenMP.h Wed Jul 19 07:02:30 2017 (r321186)
@@ -1895,7 +1895,7 @@ class OMPTaskwaitDirective : public OMPExecutableDirec
}
};
-/// \brief This represents '#pragma omp taskgroup' directive.
+/// This represents '#pragma omp taskgroup' directive.
///
/// \code
/// #pragma omp taskgroup
@@ -1903,39 +1903,45 @@ class OMPTaskwaitDirective : public OMPExecutableDirec
///
class OMPTaskgroupDirective : public OMPExecutableDirective {
friend class ASTStmtReader;
- /// \brief Build directive with the given start and end location.
+ /// Build directive with the given start and end location.
///
/// \param StartLoc Starting location of the directive kind.
/// \param EndLoc Ending location of the directive.
+ /// \param NumClauses Number of clauses.
///
- OMPTaskgroupDirective(SourceLocation StartLoc, SourceLocation EndLoc)
+ OMPTaskgroupDirective(SourceLocation StartLoc, SourceLocation EndLoc,
+ unsigned NumClauses)
: OMPExecutableDirective(this, OMPTaskgroupDirectiveClass, OMPD_taskgroup,
- StartLoc, EndLoc, 0, 1) {}
+ StartLoc, EndLoc, NumClauses, 1) {}
- /// \brief Build an empty directive.
+ /// Build an empty directive.
+ /// \param NumClauses Number of clauses.
///
- explicit OMPTaskgroupDirective()
+ explicit OMPTaskgroupDirective(unsigned NumClauses)
: OMPExecutableDirective(this, OMPTaskgroupDirectiveClass, OMPD_taskgroup,
- SourceLocation(), SourceLocation(), 0, 1) {}
+ SourceLocation(), SourceLocation(), NumClauses,
+ 1) {}
public:
- /// \brief Creates directive.
+ /// Creates directive.
///
/// \param C AST context.
/// \param StartLoc Starting location of the directive kind.
/// \param EndLoc Ending Location of the directive.
+ /// \param Clauses List of clauses.
/// \param AssociatedStmt Statement, associated with the directive.
///
- static OMPTaskgroupDirective *Create(const ASTContext &C,
- SourceLocation StartLoc,
- SourceLocation EndLoc,
- Stmt *AssociatedStmt);
+ static OMPTaskgroupDirective *
+ Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc,
+ ArrayRef<OMPClause *> Clauses, Stmt *AssociatedStmt);
- /// \brief Creates an empty directive.
+ /// Creates an empty directive.
///
/// \param C AST context.
+ /// \param NumClauses Number of clauses.
///
- static OMPTaskgroupDirective *CreateEmpty(const ASTContext &C, EmptyShell);
+ static OMPTaskgroupDirective *CreateEmpty(const ASTContext &C,
+ unsigned NumClauses, EmptyShell);
static bool classof(const Stmt *T) {
return T->getStmtClass() == OMPTaskgroupDirectiveClass;
Modified: vendor/clang/dist/include/clang/AST/Type.h
==============================================================================
--- vendor/clang/dist/include/clang/AST/Type.h Wed Jul 19 07:02:18 2017 (r321185)
+++ vendor/clang/dist/include/clang/AST/Type.h Wed Jul 19 07:02:30 2017 (r321186)
@@ -3878,6 +3878,7 @@ class AttributedType : public Type, public llvm::Foldi
attr_sptr,
attr_uptr,
attr_nonnull,
+ attr_ns_returns_retained,
attr_nullable,
attr_null_unspecified,
attr_objc_kindof,
Modified: vendor/clang/dist/include/clang/Analysis/Analyses/Dominators.h
==============================================================================
--- vendor/clang/dist/include/clang/Analysis/Analyses/Dominators.h Wed Jul 19 07:02:18 2017 (r321185)
+++ vendor/clang/dist/include/clang/Analysis/Analyses/Dominators.h Wed Jul 19 07:02:30 2017 (r321186)
@@ -38,15 +38,15 @@ typedef llvm::DomTreeNodeBase<CFGBlock> DomTreeNode;
class DominatorTree : public ManagedAnalysis {
virtual void anchor();
public:
- llvm::DominatorTreeBase<CFGBlock>* DT;
+ llvm::DomTreeBase<CFGBlock>* DT;
DominatorTree() {
- DT = new llvm::DominatorTreeBase<CFGBlock>(false);
+ DT = new llvm::DomTreeBase<CFGBlock>();
}
~DominatorTree() override { delete DT; }
- llvm::DominatorTreeBase<CFGBlock>& getBase() { return *DT; }
+ llvm::DomTreeBase<CFGBlock>& getBase() { return *DT; }
/// \brief This method returns the root CFGBlock of the dominators tree.
///
Modified: vendor/clang/dist/include/clang/Basic/Attr.td
==============================================================================
--- vendor/clang/dist/include/clang/Basic/Attr.td Wed Jul 19 07:02:18 2017 (r321185)
+++ vendor/clang/dist/include/clang/Basic/Attr.td Wed Jul 19 07:02:30 2017 (r321186)
@@ -1802,11 +1802,18 @@ def Target : InheritableAttr {
let Subjects = SubjectList<[Function], ErrorDiag>;
let Documentation = [TargetDocs];
let AdditionalMembers = [{
- typedef std::pair<std::vector<std::string>, StringRef> ParsedTargetAttr;
+ struct ParsedTargetAttr {
+ std::vector<std::string> Features;
+ StringRef Architecture;
+ bool DuplicateArchitecture = false;
+ };
ParsedTargetAttr parse() const {
+ return parse(getFeaturesStr());
+ }
+ static ParsedTargetAttr parse(StringRef Features) {
ParsedTargetAttr Ret;
SmallVector<StringRef, 1> AttrFeatures;
- getFeaturesStr().split(AttrFeatures, ",");
+ Features.split(AttrFeatures, ",");
// Grab the various features and prepend a "+" to turn on the feature to
// the backend and add them to our existing set of features.
@@ -1823,12 +1830,15 @@ def Target : InheritableAttr {
continue;
// While we're here iterating check for a different target cpu.
- if (Feature.startswith("arch="))
- Ret.second = Feature.split("=").second.trim();
- else if (Feature.startswith("no-"))
- Ret.first.push_back("-" + Feature.split("-").second.str());
+ if (Feature.startswith("arch=")) {
+ if (!Ret.Architecture.empty())
+ Ret.DuplicateArchitecture = true;
+ else
+ Ret.Architecture = Feature.split("=").second.trim();
+ } else if (Feature.startswith("no-"))
+ Ret.Features.push_back("-" + Feature.split("-").second.str());
else
- Ret.first.push_back("+" + Feature.str());
+ Ret.Features.push_back("+" + Feature.str());
}
return Ret;
}
Modified: vendor/clang/dist/include/clang/Basic/AttrDocs.td
==============================================================================
--- vendor/clang/dist/include/clang/Basic/AttrDocs.td Wed Jul 19 07:02:18 2017 (r321185)
+++ vendor/clang/dist/include/clang/Basic/AttrDocs.td Wed Jul 19 07:02:30 2017 (r321186)
@@ -910,13 +910,13 @@ the function declaration for a hypothetical function `
void f(void) __attribute__((availability(macos,introduced=10.4,deprecated=10.6,obsoleted=10.7)));
-The availability attribute states that ``f`` was introduced in Mac OS X 10.4,
-deprecated in Mac OS X 10.6, and obsoleted in Mac OS X 10.7. This information
+The availability attribute states that ``f`` was introduced in macOS 10.4,
+deprecated in macOS 10.6, and obsoleted in macOS 10.7. This information
is used by Clang to determine when it is safe to use ``f``: for example, if
-Clang is instructed to compile code for Mac OS X 10.5, a call to ``f()``
-succeeds. If Clang is instructed to compile code for Mac OS X 10.6, the call
+Clang is instructed to compile code for macOS 10.5, a call to ``f()``
+succeeds. If Clang is instructed to compile code for macOS 10.6, the call
succeeds but Clang emits a warning specifying that the function is deprecated.
-Finally, if Clang is instructed to compile code for Mac OS X 10.7, the call
+Finally, if Clang is instructed to compile code for macOS 10.7, the call
fails because ``f()`` is no longer available.
The availability attribute is a comma-separated list starting with the
@@ -961,7 +961,7 @@ are:
command-line arguments.
``macos``
- Apple's Mac OS X operating system. The minimum deployment target is
+ Apple's macOS operating system. The minimum deployment target is
specified by the ``-mmacosx-version-min=*version*`` command-line argument.
``macosx`` is supported for backward-compatibility reasons, but it is
deprecated.
@@ -1015,6 +1015,19 @@ When one method overrides another, the overriding meth
- (id)method __attribute__((availability(macos,introduced=10.3))); // okay: method moved into base class later
- (id)method __attribute__((availability(macos,introduced=10.5))); // error: this method was available via the base class in 10.4
@end
+
+Starting with the macOS 10.12 SDK, the ``API_AVAILABLE`` macro from
+``<os/availability.h>`` can simplify the spelling:
+
+.. code-block:: objc
+
+ @interface A
+ - (id)method API_AVAILABLE(macos(10.11)));
+ - (id)otherMethod API_AVAILABLE(macos(10.11), ios(11.0));
+ @end
+
+Also see the documentation for `@available
+<http://clang.llvm.org/docs/LanguageExtensions.html#objective-c-available>`_
}];
}
Modified: vendor/clang/dist/include/clang/Basic/Builtins.def
==============================================================================
--- vendor/clang/dist/include/clang/Basic/Builtins.def Wed Jul 19 07:02:18 2017 (r321185)
+++ vendor/clang/dist/include/clang/Basic/Builtins.def Wed Jul 19 07:02:30 2017 (r321186)
@@ -1413,6 +1413,11 @@ BUILTIN(__builtin_os_log_format, "v*v*cC*.", "p:0:nt")
// Builtins for XRay
BUILTIN(__xray_customevent, "vcC*z", "")
+// Win64-compatible va_list functions
+BUILTIN(__builtin_ms_va_start, "vc*&.", "nt")
+BUILTIN(__builtin_ms_va_end, "vc*&", "n")
+BUILTIN(__builtin_ms_va_copy, "vc*&c*&", "n")
+
#undef BUILTIN
#undef LIBBUILTIN
#undef LANGBUILTIN
Modified: vendor/clang/dist/include/clang/Basic/BuiltinsHexagon.def
==============================================================================
--- vendor/clang/dist/include/clang/Basic/BuiltinsHexagon.def Wed Jul 19 07:02:18 2017 (r321185)
+++ vendor/clang/dist/include/clang/Basic/BuiltinsHexagon.def Wed Jul 19 07:02:30 2017 (r321186)
@@ -882,6 +882,12 @@ BUILTIN(__builtin_HEXAGON_S2_ct0p,"iLLi","")
BUILTIN(__builtin_HEXAGON_S2_ct1p,"iLLi","")
BUILTIN(__builtin_HEXAGON_S2_interleave,"LLiLLi","")
BUILTIN(__builtin_HEXAGON_S2_deinterleave,"LLiLLi","")
+BUILTIN(__builtin_HEXAGON_Y2_dccleana,"vv*","")
+BUILTIN(__builtin_HEXAGON_Y2_dccleaninva,"vv*","")
+BUILTIN(__builtin_HEXAGON_Y2_dcinva,"vv*","")
+BUILTIN(__builtin_HEXAGON_Y2_dczeroa,"vv*","")
+BUILTIN(__builtin_HEXAGON_Y4_l2fetch,"vv*Ui","")
+BUILTIN(__builtin_HEXAGON_Y5_l2fetch,"vv*LLUi","")
BUILTIN(__builtin_HEXAGON_S6_rol_i_r,"iii","v:60:")
BUILTIN(__builtin_HEXAGON_S6_rol_i_p,"LLiLLii","v:60:")
Modified: vendor/clang/dist/include/clang/Basic/BuiltinsSystemZ.def
==============================================================================
--- vendor/clang/dist/include/clang/Basic/BuiltinsSystemZ.def Wed Jul 19 07:02:18 2017 (r321185)
+++ vendor/clang/dist/include/clang/Basic/BuiltinsSystemZ.def Wed Jul 19 07:02:30 2017 (r321186)
@@ -253,5 +253,29 @@ TARGET_BUILTIN(__builtin_s390_vfmsdb, "V2dV2dV2dV2d",
TARGET_BUILTIN(__builtin_s390_vfsqdb, "V2dV2d", "nc", "vector")
TARGET_BUILTIN(__builtin_s390_vftcidb, "V2SLLiV2dIii*", "nc", "vector")
+// Vector-enhancements facility 1 intrinsics.
+TARGET_BUILTIN(__builtin_s390_vlrl, "V16ScUivC*", "", "vector-enhancements-1")
+TARGET_BUILTIN(__builtin_s390_vstrl, "vV16ScUiv*", "", "vector-enhancements-1")
+TARGET_BUILTIN(__builtin_s390_vbperm, "V2ULLiV16UcV16Uc", "nc", "vector-enhancements-1")
+TARGET_BUILTIN(__builtin_s390_vmslg, "V16UcV2ULLiV2ULLiV16UcIi", "nc", "vector-enhancements-1")
+TARGET_BUILTIN(__builtin_s390_vfmaxdb, "V2dV2dV2dIi", "nc", "vector-enhancements-1")
+TARGET_BUILTIN(__builtin_s390_vfmindb, "V2dV2dV2dIi", "nc", "vector-enhancements-1")
+TARGET_BUILTIN(__builtin_s390_vfnmadb, "V2dV2dV2dV2d", "nc", "vector-enhancements-1")
+TARGET_BUILTIN(__builtin_s390_vfnmsdb, "V2dV2dV2dV2d", "nc", "vector-enhancements-1")
+TARGET_BUILTIN(__builtin_s390_vfcesbs, "V4SiV4fV4fi*", "nc", "vector-enhancements-1")
+TARGET_BUILTIN(__builtin_s390_vfchsbs, "V4SiV4fV4fi*", "nc", "vector-enhancements-1")
+TARGET_BUILTIN(__builtin_s390_vfchesbs, "V4SiV4fV4fi*", "nc", "vector-enhancements-1")
+TARGET_BUILTIN(__builtin_s390_vfisb, "V4fV4fIiIi", "nc", "vector-enhancements-1")
+TARGET_BUILTIN(__builtin_s390_vfmaxsb, "V4fV4fV4fIi", "nc", "vector-enhancements-1")
+TARGET_BUILTIN(__builtin_s390_vfminsb, "V4fV4fV4fIi", "nc", "vector-enhancements-1")
+TARGET_BUILTIN(__builtin_s390_vflnsb, "V4fV4f", "nc", "vector-enhancements-1")
+TARGET_BUILTIN(__builtin_s390_vflpsb, "V4fV4f", "nc", "vector-enhancements-1")
+TARGET_BUILTIN(__builtin_s390_vfmasb, "V4fV4fV4fV4f", "nc", "vector-enhancements-1")
+TARGET_BUILTIN(__builtin_s390_vfmssb, "V4fV4fV4fV4f", "nc", "vector-enhancements-1")
+TARGET_BUILTIN(__builtin_s390_vfnmasb, "V4fV4fV4fV4f", "nc", "vector-enhancements-1")
+TARGET_BUILTIN(__builtin_s390_vfnmssb, "V4fV4fV4fV4f", "nc", "vector-enhancements-1")
+TARGET_BUILTIN(__builtin_s390_vfsqsb, "V4fV4f", "nc", "vector-enhancements-1")
+TARGET_BUILTIN(__builtin_s390_vftcisb, "V4SiV4fIii*", "nc", "vector-enhancements-1")
+
#undef BUILTIN
#undef TARGET_BUILTIN
Modified: vendor/clang/dist/include/clang/Basic/BuiltinsX86.def
==============================================================================
--- vendor/clang/dist/include/clang/Basic/BuiltinsX86.def Wed Jul 19 07:02:18 2017 (r321185)
+++ vendor/clang/dist/include/clang/Basic/BuiltinsX86.def Wed Jul 19 07:02:30 2017 (r321186)
@@ -34,11 +34,6 @@
// can use it?
BUILTIN(__builtin_cpu_supports, "bcC*", "nc")
-// Win64-compatible va_list functions
-BUILTIN(__builtin_ms_va_start, "vc*&.", "nt")
-BUILTIN(__builtin_ms_va_end, "vc*&", "n")
-BUILTIN(__builtin_ms_va_copy, "vc*&c*&", "n")
-
// Undefined Values
//
TARGET_BUILTIN(__builtin_ia32_undef128, "V2d", "nc", "")
Modified: vendor/clang/dist/include/clang/Basic/DiagnosticGroups.td
==============================================================================
--- vendor/clang/dist/include/clang/Basic/DiagnosticGroups.td Wed Jul 19 07:02:18 2017 (r321185)
+++ vendor/clang/dist/include/clang/Basic/DiagnosticGroups.td Wed Jul 19 07:02:30 2017 (r321186)
@@ -152,6 +152,8 @@ def GNUFoldingConstant : DiagGroup<"gnu-folding-consta
def FormatExtraArgs : DiagGroup<"format-extra-args">;
def FormatZeroLength : DiagGroup<"format-zero-length">;
def CXX1zCompatMangling : DiagGroup<"c++1z-compat-mangling">;
+// Name of this warning in GCC.
+def NoexceptType : DiagGroup<"noexcept-type", [CXX1zCompatMangling]>;
// Warnings for C++1y code which is not compatible with prior C++ standards.
def CXXPre14Compat : DiagGroup<"c++98-c++11-compat">;
Modified: vendor/clang/dist/include/clang/Basic/DiagnosticIDs.h
==============================================================================
--- vendor/clang/dist/include/clang/Basic/DiagnosticIDs.h Wed Jul 19 07:02:18 2017 (r321185)
+++ vendor/clang/dist/include/clang/Basic/DiagnosticIDs.h Wed Jul 19 07:02:30 2017 (r321186)
@@ -18,6 +18,7 @@
#include "clang/Basic/LLVM.h"
#include "llvm/ADT/IntrusiveRefCntPtr.h"
#include "llvm/ADT/StringRef.h"
+#include <vector>
namespace clang {
class DiagnosticsEngine;
@@ -262,6 +263,13 @@ class DiagnosticIDs : public RefCountedBase<Diagnostic
/// errors, such as those errors that involve C++ access control,
/// are not SFINAE errors.
static SFINAEResponse getDiagnosticSFINAEResponse(unsigned DiagID);
+
+ /// \brief Get the string of all diagnostic flags.
+ ///
+ /// \returns A list of all diagnostics flags as they would be written in a
+ /// command line invocation including their `no-` variants. For example:
+ /// `{"-Wempty-body", "-Wno-empty-body", ...}`
+ static std::vector<std::string> getDiagnosticFlags();
/// \brief Get the set of all diagnostic IDs in the group with the given name.
///
Modified: vendor/clang/dist/include/clang/Basic/DiagnosticSemaKinds.td
==============================================================================
--- vendor/clang/dist/include/clang/Basic/DiagnosticSemaKinds.td Wed Jul 19 07:02:18 2017 (r321185)
+++ vendor/clang/dist/include/clang/Basic/DiagnosticSemaKinds.td Wed Jul 19 07:02:30 2017 (r321186)
@@ -808,8 +808,10 @@ def warn_property_types_are_incompatible : Warning<
"property type %0 is incompatible with type %1 inherited from %2">,
InGroup<DiagGroup<"incompatible-property-type">>;
def warn_protocol_property_mismatch : Warning<
- "property of type %0 was selected for synthesis">,
+ "property %select{of type %1|with attribute '%1'|without attribute '%1'|with "
+ "getter %1|with setter %1}0 was selected for synthesis">,
InGroup<DiagGroup<"protocol-property-synthesis-ambiguity">>;
+def err_protocol_property_mismatch: Error<warn_protocol_property_mismatch.Text>;
def err_undef_interface : Error<"cannot find interface declaration for %0">;
def err_category_forward_interface : Error<
"cannot define %select{category|class extension}0 for undefined class %1">;
@@ -1088,7 +1090,9 @@ def err_category_property : Error<
def note_property_declare : Note<
"property declared here">;
def note_protocol_property_declare : Note<
- "it could also be property of type %0 declared here">;
+ "it could also be property "
+ "%select{of type %1|without attribute '%1'|with attribute '%1'|with getter "
+ "%1|with setter %1}0 declared here">;
def note_property_synthesize : Note<
"property synthesized here">;
def err_synthesize_category_decl : Error<
@@ -4575,8 +4579,11 @@ def warn_deprecated_fwdclass_message : Warning<
"%0 may be deprecated because the receiver type is unknown">,
InGroup<DeprecatedDeclarations>;
def warn_deprecated_def : Warning<
- "Implementing deprecated %select{method|class|category}0">,
- InGroup<DeprecatedImplementations>, DefaultIgnore;
+ "implementing deprecated %select{method|class|category}0">,
+ InGroup<DeprecatedImplementations>, DefaultIgnore;
+def warn_unavailable_def : Warning<
+ "implementing unavailable method">,
+ InGroup<DeprecatedImplementations>, DefaultIgnore;
def err_unavailable : Error<"%0 is unavailable">;
def err_property_method_unavailable :
Error<"property access is using %0 method which is unavailable">;
@@ -8106,10 +8113,10 @@ def err_systemz_invalid_tabort_code : Error<
"invalid transaction abort code">;
def err_64_bit_builtin_32_bit_tgt : Error<
"this builtin is only available on 64-bit targets">;
+def err_builtin_x64_aarch64_only : Error<
+ "this builtin is only available on x86-64 and aarch64 targets">;
def err_ppc_builtin_only_on_pwr7 : Error<
"this builtin is only valid on POWER7 or later CPUs">;
-def err_x86_builtin_64_only : Error<
- "this builtin is only available on x86-64 targets">;
def err_x86_builtin_invalid_rounding : Error<
"invalid rounding argument">;
def err_x86_builtin_invalid_scale : Error<
@@ -8648,11 +8655,11 @@ def err_omp_unknown_reduction_identifier : Error<
def err_omp_not_resolved_reduction_identifier : Error<
"unable to resolve declare reduction construct for type %0">;
def err_omp_reduction_ref_type_arg : Error<
- "argument of OpenMP clause 'reduction' must reference the same object in all threads">;
+ "argument of OpenMP clause '%0' must reference the same object in all threads">;
def err_omp_clause_not_arithmetic_type_arg : Error<
- "arguments of OpenMP clause 'reduction' for 'min' or 'max' must be of %select{scalar|arithmetic}0 type">;
+ "arguments of OpenMP clause '%0' for 'min' or 'max' must be of %select{scalar|arithmetic}1 type">;
def err_omp_clause_floating_type_arg : Error<
- "arguments of OpenMP clause 'reduction' with bitwise operators cannot be of floating type">;
+ "arguments of OpenMP clause '%0' with bitwise operators cannot be of floating type">;
def err_omp_once_referenced : Error<
"variable can appear only once in OpenMP '%0' clause">;
def err_omp_once_referenced_in_target_update : Error<
Modified: vendor/clang/dist/include/clang/Basic/DiagnosticSerializationKinds.td
==============================================================================
--- vendor/clang/dist/include/clang/Basic/DiagnosticSerializationKinds.td Wed Jul 19 07:02:18 2017 (r321185)
+++ vendor/clang/dist/include/clang/Basic/DiagnosticSerializationKinds.td Wed Jul 19 07:02:30 2017 (r321186)
@@ -147,18 +147,29 @@ def err_module_odr_violation_mismatch_decl_diff : Erro
"%select{non-|}5mutable field %4|"
"field %4 with %select{no|an}5 initalizer|"
"field %4 with an initializer|"
- "method %4|"
- "method %4 is %select{not deleted|deleted}5|"
- "method %4 is %select{|pure }5%select{not virtual|virtual}6|"
- "method %4 is %select{not static|static}5|"
- "method %4 is %select{not volatile|volatile}5|"
- "method %4 is %select{not const|const}5|"
- "method %4 is %select{not inline|inline}5|"
- "method %4 that has %5 parameter%s5|"
- "method %4 with %ordinal5 parameter of type %6%select{| decayed from %8}7|"
- "method %4 with %ordinal5 parameter named %6|"
- "method %4 with %ordinal5 parameter with%select{out|}6 a default argument|"
- "method %4 with %ordinal5 parameter with a default argument|"
+ "%select{method %5|constructor|destructor}4|"
+ "%select{method %5|constructor|destructor}4 "
+ "is %select{not deleted|deleted}6|"
+ "%select{method %5|constructor|destructor}4 "
+ "is %select{|pure }6%select{not virtual|virtual}7|"
+ "%select{method %5|constructor|destructor}4 "
+ "is %select{not static|static}6|"
+ "%select{method %5|constructor|destructor}4 "
+ "is %select{not volatile|volatile}6|"
+ "%select{method %5|constructor|destructor}4 "
+ "is %select{not const|const}6|"
+ "%select{method %5|constructor|destructor}4 "
+ "is %select{not inline|inline}6|"
+ "%select{method %5|constructor|destructor}4 "
+ "that has %6 parameter%s6|"
+ "%select{method %5|constructor|destructor}4 "
+ "with %ordinal6 parameter of type %7%select{| decayed from %9}8|"
+ "%select{method %5|constructor|destructor}4 "
+ "with %ordinal6 parameter named %7|"
+ "%select{method %5|constructor|destructor}4 "
+ "with %ordinal6 parameter with%select{out|}7 a default argument|"
+ "%select{method %5|constructor|destructor}4 "
+ "with %ordinal6 parameter with a default argument|"
"%select{typedef|type alias}4 name %5|"
"%select{typedef|type alias}4 %5 with underlying type %6|"
"data member with name %4|"
@@ -183,18 +194,29 @@ def note_module_odr_violation_mismatch_decl_diff : Not
"%select{non-|}3mutable field %2|"
"field %2 with %select{no|an}3 initializer|"
"field %2 with a different initializer|"
- "method %2|"
- "method %2 is %select{not deleted|deleted}3|"
- "method %2 is %select{|pure }3%select{not virtual|virtual}4|"
- "method %2 is %select{not static|static}3|"
- "method %2 is %select{not volatile|volatile}3|"
- "method %2 is %select{not const|const}3|"
- "method %2 is %select{not inline|inline}3|"
- "method %2 that has %3 parameter%s3|"
- "method %2 with %ordinal3 parameter of type %4%select{| decayed from %6}5|"
- "method %2 with %ordinal3 parameter named %4|"
- "method %2 with %ordinal3 parameter with%select{out|}4 a default argument|"
- "method %2 with %ordinal3 parameter with a different default argument|"
+ "%select{method %3|constructor|destructor}2|"
+ "%select{method %3|constructor|destructor}2 "
+ "is %select{not deleted|deleted}4|"
+ "%select{method %3|constructor|destructor}2 "
+ "is %select{|pure }4%select{not virtual|virtual}5|"
+ "%select{method %3|constructor|destructor}2 "
+ "is %select{not static|static}4|"
+ "%select{method %3|constructor|destructor}2 "
+ "is %select{not volatile|volatile}4|"
+ "%select{method %3|constructor|destructor}2 "
+ "is %select{not const|const}4|"
+ "%select{method %3|constructor|destructor}2 "
+ "is %select{not inline|inline}4|"
+ "%select{method %3|constructor|destructor}2 "
+ "that has %4 parameter%s4|"
+ "%select{method %3|constructor|destructor}2 "
+ "with %ordinal4 parameter of type %5%select{| decayed from %7}6|"
+ "%select{method %3|constructor|destructor}2 "
+ "with %ordinal4 parameter named %5|"
+ "%select{method %3|constructor|destructor}2 "
+ "with %ordinal4 parameter with%select{out|}5 a default argument|"
+ "%select{method %3|constructor|destructor}2 "
+ "with %ordinal4 parameter with a different default argument|"
"%select{typedef|type alias}2 name %3|"
"%select{typedef|type alias}2 %3 with different underlying type %4|"
"data member with name %2|"
Modified: vendor/clang/dist/include/clang/Basic/IdentifierTable.h
==============================================================================
--- vendor/clang/dist/include/clang/Basic/IdentifierTable.h Wed Jul 19 07:02:18 2017 (r321185)
+++ vendor/clang/dist/include/clang/Basic/IdentifierTable.h Wed Jul 19 07:02:30 2017 (r321186)
@@ -272,10 +272,6 @@ class IdentifierInfo { (public)
/// this identifier is a C++ alternate representation of an operator.
void setIsCPlusPlusOperatorKeyword(bool Val = true) {
IsCPPOperatorKeyword = Val;
- if (Val)
- NeedsHandleIdentifier = true;
- else
- RecomputeNeedsHandleIdentifier();
}
bool isCPlusPlusOperatorKeyword() const { return IsCPPOperatorKeyword; }
@@ -381,10 +377,9 @@ class IdentifierInfo { (public)
/// This method is very tied to the definition of HandleIdentifier. Any
/// change to it should be reflected here.
void RecomputeNeedsHandleIdentifier() {
- NeedsHandleIdentifier =
- (isPoisoned() | hasMacroDefinition() | isCPlusPlusOperatorKeyword() |
- isExtensionToken() | isFutureCompatKeyword() || isOutOfDate() ||
- isModulesImport());
+ NeedsHandleIdentifier = isPoisoned() || hasMacroDefinition() ||
+ isExtensionToken() || isFutureCompatKeyword() ||
+ isOutOfDate() || isModulesImport();
}
};
Modified: vendor/clang/dist/include/clang/Basic/LangOptions.def
==============================================================================
--- vendor/clang/dist/include/clang/Basic/LangOptions.def Wed Jul 19 07:02:18 2017 (r321185)
+++ vendor/clang/dist/include/clang/Basic/LangOptions.def Wed Jul 19 07:02:30 2017 (r321186)
@@ -90,6 +90,7 @@ LANGOPT(CPlusPlus , 1, 0, "C++")
LANGOPT(CPlusPlus11 , 1, 0, "C++11")
LANGOPT(CPlusPlus14 , 1, 0, "C++14")
*** DIFF OUTPUT TRUNCATED AT 1000 LINES ***
More information about the svn-src-vendor
mailing list