Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 20 Aug 2017 21:03:31 +0000 (UTC)
From:      Dimitry Andric <dim@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org
Subject:   svn commit: r322729 - in vendor/clang/dist: docs include/clang-c include/clang/AST include/clang/Basic include/clang/Driver include/clang/Frontend lib/AST lib/Basic lib/CodeGen lib/Driver lib/Drive...
Message-ID:  <201708202103.v7KL3VPd015461@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: dim
Date: Sun Aug 20 21:03:30 2017
New Revision: 322729
URL: https://svnweb.freebsd.org/changeset/base/322729

Log:
  Vendor import of clang release_50 branch r311219:
  https://llvm.org/svn/llvm-project/cfe/branches/release_50@311219

Added:
  vendor/clang/dist/test/CodeCompletion/uninstantiated_params.cpp   (contents, props changed)
  vendor/clang/dist/test/CodeGen/arm-float-helpers.c   (contents, props changed)
  vendor/clang/dist/test/CodeGen/mips-madd4.c   (contents, props changed)
  vendor/clang/dist/test/CodeGenCXX/pr34163.cpp   (contents, props changed)
  vendor/clang/dist/test/Modules/Inputs/innerstructredef.h   (contents, props changed)
  vendor/clang/dist/test/Modules/inner-struct-redefines-invisible.m
Deleted:
  vendor/clang/dist/test/CodeGen/mips-aggregate-arg.c
Modified:
  vendor/clang/dist/docs/ReleaseNotes.rst
  vendor/clang/dist/include/clang-c/Index.h
  vendor/clang/dist/include/clang/AST/Decl.h
  vendor/clang/dist/include/clang/Basic/DiagnosticDriverKinds.td
  vendor/clang/dist/include/clang/Basic/DiagnosticGroups.td
  vendor/clang/dist/include/clang/Basic/DiagnosticLexKinds.td
  vendor/clang/dist/include/clang/Basic/DiagnosticParseKinds.td
  vendor/clang/dist/include/clang/Basic/DiagnosticSemaKinds.td
  vendor/clang/dist/include/clang/Driver/Options.td
  vendor/clang/dist/include/clang/Driver/ToolChain.h
  vendor/clang/dist/include/clang/Frontend/LangStandards.def
  vendor/clang/dist/lib/AST/DeclCXX.cpp
  vendor/clang/dist/lib/AST/ExprCXX.cpp
  vendor/clang/dist/lib/AST/ExprConstant.cpp
  vendor/clang/dist/lib/Basic/Targets.cpp
  vendor/clang/dist/lib/CodeGen/TargetInfo.cpp
  vendor/clang/dist/lib/Driver/ToolChain.cpp
  vendor/clang/dist/lib/Driver/ToolChains/Arch/Mips.cpp
  vendor/clang/dist/lib/Driver/ToolChains/Clang.cpp
  vendor/clang/dist/lib/Driver/ToolChains/CrossWindows.cpp
  vendor/clang/dist/lib/Driver/ToolChains/CrossWindows.h
  vendor/clang/dist/lib/Driver/ToolChains/Darwin.cpp
  vendor/clang/dist/lib/Driver/ToolChains/Darwin.h
  vendor/clang/dist/lib/Driver/ToolChains/Gnu.cpp
  vendor/clang/dist/lib/Driver/ToolChains/Gnu.h
  vendor/clang/dist/lib/Driver/ToolChains/MSVC.cpp
  vendor/clang/dist/lib/Driver/ToolChains/MSVC.h
  vendor/clang/dist/lib/Driver/ToolChains/MinGW.cpp
  vendor/clang/dist/lib/Driver/ToolChains/MinGW.h
  vendor/clang/dist/lib/Driver/ToolChains/NetBSD.h
  vendor/clang/dist/lib/Frontend/InitPreprocessor.cpp
  vendor/clang/dist/lib/Parse/ParseCXXInlineMethods.cpp
  vendor/clang/dist/lib/Sema/SemaCast.cpp
  vendor/clang/dist/lib/Sema/SemaCodeComplete.cpp
  vendor/clang/dist/lib/Sema/SemaDecl.cpp
  vendor/clang/dist/lib/Sema/SemaTemplateInstantiateDecl.cpp
  vendor/clang/dist/test/CXX/dcl.dcl/dcl.attr/dcl.attr.nodiscard/p2.cpp
  vendor/clang/dist/test/CXX/dcl.dcl/dcl.attr/dcl.attr.unused/p3.cpp
  vendor/clang/dist/test/CXX/drs/dr0xx.cpp
  vendor/clang/dist/test/CXX/drs/dr13xx.cpp
  vendor/clang/dist/test/CXX/drs/dr1xx.cpp
  vendor/clang/dist/test/CXX/drs/dr20xx.cpp
  vendor/clang/dist/test/CXX/drs/dr2xx.cpp
  vendor/clang/dist/test/CXX/drs/dr4xx.cpp
  vendor/clang/dist/test/CXX/drs/dr5xx.cpp
  vendor/clang/dist/test/CXX/stmt.stmt/stmt.iter/stmt.ranged/p1.cpp
  vendor/clang/dist/test/CodeGen/complex-math.c
  vendor/clang/dist/test/Driver/clang-translation.c
  vendor/clang/dist/test/Driver/darwin-version.c
  vendor/clang/dist/test/Driver/unknown-std.cpp
  vendor/clang/dist/test/FixIt/fixit.cpp
  vendor/clang/dist/test/Lexer/cxx-features.cpp
  vendor/clang/dist/test/Lexer/hexfloat.cpp
  vendor/clang/dist/test/Modules/Inputs/module.map
  vendor/clang/dist/test/Parser/cxx0x-attributes.cpp
  vendor/clang/dist/test/Parser/cxx1z-constexpr-lambdas.cpp
  vendor/clang/dist/test/Parser/cxx1z-nested-namespace-definition.cpp
  vendor/clang/dist/test/Preprocessor/init.c
  vendor/clang/dist/test/SemaCUDA/function-overload.cu
  vendor/clang/dist/test/SemaCUDA/no-destructor-overload.cu
  vendor/clang/dist/test/SemaCXX/constant-expression-cxx1y.cpp
  vendor/clang/dist/test/SemaCXX/cxx0x-compat.cpp
  vendor/clang/dist/test/SemaCXX/cxx1z-class-template-argument-deduction.cpp
  vendor/clang/dist/test/SemaCXX/cxx1z-init-statement.cpp
  vendor/clang/dist/test/SemaCXX/deprecated.cpp
  vendor/clang/dist/test/SemaCXX/inline.cpp
  vendor/clang/dist/test/SemaCXX/static-assert.cpp
  vendor/clang/dist/test/SemaCXX/warn-c++1z-extensions.cpp
  vendor/clang/dist/test/SemaCXX/warn-shadow.cpp
  vendor/clang/dist/test/SemaObjC/illegal-nonarc-bridged-cast.m
  vendor/clang/dist/test/SemaTemplate/temp_arg_nontype_cxx11.cpp
  vendor/clang/dist/www/cxx_dr_status.html
  vendor/clang/dist/www/cxx_status.html
  vendor/clang/dist/www/make_cxx_dr_status

Modified: vendor/clang/dist/docs/ReleaseNotes.rst
==============================================================================
--- vendor/clang/dist/docs/ReleaseNotes.rst	Sun Aug 20 21:02:51 2017	(r322728)
+++ vendor/clang/dist/docs/ReleaseNotes.rst	Sun Aug 20 21:03:30 2017	(r322729)
@@ -61,7 +61,7 @@ Improvements to Clang's diagnostics
 New Compiler Flags
 ------------------
 
-The option ....
+- --autocomplete was implemented to obtain a list of flags and its arguments. This is used for shell autocompletion.
 
 Deprecated Compiler Flags
 -------------------------
@@ -200,7 +200,13 @@ libclang
 Static Analyzer
 ---------------
 
-...
+- The static analyzer now supports using the
+  `z3 theorem prover <https://github.com/z3prover/z3>`_ from Microsoft Research
+  as an external constraint solver. This allows reasoning over more complex
+  queries, but performance is ~15x slower than the default range-based
+  constraint solver. To enable the z3 solver backend, clang must be built with
+  the ``CLANG_ANALYZER_BUILD_Z3=ON`` option, and the
+  ``-Xanalyzer -analyzer-constraints=z3`` arguments passed at runtime.
 
 Undefined Behavior Sanitizer (UBSan)
 ------------------------------------
@@ -240,7 +246,19 @@ New Issues Found
 Python Binding Changes
 ----------------------
 
+Python bindings now support both Python 2 and Python 3. 
+
 The following methods have been added:
+
+- ``is_scoped_enum`` has been added to ``Cursor``.
+
+- ``exception_specification_kind`` has been added to ``Cursor``.
+
+- ``get_address_space`` has been added to ``Type``.
+
+- ``get_typedef_name`` has been added to ``Type``.
+
+- ``get_exception_specification_kind`` has been added to ``Type``.
 
 -  ...
 

Modified: vendor/clang/dist/include/clang-c/Index.h
==============================================================================
--- vendor/clang/dist/include/clang-c/Index.h	Sun Aug 20 21:02:51 2017	(r322728)
+++ vendor/clang/dist/include/clang-c/Index.h	Sun Aug 20 21:03:30 2017	(r322729)
@@ -3206,6 +3206,8 @@ enum CXCallingConv {
   CXCallingConv_X86RegCall = 8,
   CXCallingConv_IntelOclBicc = 9,
   CXCallingConv_Win64 = 10,
+  /* Alias for compatibility with older versions of API. */
+  CXCallingConv_X86_64Win64 = CXCallingConv_Win64,
   CXCallingConv_X86_64SysV = 11,
   CXCallingConv_X86VectorCall = 12,
   CXCallingConv_Swift = 13,

Modified: vendor/clang/dist/include/clang/AST/Decl.h
==============================================================================
--- vendor/clang/dist/include/clang/AST/Decl.h	Sun Aug 20 21:02:51 2017	(r322728)
+++ vendor/clang/dist/include/clang/AST/Decl.h	Sun Aug 20 21:03:30 2017	(r322729)
@@ -1666,8 +1666,7 @@ class FunctionDecl : public DeclaratorDecl, public Dec
   unsigned HasSkippedBody : 1;
 
   /// Indicates if the function declaration will have a body, once we're done
-  /// parsing it.  (We don't set it to false when we're done parsing, in the
-  /// hopes this is simpler.)
+  /// parsing it.
   unsigned WillHaveBody : 1;
 
   /// \brief End part of this FunctionDecl's source range.

Modified: vendor/clang/dist/include/clang/Basic/DiagnosticDriverKinds.td
==============================================================================
--- vendor/clang/dist/include/clang/Basic/DiagnosticDriverKinds.td	Sun Aug 20 21:02:51 2017	(r322728)
+++ vendor/clang/dist/include/clang/Basic/DiagnosticDriverKinds.td	Sun Aug 20 21:03:30 2017	(r322729)
@@ -138,9 +138,10 @@ def err_drv_cc_print_options_failure : Error<
 def err_drv_lto_without_lld : Error<"LTO requires -fuse-ld=lld">;
 def err_drv_preamble_format : Error<
     "incorrect format for -preamble-bytes=N,END">;
-def err_invalid_ios_deployment_target : Error<
+def warn_invalid_ios_deployment_target : Warning<
   "invalid iOS deployment version '%0', iOS 10 is the maximum deployment "
-  "target for 32-bit targets">;
+  "target for 32-bit targets">, InGroup<InvalidIOSDeploymentTarget>,
+  DefaultError;
 def err_drv_conflicting_deployment_targets : Error<
   "conflicting deployment targets, both '%0' and '%1' are present in environment">;
 def err_arc_unsupported_on_runtime : Error<

Modified: vendor/clang/dist/include/clang/Basic/DiagnosticGroups.td
==============================================================================
--- vendor/clang/dist/include/clang/Basic/DiagnosticGroups.td	Sun Aug 20 21:02:51 2017	(r322728)
+++ vendor/clang/dist/include/clang/Basic/DiagnosticGroups.td	Sun Aug 20 21:03:30 2017	(r322729)
@@ -151,9 +151,13 @@ def GNUFlexibleArrayUnionMember : DiagGroup<"gnu-flexi
 def GNUFoldingConstant : DiagGroup<"gnu-folding-constant">;
 def FormatExtraArgs : DiagGroup<"format-extra-args">;
 def FormatZeroLength : DiagGroup<"format-zero-length">;
-def CXX1zCompatMangling : DiagGroup<"c++1z-compat-mangling">;
+
+def InvalidIOSDeploymentTarget : DiagGroup<"invalid-ios-deployment-target">;
+
+def CXX17CompatMangling : DiagGroup<"c++17-compat-mangling">;
+def : DiagGroup<"c++1z-compat-mangling", [CXX17CompatMangling]>;
 // Name of this warning in GCC.
-def NoexceptType : DiagGroup<"noexcept-type", [CXX1zCompatMangling]>;
+def NoexceptType : DiagGroup<"noexcept-type", [CXX17CompatMangling]>;
 
 // Warnings for C++1y code which is not compatible with prior C++ standards.
 def CXXPre14Compat : DiagGroup<"c++98-c++11-compat">;
@@ -215,9 +219,10 @@ def CXX14Compat : DiagGroup<"c++14-compat", [CXXPre1zC
 def CXX14CompatPedantic : DiagGroup<"c++14-compat-pedantic",
                                     [CXXPre1zCompatPedantic]>;
 
-def CXX1zCompat : DiagGroup<"c++1z-compat", [DeprecatedRegister,
+def CXX17Compat : DiagGroup<"c++17-compat", [DeprecatedRegister,
                                              DeprecatedIncrementBool,
-                                             CXX1zCompatMangling]>;
+                                             CXX17CompatMangling]>;
+def : DiagGroup<"c++1z-compat", [CXX17Compat]>;
 
 def ExitTimeDestructors : DiagGroup<"exit-time-destructors">;
 def FlexibleArrayExtensions : DiagGroup<"flexible-array-extensions">;
@@ -769,10 +774,11 @@ def CXX14 : DiagGroup<"c++14-extensions", [CXX14Binary
 
 // A warning group for warnings about using C++1z features as extensions in
 // earlier C++ versions.
-def CXX1z : DiagGroup<"c++1z-extensions">;
+def CXX17 : DiagGroup<"c++17-extensions">;
 
 def : DiagGroup<"c++0x-extensions", [CXX11]>;
 def : DiagGroup<"c++1y-extensions", [CXX14]>;
+def : DiagGroup<"c++1z-extensions", [CXX17]>;
 
 def DelegatingCtorCycles :
   DiagGroup<"delegating-ctor-cycles">;

Modified: vendor/clang/dist/include/clang/Basic/DiagnosticLexKinds.td
==============================================================================
--- vendor/clang/dist/include/clang/Basic/DiagnosticLexKinds.td	Sun Aug 20 21:02:51 2017	(r322728)
+++ vendor/clang/dist/include/clang/Basic/DiagnosticLexKinds.td	Sun Aug 20 21:03:30 2017	(r322729)
@@ -181,10 +181,10 @@ def err_hex_constant_requires : Error<
 def ext_hex_constant_invalid : Extension<
   "hexadecimal floating constants are a C99 feature">, InGroup<C99>;
 def ext_hex_literal_invalid : Extension<
-  "hexadecimal floating literals are a C++1z feature">, InGroup<CXX1z>;
+  "hexadecimal floating literals are a C++17 feature">, InGroup<CXX17>;
 def warn_cxx1z_hex_literal : Warning<
   "hexadecimal floating literals are incompatible with "
-  "C++ standards before C++1z">,
+  "C++ standards before C++17">,
   InGroup<CXXPre1zCompatPedantic>, DefaultIgnore;
 def ext_binary_literal : Extension<
   "binary integer literals are a GNU extension">, InGroup<GNUBinaryLiteral>;
@@ -208,7 +208,7 @@ def warn_cxx98_compat_unicode_literal : Warning<
   "unicode literals are incompatible with C++98">,
   InGroup<CXX98Compat>, DefaultIgnore;
 def warn_cxx14_compat_u8_character_literal : Warning<
-  "unicode literals are incompatible with C++ standards before C++1z">,
+  "unicode literals are incompatible with C++ standards before C++17">,
   InGroup<CXXPre1zCompat>, DefaultIgnore;
 def warn_cxx11_compat_user_defined_literal : Warning<
   "identifier after literal will be treated as a user-defined literal suffix "

Modified: vendor/clang/dist/include/clang/Basic/DiagnosticParseKinds.td
==============================================================================
--- vendor/clang/dist/include/clang/Basic/DiagnosticParseKinds.td	Sun Aug 20 21:02:51 2017	(r322728)
+++ vendor/clang/dist/include/clang/Basic/DiagnosticParseKinds.td	Sun Aug 20 21:03:30 2017	(r322729)
@@ -211,10 +211,10 @@ def err_inline_namespace_alias : Error<"namespace alia
 def err_namespace_nonnamespace_scope : Error<
   "namespaces can only be defined in global or namespace scope">;
 def ext_nested_namespace_definition : ExtWarn<
-  "nested namespace definition is a C++1z extension; "
-  "define each namespace separately">, InGroup<CXX1z>;
+  "nested namespace definition is a C++17 extension; "
+  "define each namespace separately">, InGroup<CXX17>;
 def warn_cxx14_compat_nested_namespace_definition : Warning<
-  "nested namespace definition is incompatible with C++ standards before C++1z">,
+  "nested namespace definition is incompatible with C++ standards before C++17">,
   InGroup<CXXPre1zCompat>, DefaultIgnore;
 def err_inline_nested_namespace_definition : Error<
   "nested namespace definition cannot be 'inline'">;
@@ -358,7 +358,7 @@ def err_expected_coloncolon_after_super : Error<
   "expected '::' after '__super'">;
 
 def ext_decomp_decl_empty : ExtWarn<
-  "ISO C++1z does not allow a decomposition group to be empty">,
+  "ISO C++17 does not allow a decomposition group to be empty">,
   InGroup<DiagGroup<"empty-decomposition">>;
 
 /// Objective-C parser diagnostics
@@ -522,16 +522,16 @@ def err_function_is_not_record : Error<
 def err_super_in_using_declaration : Error<
   "'__super' cannot be used with a using declaration">;
 def ext_constexpr_if : ExtWarn<
-  "constexpr if is a C++1z extension">, InGroup<CXX1z>;
+  "constexpr if is a C++17 extension">, InGroup<CXX17>;
 def warn_cxx14_compat_constexpr_if : Warning<
-  "constexpr if is incompatible with C++ standards before C++1z">,
+  "constexpr if is incompatible with C++ standards before C++17">,
   DefaultIgnore, InGroup<CXXPre1zCompat>;
 def ext_init_statement : ExtWarn<
-  "'%select{if|switch}0' initialization statements are a C++1z extension">,
-  InGroup<CXX1z>;
+  "'%select{if|switch}0' initialization statements are a C++17 extension">,
+  InGroup<CXX17>;
 def warn_cxx14_compat_init_statement : Warning<
   "%select{if|switch}0 initialization statements are incompatible with "
-  "C++ standards before C++1z">, DefaultIgnore, InGroup<CXXPre1zCompat>;
+  "C++ standards before C++17">, DefaultIgnore, InGroup<CXXPre1zCompat>;
 
 // C++ derived classes
 def err_dup_virtual : Error<"duplicate 'virtual' in base specifier">;
@@ -560,7 +560,7 @@ def warn_cxx98_compat_nullptr : Warning<
 
 def warn_cxx14_compat_attribute : Warning<
   "attributes on %select{a namespace|an enumerator}0 declaration are "
-  "incompatible with C++ standards before C++1z">,
+  "incompatible with C++ standards before C++17">,
   InGroup<CXXPre1zCompat>, DefaultIgnore;
 def warn_cxx98_compat_alignas : Warning<"'alignas' is incompatible with C++98">,
   InGroup<CXX98Compat>, DefaultIgnore;
@@ -577,10 +577,10 @@ def err_cxx11_attribute_repeated : Error<
   "attribute %0 cannot appear multiple times in an attribute specifier">;
 def warn_cxx14_compat_using_attribute_ns : Warning<
   "default scope specifier for attributes is incompatible with C++ standards "
-  "before C++1z">, InGroup<CXXPre1zCompat>, DefaultIgnore;
+  "before C++17">, InGroup<CXXPre1zCompat>, DefaultIgnore;
 def ext_using_attribute_ns : ExtWarn<
-  "default scope specifier for attributes is a C++1z extension">,
-  InGroup<CXX1z>;
+  "default scope specifier for attributes is a C++17 extension">,
+  InGroup<CXX17>;
 def err_using_attribute_ns_conflict : Error<
   "attribute with scope specifier cannot follow default scope specifier">;
 def err_attributes_not_allowed : Error<"an attribute list cannot appear here">;
@@ -617,11 +617,11 @@ def err_expected_comma_greater : Error<
 def err_class_on_template_template_param : Error<
   "template template parameter requires 'class' after the parameter list">;
 def ext_template_template_param_typename : ExtWarn<
-  "template template parameter using 'typename' is a C++1z extension">,
-  InGroup<CXX1z>;
+  "template template parameter using 'typename' is a C++17 extension">,
+  InGroup<CXX17>;
 def warn_cxx14_compat_template_template_param_typename : Warning<
   "template template parameter using 'typename' is "
-  "incompatible with C++ standards before C++1z">,
+  "incompatible with C++ standards before C++17">,
   InGroup<CXXPre1zCompat>, DefaultIgnore;
 def err_template_spec_syntax_non_template : Error<
   "identifier followed by '<' indicates a class template specialization but "
@@ -695,10 +695,10 @@ def err_default_template_template_parameter_not_templa
   "template">;
 
 def ext_fold_expression : ExtWarn<
-  "pack fold expression is a C++1z extension">,
-  InGroup<CXX1z>;
+  "pack fold expression is a C++17 extension">,
+  InGroup<CXX17>;
 def warn_cxx14_compat_fold_expression : Warning<
-  "pack fold expression is incompatible with C++ standards before C++1z">,
+  "pack fold expression is incompatible with C++ standards before C++17">,
   InGroup<CXXPre1zCompat>, DefaultIgnore;
 def err_expected_fold_operator : Error<
   "expected a foldable binary operator in fold expression">;
@@ -751,16 +751,16 @@ def err_alias_declaration_pack_expansion : Error<
 // C++1z using-declaration pack expansions
 def ext_multi_using_declaration : ExtWarn<
   "use of multiple declarators in a single using declaration is "
-  "a C++1z extension">, InGroup<CXX1z>;
+  "a C++17 extension">, InGroup<CXX17>;
 def warn_cxx1z_compat_multi_using_declaration : Warning<
   "use of multiple declarators in a single using declaration is "
-  "incompatible with C++ standards before C++1z">,
+  "incompatible with C++ standards before C++17">,
   InGroup<CXXPre1zCompat>, DefaultIgnore;
 def ext_using_declaration_pack : ExtWarn<
-  "pack expansion of using declaration is a C++1z extension">, InGroup<CXX1z>;
+  "pack expansion of using declaration is a C++17 extension">, InGroup<CXX17>;
 def warn_cxx1z_compat_using_declaration_pack : Warning<
   "pack expansion using declaration is incompatible with C++ standards "
-  "before C++1z">, InGroup<CXXPre1zCompat>, DefaultIgnore;
+  "before C++17">, InGroup<CXXPre1zCompat>, DefaultIgnore;
 
 // C++11 override control
 def ext_override_control_keyword : ExtWarn<
@@ -817,10 +817,10 @@ def err_expected_star_this_capture : Error<
 
 // C++1z constexpr lambda expressions
 def warn_cxx14_compat_constexpr_on_lambda : Warning<
-  "constexpr on lambda expressions is incompatible with C++ standards before C++1z">,
+  "constexpr on lambda expressions is incompatible with C++ standards before C++17">,
   InGroup<CXXPre1zCompat>, DefaultIgnore;
 def ext_constexpr_on_lambda_cxx1z : ExtWarn<
-  "'constexpr' on lambda expressions is a C++1z extension">, InGroup<CXX1z>;
+  "'constexpr' on lambda expressions is a C++17 extension">, InGroup<CXX17>;
 
 // Availability attribute
 def err_expected_version : Error<

Modified: vendor/clang/dist/include/clang/Basic/DiagnosticSemaKinds.td
==============================================================================
--- vendor/clang/dist/include/clang/Basic/DiagnosticSemaKinds.td	Sun Aug 20 21:02:51 2017	(r322728)
+++ vendor/clang/dist/include/clang/Basic/DiagnosticSemaKinds.td	Sun Aug 20 21:03:30 2017	(r322729)
@@ -211,9 +211,9 @@ def warn_auto_storage_class : Warning<
 
 def warn_deprecated_register : Warning<
   "'register' storage class specifier is deprecated "
-  "and incompatible with C++1z">, InGroup<DeprecatedRegister>;
+  "and incompatible with C++17">, InGroup<DeprecatedRegister>;
 def ext_register_storage_class : ExtWarn<
-  "ISO C++1z does not allow 'register' storage class specifier">,
+  "ISO C++17 does not allow 'register' storage class specifier">,
   DefaultError, InGroup<Register>;
 
 def err_invalid_decl_spec_combination : Error<
@@ -391,9 +391,9 @@ def err_decomp_decl_context : Error<
   "decomposition declaration not permitted in this context">;
 def warn_cxx14_compat_decomp_decl : Warning<
   "decomposition declarations are incompatible with "
-  "C++ standards before C++1z">, DefaultIgnore, InGroup<CXXPre1zCompat>;
+  "C++ standards before C++17">, DefaultIgnore, InGroup<CXXPre1zCompat>;
 def ext_decomp_decl : ExtWarn<
-  "decomposition declarations are a C++1z extension">, InGroup<CXX1z>;
+  "decomposition declarations are a C++17 extension">, InGroup<CXX17>;
 def err_decomp_decl_spec : Error<
   "decomposition declaration cannot be declared "
   "%plural{1:'%1'|:with '%1' specifiers}0">;
@@ -494,7 +494,7 @@ def err_access_decl : Error<
   "ISO C++11 does not allow access declarations; "
   "use using declarations instead">;
 def ext_dynamic_exception_spec : ExtWarn<
-  "ISO C++1z does not allow dynamic exception specifications">,
+  "ISO C++17 does not allow dynamic exception specifications">,
   InGroup<DynamicExceptionSpec>, DefaultError;
 def warn_exception_spec_deprecated : Warning<
   "dynamic exception specifications are deprecated">,
@@ -507,7 +507,7 @@ def warn_deprecated_copy_operation : Warning<
   InGroup<Deprecated>, DefaultIgnore;
 def warn_cxx1z_compat_exception_spec_in_signature : Warning<
   "mangled name of %0 will change in C++17 due to non-throwing exception "
-  "specification in function signature">, InGroup<CXX1zCompatMangling>;
+  "specification in function signature">, InGroup<CXX17CompatMangling>;
 
 def warn_global_constructor : Warning<
   "declaration requires a global constructor">,
@@ -1200,15 +1200,15 @@ def err_static_assert_expression_is_not_constant : Err
   "static_assert expression is not an integral constant expression">;
 def err_static_assert_failed : Error<"static_assert failed%select{ %1|}0">;
 def ext_static_assert_no_message : ExtWarn<
-  "static_assert with no message is a C++1z extension">, InGroup<CXX1z>;
+  "static_assert with no message is a C++17 extension">, InGroup<CXX17>;
 def warn_cxx14_compat_static_assert_no_message : Warning<
-  "static_assert with no message is incompatible with C++ standards before C++1z">,
+  "static_assert with no message is incompatible with C++ standards before C++17">,
   DefaultIgnore, InGroup<CXXPre1zCompat>;
 
 def ext_inline_variable : ExtWarn<
-  "inline variables are a C++1z extension">, InGroup<CXX1z>;
+  "inline variables are a C++17 extension">, InGroup<CXX17>;
 def warn_cxx14_compat_inline_variable : Warning<
-  "inline variables are incompatible with C++ standards before C++1z">,
+  "inline variables are incompatible with C++ standards before C++17">,
   DefaultIgnore, InGroup<CXXPre1zCompat>;
 
 def warn_inline_namespace_reopened_noninline : Warning<
@@ -1922,7 +1922,7 @@ def err_auto_not_allowed : Error<
   "|in non-static struct member|in struct member"
   "|in non-static union member|in union member"
   "|in non-static class member|in interface member"
-  "|in exception declaration|in template parameter until C++1z|in block literal"
+  "|in exception declaration|in template parameter until C++17|in block literal"
   "|in template argument|in typedef|in type alias|in function return type"
   "|in conversion function type|here|in lambda parameter"
   "|in type allocated by 'new'|in K&R-style function parameter"
@@ -2147,11 +2147,11 @@ def err_for_range_iter_deduction_failure : Error<
 def err_for_range_member_begin_end_mismatch : Error<
   "range type %0 has '%select{begin|end}1' member but no '%select{end|begin}1' member">;
 def ext_for_range_begin_end_types_differ : ExtWarn<
-  "'begin' and 'end' returning different types (%0 and %1) is a C++1z extension">,
-  InGroup<CXX1z>;
+  "'begin' and 'end' returning different types (%0 and %1) is a C++17 extension">,
+  InGroup<CXX17>;
 def warn_for_range_begin_end_types_differ : Warning<
   "'begin' and 'end' returning different types (%0 and %1) is incompatible "
-  "with C++ standards before C++1z">, InGroup<CXXPre1zCompat>, DefaultIgnore;
+  "with C++ standards before C++17">, InGroup<CXXPre1zCompat>, DefaultIgnore;
 def note_in_for_range: Note<
   "when looking up '%select{begin|end}0' function for range expression "
   "of type %1">;
@@ -3905,7 +3905,7 @@ def err_template_nontype_parm_bad_type : Error<
   "a non-type template parameter cannot have type %0">;
 def warn_cxx14_compat_template_nontype_parm_auto_type : Warning<
   "non-type template parameters declared with %0 are incompatible with C++ "
-  "standards before C++1z">,
+  "standards before C++17">,
   DefaultIgnore, InGroup<CXXPre1zCompat>;
 def err_template_param_default_arg_redefinition : Error<
   "template parameter redefines default argument">;
@@ -6337,9 +6337,9 @@ def note_member_first_declared_here : Note<
 def err_decrement_bool : Error<"cannot decrement expression of type bool">;
 def warn_increment_bool : Warning<
   "incrementing expression of type bool is deprecated and "
-  "incompatible with C++1z">, InGroup<DeprecatedIncrementBool>;
+  "incompatible with C++17">, InGroup<DeprecatedIncrementBool>;
 def ext_increment_bool : ExtWarn<
-  "ISO C++1z does not allow incrementing expression of type bool">,
+  "ISO C++17 does not allow incrementing expression of type bool">,
   DefaultError, InGroup<IncrementBool>;
 def err_increment_decrement_enum : Error<
   "cannot %select{decrement|increment}0 expression of enum type %1">;
@@ -6528,10 +6528,10 @@ let CategoryName = "Lambda Issue" in {
 
   // C++1z '*this' captures.
   def warn_cxx14_compat_star_this_lambda_capture : Warning<
-    "by value capture of '*this' is incompatible with C++ standards before C++1z">,
+    "by value capture of '*this' is incompatible with C++ standards before C++17">,
      InGroup<CXXPre1zCompat>, DefaultIgnore;
   def ext_star_this_lambda_capture_cxx1z : ExtWarn<
-    "capture of '*this' by copy is a C++1z extension">, InGroup<CXX1z>;
+    "capture of '*this' by copy is a C++17 extension">, InGroup<CXX17>;
 }
 
 def err_return_in_captured_stmt : Error<
@@ -7200,7 +7200,7 @@ def warn_unused_volatile : Warning<
 def ext_cxx14_attr : Extension<
   "use of the %0 attribute is a C++14 extension">, InGroup<CXX14>;
 def ext_cxx1z_attr : Extension<
-  "use of the %0 attribute is a C++1z extension">, InGroup<CXX1z>;
+  "use of the %0 attribute is a C++17 extension">, InGroup<CXX17>;
 
 def warn_unused_comparison : Warning<
   "%select{%select{|in}1equality|relational}0 comparison result unused">,

Modified: vendor/clang/dist/include/clang/Driver/Options.td
==============================================================================
--- vendor/clang/dist/include/clang/Driver/Options.td	Sun Aug 20 21:02:51 2017	(r322728)
+++ vendor/clang/dist/include/clang/Driver/Options.td	Sun Aug 20 21:03:30 2017	(r322729)
@@ -2019,6 +2019,10 @@ def mdspr2 : Flag<["-"], "mdspr2">, Group<m_Group>;
 def mno_dspr2 : Flag<["-"], "mno-dspr2">, Group<m_Group>;
 def msingle_float : Flag<["-"], "msingle-float">, Group<m_Group>;
 def mdouble_float : Flag<["-"], "mdouble-float">, Group<m_Group>;
+def mmadd4 : Flag<["-"], "mmadd4">, Group<m_Group>,
+  HelpText<"Enable the generation of 4-operand madd.s, madd.d and related instructions.">;
+def mno_madd4 : Flag<["-"], "mno-madd4">, Group<m_Group>,
+  HelpText<"Disable the generation of 4-operand madd.s, madd.d and related instructions.">;
 def mmsa : Flag<["-"], "mmsa">, Group<m_Group>,
   HelpText<"Enable MSA ASE (MIPS only)">;
 def mno_msa : Flag<["-"], "mno-msa">, Group<m_Group>,

Modified: vendor/clang/dist/include/clang/Driver/ToolChain.h
==============================================================================
--- vendor/clang/dist/include/clang/Driver/ToolChain.h	Sun Aug 20 21:02:51 2017	(r322728)
+++ vendor/clang/dist/include/clang/Driver/ToolChain.h	Sun Aug 20 21:03:30 2017	(r322729)
@@ -315,7 +315,7 @@ class ToolChain { (public)
 
   /// IsUnwindTablesDefault - Does this tool chain use -funwind-tables
   /// by default.
-  virtual bool IsUnwindTablesDefault() const;
+  virtual bool IsUnwindTablesDefault(const llvm::opt::ArgList &Args) const;
 
   /// \brief Test whether this toolchain defaults to PIC.
   virtual bool isPICDefault() const = 0;

Modified: vendor/clang/dist/include/clang/Frontend/LangStandards.def
==============================================================================
--- vendor/clang/dist/include/clang/Frontend/LangStandards.def	Sun Aug 20 21:02:51 2017	(r322728)
+++ vendor/clang/dist/include/clang/Frontend/LangStandards.def	Sun Aug 20 21:03:30 2017	(r322729)
@@ -109,15 +109,17 @@ LANGSTANDARD(gnucxx14, "gnu++14",
              GNUMode)
 LANGSTANDARD_ALIAS_DEPR(gnucxx14, "gnu++1y")
 
-LANGSTANDARD(cxx1z, "c++1z",
-             CXX, "Working draft for ISO C++ 2017",
+LANGSTANDARD(cxx17, "c++17",
+             CXX, "ISO C++ 2017 with amendments",
              LineComment | CPlusPlus | CPlusPlus11 | CPlusPlus14 | CPlusPlus1z |
              Digraphs | HexFloat)
+LANGSTANDARD_ALIAS_DEPR(cxx17, "c++1z")
 
-LANGSTANDARD(gnucxx1z, "gnu++1z",
-             CXX, "Working draft for ISO C++ 2017 with GNU extensions",
+LANGSTANDARD(gnucxx17, "gnu++17",
+             CXX, "ISO C++ 2017 with amendments and GNU extensions",
              LineComment | CPlusPlus | CPlusPlus11 | CPlusPlus14 | CPlusPlus1z |
              Digraphs | HexFloat | GNUMode)
+LANGSTANDARD_ALIAS_DEPR(gnucxx17, "gnu++1z")
 
 LANGSTANDARD(cxx2a, "c++2a",
              CXX, "Working draft for ISO C++ 2020",

Modified: vendor/clang/dist/lib/AST/DeclCXX.cpp
==============================================================================
--- vendor/clang/dist/lib/AST/DeclCXX.cpp	Sun Aug 20 21:02:51 2017	(r322728)
+++ vendor/clang/dist/lib/AST/DeclCXX.cpp	Sun Aug 20 21:03:30 2017	(r322729)
@@ -1837,9 +1837,10 @@ bool CXXMethodDecl::hasInlineBody() const {
   const FunctionDecl *CheckFn = getTemplateInstantiationPattern();
   if (!CheckFn)
     CheckFn = this;
-  
+
   const FunctionDecl *fn;
-  return CheckFn->hasBody(fn) && !fn->isOutOfLine();
+  return CheckFn->isDefined(fn) && !fn->isOutOfLine() &&
+         (fn->doesThisDeclarationHaveABody() || fn->willHaveBody());
 }
 
 bool CXXMethodDecl::isLambdaStaticInvoker() const {

Modified: vendor/clang/dist/lib/AST/ExprCXX.cpp
==============================================================================
--- vendor/clang/dist/lib/AST/ExprCXX.cpp	Sun Aug 20 21:02:51 2017	(r322728)
+++ vendor/clang/dist/lib/AST/ExprCXX.cpp	Sun Aug 20 21:03:30 2017	(r322729)
@@ -1052,7 +1052,9 @@ CXXUnresolvedConstructExpr::CXXUnresolvedConstructExpr
           :Type->getType()->isRValueReferenceType()? VK_XValue
           :VK_RValue),
          OK_Ordinary,
-         Type->getType()->isDependentType(), true, true,
+         Type->getType()->isDependentType() ||
+             Type->getType()->getContainedDeducedType(),
+         true, true,
          Type->getType()->containsUnexpandedParameterPack()),
     Type(Type),
     LParenLoc(LParenLoc),

Modified: vendor/clang/dist/lib/AST/ExprConstant.cpp
==============================================================================
--- vendor/clang/dist/lib/AST/ExprConstant.cpp	Sun Aug 20 21:02:51 2017	(r322728)
+++ vendor/clang/dist/lib/AST/ExprConstant.cpp	Sun Aug 20 21:03:30 2017	(r322729)
@@ -9788,6 +9788,8 @@ class VoidExprEvaluator (public)
 
   bool Success(const APValue &V, const Expr *e) { return true; }
 
+  bool ZeroInitialization(const Expr *E) { return true; }
+
   bool VisitCastExpr(const CastExpr *E) {
     switch (E->getCastKind()) {
     default:

Modified: vendor/clang/dist/lib/Basic/Targets.cpp
==============================================================================
--- vendor/clang/dist/lib/Basic/Targets.cpp	Sun Aug 20 21:02:51 2017	(r322728)
+++ vendor/clang/dist/lib/Basic/Targets.cpp	Sun Aug 20 21:03:30 2017	(r322729)
@@ -8050,6 +8050,7 @@ class MipsTargetInfo : public TargetInfo {
     NoDSP, DSP1, DSP2
   } DspRev;
   bool HasMSA;
+  bool DisableMadd4;
 
 protected:
   bool HasFP64;
@@ -8060,7 +8061,7 @@ class MipsTargetInfo : public TargetInfo {
       : TargetInfo(Triple), IsMips16(false), IsMicromips(false),
         IsNan2008(false), IsSingleFloat(false), IsNoABICalls(false),
         CanUseBSDABICalls(false), FloatABI(HardFloat), DspRev(NoDSP),
-        HasMSA(false), HasFP64(false) {
+        HasMSA(false), DisableMadd4(false), HasFP64(false) {
     TheCXXABI.set(TargetCXXABI::GenericMIPS);
 
     setABI((getTriple().getArch() == llvm::Triple::mips ||
@@ -8306,6 +8307,9 @@ class MipsTargetInfo : public TargetInfo {
     if (HasMSA)
       Builder.defineMacro("__mips_msa", Twine(1));
 
+    if (DisableMadd4)
+      Builder.defineMacro("__mips_no_madd4", Twine(1));
+
     Builder.defineMacro("_MIPS_SZPTR", Twine(getPointerWidth(0)));
     Builder.defineMacro("_MIPS_SZINT", Twine(getIntWidth()));
     Builder.defineMacro("_MIPS_SZLONG", Twine(getLongWidth()));
@@ -8468,6 +8472,8 @@ class MipsTargetInfo : public TargetInfo {
         DspRev = std::max(DspRev, DSP2);
       else if (Feature == "+msa")
         HasMSA = true;
+      else if (Feature == "+nomadd4")
+        DisableMadd4 = true;
       else if (Feature == "+fp64")
         HasFP64 = true;
       else if (Feature == "-fp64")

Modified: vendor/clang/dist/lib/CodeGen/TargetInfo.cpp
==============================================================================
--- vendor/clang/dist/lib/CodeGen/TargetInfo.cpp	Sun Aug 20 21:02:51 2017	(r322728)
+++ vendor/clang/dist/lib/CodeGen/TargetInfo.cpp	Sun Aug 20 21:03:30 2017	(r322729)
@@ -5573,17 +5573,14 @@ void ARMABIInfo::setCCs() {
   // AAPCS apparently requires runtime support functions to be soft-float, but
   // that's almost certainly for historic reasons (Thumb1 not supporting VFP
   // most likely). It's more convenient for AAPCS16_VFP to be hard-float.
-  switch (getABIKind()) {
-  case APCS:
-  case AAPCS16_VFP:
-    if (abiCC != getLLVMDefaultCC())
+
+  // The Run-time ABI for the ARM Architecture section 4.1.2 requires
+  // AEABI-complying FP helper functions to use the base AAPCS.
+  // These AEABI functions are expanded in the ARM llvm backend, all the builtin
+  // support functions emitted by clang such as the _Complex helpers follow the
+  // abiCC.
+  if (abiCC != getLLVMDefaultCC())
       BuiltinCC = abiCC;
-    break;
-  case AAPCS:
-  case AAPCS_VFP:
-    BuiltinCC = llvm::CallingConv::ARM_AAPCS;
-    break;
-  }
 }
 
 ABIArgInfo ARMABIInfo::classifyArgumentType(QualType Ty,
@@ -6753,14 +6750,6 @@ MipsABIInfo::classifyArgumentType(QualType Ty, uint64_
       Offset = OrigOffset + MinABIStackAlignInBytes;
       return getNaturalAlignIndirect(Ty, RAA == CGCXXABI::RAA_DirectInMemory);
     }
-
-    // Use indirect if the aggregate cannot fit into registers for
-    // passing arguments according to the ABI
-    unsigned Threshold = IsO32 ? 16 : 64;
-
-    if(getContext().getTypeSizeInChars(Ty) > CharUnits::fromQuantity(Threshold))
-      return ABIArgInfo::getIndirect(CharUnits::fromQuantity(Align), true,
-                                     getContext().getTypeAlign(Ty) / 8 > Align);
 
     // If we have reached here, aggregates are passed directly by coercing to
     // another structure type. Padding is inserted if the offset of the

Modified: vendor/clang/dist/lib/Driver/ToolChain.cpp
==============================================================================
--- vendor/clang/dist/lib/Driver/ToolChain.cpp	Sun Aug 20 21:02:51 2017	(r322728)
+++ vendor/clang/dist/lib/Driver/ToolChain.cpp	Sun Aug 20 21:03:30 2017	(r322729)
@@ -217,7 +217,7 @@ StringRef ToolChain::getDefaultUniversalArchName() con
   }
 }
 
-bool ToolChain::IsUnwindTablesDefault() const {
+bool ToolChain::IsUnwindTablesDefault(const ArgList &Args) const {
   return false;
 }
 

Modified: vendor/clang/dist/lib/Driver/ToolChains/Arch/Mips.cpp
==============================================================================
--- vendor/clang/dist/lib/Driver/ToolChains/Arch/Mips.cpp	Sun Aug 20 21:02:51 2017	(r322728)
+++ vendor/clang/dist/lib/Driver/ToolChains/Arch/Mips.cpp	Sun Aug 20 21:03:30 2017	(r322729)
@@ -297,6 +297,8 @@ void mips::getMIPSTargetFeatures(const Driver &D, cons
 
   AddTargetFeature(Args, Features, options::OPT_mno_odd_spreg,
                    options::OPT_modd_spreg, "nooddspreg");
+  AddTargetFeature(Args, Features, options::OPT_mno_madd4, options::OPT_mmadd4,
+                   "nomadd4");
   AddTargetFeature(Args, Features, options::OPT_mlong_calls,
                    options::OPT_mno_long_calls, "long-calls");
   AddTargetFeature(Args, Features, options::OPT_mmt, options::OPT_mno_mt,"mt");

Modified: vendor/clang/dist/lib/Driver/ToolChains/Clang.cpp
==============================================================================
--- vendor/clang/dist/lib/Driver/ToolChains/Clang.cpp	Sun Aug 20 21:02:51 2017	(r322728)
+++ vendor/clang/dist/lib/Driver/ToolChains/Clang.cpp	Sun Aug 20 21:03:30 2017	(r322729)
@@ -2538,7 +2538,7 @@ void Clang::ConstructJob(Compilation &C, const JobActi
   bool AsynchronousUnwindTables =
       Args.hasFlag(options::OPT_fasynchronous_unwind_tables,
                    options::OPT_fno_asynchronous_unwind_tables,
-                   (getToolChain().IsUnwindTablesDefault() ||
+                   (getToolChain().IsUnwindTablesDefault(Args) ||
                     getToolChain().getSanitizerArgs().needsUnwindTables()) &&
                        !KernelOrKext);
   if (Args.hasFlag(options::OPT_funwind_tables, options::OPT_fno_unwind_tables,

Modified: vendor/clang/dist/lib/Driver/ToolChains/CrossWindows.cpp
==============================================================================
--- vendor/clang/dist/lib/Driver/ToolChains/CrossWindows.cpp	Sun Aug 20 21:02:51 2017	(r322728)
+++ vendor/clang/dist/lib/Driver/ToolChains/CrossWindows.cpp	Sun Aug 20 21:03:30 2017	(r322729)
@@ -214,7 +214,7 @@ CrossWindowsToolChain::CrossWindowsToolChain(const Dri
   }
 }
 
-bool CrossWindowsToolChain::IsUnwindTablesDefault() const {
+bool CrossWindowsToolChain::IsUnwindTablesDefault(const ArgList &Args) const {
   // FIXME: all non-x86 targets need unwind tables, however, LLVM currently does
   // not know how to emit them.
   return getArch() == llvm::Triple::x86_64;

Modified: vendor/clang/dist/lib/Driver/ToolChains/CrossWindows.h
==============================================================================
--- vendor/clang/dist/lib/Driver/ToolChains/CrossWindows.h	Sun Aug 20 21:02:51 2017	(r322728)
+++ vendor/clang/dist/lib/Driver/ToolChains/CrossWindows.h	Sun Aug 20 21:03:30 2017	(r322729)
@@ -56,7 +56,7 @@ class LLVM_LIBRARY_VISIBILITY CrossWindowsToolChain : 
                         const llvm::opt::ArgList &Args);
 
   bool IsIntegratedAssemblerDefault() const override { return true; }
-  bool IsUnwindTablesDefault() const override;
+  bool IsUnwindTablesDefault(const llvm::opt::ArgList &Args) const override;
   bool isPICDefault() const override;
   bool isPIEDefault() const override;
   bool isPICDefaultForced() const override;

Modified: vendor/clang/dist/lib/Driver/ToolChains/Darwin.cpp
==============================================================================
--- vendor/clang/dist/lib/Driver/ToolChains/Darwin.cpp	Sun Aug 20 21:02:51 2017	(r322728)
+++ vendor/clang/dist/lib/Driver/ToolChains/Darwin.cpp	Sun Aug 20 21:03:30 2017	(r322729)
@@ -1174,14 +1174,13 @@ void Darwin::AddDeploymentTarget(DerivedArgList &Args)
   unsigned Major, Minor, Micro;
   bool HadExtra;
 
-  // iOS 10 is the maximum deployment target for 32-bit targets.
-  if (iOSVersion && getTriple().isArch32Bit() &&
-      Driver::GetReleaseVersion(iOSVersion->getValue(), Major, Minor, Micro,
-                                HadExtra) &&
-      Major > 10)
-    getDriver().Diag(diag::err_invalid_ios_deployment_target)
-        << iOSVersion->getAsString(Args);
+  // The iOS deployment target that is explicitly specified via a command line
+  // option or an environment variable.
+  std::string ExplicitIOSDeploymentTargetStr;
 
+  if (iOSVersion)
+    ExplicitIOSDeploymentTargetStr = iOSVersion->getAsString(Args);
+
   // Add a macro to differentiate between m(iphone|tv|watch)os-version-min=X.Y and
   // -m(iphone|tv|watch)simulator-version-min=X.Y.
   if (Args.hasArg(options::OPT_mios_simulator_version_min_EQ) ||
@@ -1223,13 +1222,9 @@ void Darwin::AddDeploymentTarget(DerivedArgList &Args)
     if (char *env = ::getenv("WATCHOS_DEPLOYMENT_TARGET"))
       WatchOSTarget = env;
 
-    // iOS 10 is the maximum deployment target for 32-bit targets.
-    if (!iOSTarget.empty() && getTriple().isArch32Bit() &&
-        Driver::GetReleaseVersion(iOSTarget.c_str(), Major, Minor, Micro,
-                                  HadExtra) &&
-        Major > 10)
-      getDriver().Diag(diag::err_invalid_ios_deployment_target)
-          << std::string("IPHONEOS_DEPLOYMENT_TARGET=") + iOSTarget;
+    if (!iOSTarget.empty())
+      ExplicitIOSDeploymentTargetStr =
+          std::string("IPHONEOS_DEPLOYMENT_TARGET=") + iOSTarget;
 
     // If there is no command-line argument to specify the Target version and
     // no environment variable defined, see if we can set the default based
@@ -1393,12 +1388,19 @@ void Darwin::AddDeploymentTarget(DerivedArgList &Args)
         HadExtra || Major >= 100 || Minor >= 100 || Micro >= 100)
       getDriver().Diag(diag::err_drv_invalid_version_number)
           << iOSVersion->getAsString(Args);
-    // iOS 10 is the maximum deployment target for 32-bit targets. If the
-    // inferred deployment target is iOS 11 or later, set it to 10.99.
+    // For 32-bit targets, the deployment target for iOS has to be earlier than
+    // iOS 11.
     if (getTriple().isArch32Bit() && Major >= 11) {
-      Major = 10;
-      Minor = 99;
-      Micro = 99;
+      // If the deployment target is explicitly specified, print a diagnostic.
+      if (!ExplicitIOSDeploymentTargetStr.empty()) {
+        getDriver().Diag(diag::warn_invalid_ios_deployment_target)
+            << ExplicitIOSDeploymentTargetStr;
+      // Otherwise, set it to 10.99.99.
+      } else {
+        Major = 10;
+        Minor = 99;
+        Micro = 99;
+      }
     }
   } else if (Platform == TvOS) {
     if (!Driver::GetReleaseVersion(TvOSVersion->getValue(), Major, Minor,
@@ -1834,8 +1836,8 @@ Darwin::TranslateArgs(const DerivedArgList &Args, Stri
   return DAL;
 }
 
-bool MachO::IsUnwindTablesDefault() const {
-  return getArch() == llvm::Triple::x86_64;
+bool MachO::IsUnwindTablesDefault(const ArgList &Args) const {
+  return !UseSjLjExceptions(Args);
 }
 
 bool MachO::UseDwarfDebugFlags() const {

Modified: vendor/clang/dist/lib/Driver/ToolChains/Darwin.h
==============================================================================
--- vendor/clang/dist/lib/Driver/ToolChains/Darwin.h	Sun Aug 20 21:02:51 2017	(r322728)
+++ vendor/clang/dist/lib/Driver/ToolChains/Darwin.h	Sun Aug 20 21:03:30 2017	(r322729)
@@ -216,7 +216,7 @@ class LLVM_LIBRARY_VISIBILITY MachO : public ToolChain
 
   bool UseObjCMixedDispatch() const override { return true; }
 
-  bool IsUnwindTablesDefault() const override;
+  bool IsUnwindTablesDefault(const llvm::opt::ArgList &Args) const override;
 
   RuntimeLibType GetDefaultRuntimeLibType() const override {
     return ToolChain::RLT_CompilerRT;

Modified: vendor/clang/dist/lib/Driver/ToolChains/Gnu.cpp
==============================================================================
--- vendor/clang/dist/lib/Driver/ToolChains/Gnu.cpp	Sun Aug 20 21:02:51 2017	(r322728)
+++ vendor/clang/dist/lib/Driver/ToolChains/Gnu.cpp	Sun Aug 20 21:03:30 2017	(r322729)
@@ -2291,7 +2291,7 @@ void Generic_GCC::printVerboseInfo(raw_ostream &OS) co
   CudaInstallation.print(OS);
 }
 
-bool Generic_GCC::IsUnwindTablesDefault() const {
+bool Generic_GCC::IsUnwindTablesDefault(const ArgList &Args) const {
   return getArch() == llvm::Triple::x86_64;
 }
 

Modified: vendor/clang/dist/lib/Driver/ToolChains/Gnu.h
==============================================================================
--- vendor/clang/dist/lib/Driver/ToolChains/Gnu.h	Sun Aug 20 21:02:51 2017	(r322728)
+++ vendor/clang/dist/lib/Driver/ToolChains/Gnu.h	Sun Aug 20 21:03:30 2017	(r322729)
@@ -284,7 +284,7 @@ class LLVM_LIBRARY_VISIBILITY Generic_GCC : public Too
 
   void printVerboseInfo(raw_ostream &OS) const override;
 
-  bool IsUnwindTablesDefault() const override;
+  bool IsUnwindTablesDefault(const llvm::opt::ArgList &Args) const override;
   bool isPICDefault() const override;
   bool isPIEDefault() const override;
   bool isPICDefaultForced() const override;

Modified: vendor/clang/dist/lib/Driver/ToolChains/MSVC.cpp
==============================================================================
--- vendor/clang/dist/lib/Driver/ToolChains/MSVC.cpp	Sun Aug 20 21:02:51 2017	(r322728)
+++ vendor/clang/dist/lib/Driver/ToolChains/MSVC.cpp	Sun Aug 20 21:03:30 2017	(r322729)
@@ -699,7 +699,7 @@ bool MSVCToolChain::IsIntegratedAssemblerDefault() con
   return true;
 }
 
-bool MSVCToolChain::IsUnwindTablesDefault() const {
+bool MSVCToolChain::IsUnwindTablesDefault(const ArgList &Args) const {
   // Emit unwind tables by default on Win64. All non-x86_32 Windows platforms
   // such as ARM and PPC actually require unwind tables, but LLVM doesn't know
   // how to generate them yet.

Modified: vendor/clang/dist/lib/Driver/ToolChains/MSVC.h
==============================================================================
--- vendor/clang/dist/lib/Driver/ToolChains/MSVC.h	Sun Aug 20 21:02:51 2017	(r322728)
+++ vendor/clang/dist/lib/Driver/ToolChains/MSVC.h	Sun Aug 20 21:03:30 2017	(r322729)
@@ -73,7 +73,7 @@ class LLVM_LIBRARY_VISIBILITY MSVCToolChain : public T
                 Action::OffloadKind DeviceOffloadKind) const override;
 
   bool IsIntegratedAssemblerDefault() const override;
-  bool IsUnwindTablesDefault() const override;
+  bool IsUnwindTablesDefault(const llvm::opt::ArgList &Args) const override;
   bool isPICDefault() const override;
   bool isPIEDefault() const override;
   bool isPICDefaultForced() const override;

Modified: vendor/clang/dist/lib/Driver/ToolChains/MinGW.cpp
==============================================================================
--- vendor/clang/dist/lib/Driver/ToolChains/MinGW.cpp	Sun Aug 20 21:02:51 2017	(r322728)
+++ vendor/clang/dist/lib/Driver/ToolChains/MinGW.cpp	Sun Aug 20 21:03:30 2017	(r322729)
@@ -347,7 +347,7 @@ Tool *toolchains::MinGW::buildLinker() const {
   return new tools::MinGW::Linker(*this);
 }
 
-bool toolchains::MinGW::IsUnwindTablesDefault() const {
+bool toolchains::MinGW::IsUnwindTablesDefault(const ArgList &Args) const {
   return getArch() == llvm::Triple::x86_64;
 }
 

Modified: vendor/clang/dist/lib/Driver/ToolChains/MinGW.h
==============================================================================
--- vendor/clang/dist/lib/Driver/ToolChains/MinGW.h	Sun Aug 20 21:02:51 2017	(r322728)
+++ vendor/clang/dist/lib/Driver/ToolChains/MinGW.h	Sun Aug 20 21:03:30 2017	(r322729)
@@ -60,7 +60,7 @@ class LLVM_LIBRARY_VISIBILITY MinGW : public ToolChain
         const llvm::opt::ArgList &Args);
 
   bool IsIntegratedAssemblerDefault() const override;
-  bool IsUnwindTablesDefault() const override;
+  bool IsUnwindTablesDefault(const llvm::opt::ArgList &Args) const override;
   bool isPICDefault() const override;
   bool isPIEDefault() const override;
   bool isPICDefaultForced() const override;

Modified: vendor/clang/dist/lib/Driver/ToolChains/NetBSD.h
==============================================================================
--- vendor/clang/dist/lib/Driver/ToolChains/NetBSD.h	Sun Aug 20 21:02:51 2017	(r322728)
+++ vendor/clang/dist/lib/Driver/ToolChains/NetBSD.h	Sun Aug 20 21:03:30 2017	(r322729)
@@ -65,7 +65,10 @@ class LLVM_LIBRARY_VISIBILITY NetBSD : public Generic_
       const llvm::opt::ArgList &DriverArgs,
       llvm::opt::ArgStringList &CC1Args) const override;
 
-  bool IsUnwindTablesDefault() const override { return true; }
+  bool IsUnwindTablesDefault(const llvm::opt::ArgList &Args) const override {
+    return true;
+  }
+
   SanitizerMask getSupportedSanitizers() const override;
 
 protected:

Modified: vendor/clang/dist/lib/Frontend/InitPreprocessor.cpp
==============================================================================
--- vendor/clang/dist/lib/Frontend/InitPreprocessor.cpp	Sun Aug 20 21:02:51 2017	(r322728)
+++ vendor/clang/dist/lib/Frontend/InitPreprocessor.cpp	Sun Aug 20 21:03:30 2017	(r322729)
@@ -497,6 +497,8 @@ static void InitializeCPlusPlusFeatureTestMacros(const
     Builder.defineMacro("__cpp_ref_qualifiers", "200710");
     Builder.defineMacro("__cpp_alias_templates", "200704");
   }
+  if (LangOpts.ThreadsafeStatics)
+    Builder.defineMacro("__cpp_threadsafe_static_init", "200806");
 
   // C++14 features.
   if (LangOpts.CPlusPlus14) {
@@ -519,6 +521,7 @@ static void InitializeCPlusPlusFeatureTestMacros(const
     Builder.defineMacro("__cpp_noexcept_function_type", "201510");
     Builder.defineMacro("__cpp_capture_star_this", "201603");
     Builder.defineMacro("__cpp_if_constexpr", "201606");
+    Builder.defineMacro("__cpp_deduction_guides", "201611");
     Builder.defineMacro("__cpp_template_auto", "201606");
     Builder.defineMacro("__cpp_namespace_attributes", "201411");
     Builder.defineMacro("__cpp_enumerator_attributes", "201411");
@@ -528,8 +531,6 @@ static void InitializeCPlusPlusFeatureTestMacros(const
     Builder.defineMacro("__cpp_structured_bindings", "201606");
     Builder.defineMacro("__cpp_nontype_template_args", "201411");
     Builder.defineMacro("__cpp_fold_expressions", "201603");
-    // FIXME: This is not yet listed in SD-6.
-    Builder.defineMacro("__cpp_deduction_guides", "201611");
   }
   if (LangOpts.AlignedAllocation)
     Builder.defineMacro("__cpp_aligned_new", "201606");

Modified: vendor/clang/dist/lib/Parse/ParseCXXInlineMethods.cpp
==============================================================================
--- vendor/clang/dist/lib/Parse/ParseCXXInlineMethods.cpp	Sun Aug 20 21:02:51 2017	(r322728)
+++ vendor/clang/dist/lib/Parse/ParseCXXInlineMethods.cpp	Sun Aug 20 21:03:30 2017	(r322729)
@@ -166,20 +166,11 @@ NamedDecl *Parser::ParseCXXInlineMethodDef(AccessSpeci
   }
 
   if (FnD) {
-    // If this is a friend function, mark that it's late-parsed so that
-    // it's still known to be a definition even before we attach the
-    // parsed body.  Sema needs to treat friend function definitions
-    // differently during template instantiation, and it's possible for
-    // the containing class to be instantiated before all its member
-    // function definitions are parsed.
-    //
-    // If you remove this, you can remove the code that clears the flag
-    // after parsing the member.
-    if (D.getDeclSpec().isFriendSpecified()) {
-      FunctionDecl *FD = FnD->getAsFunction();
-      Actions.CheckForFunctionRedefinition(FD);
-      FD->setLateTemplateParsed(true);
-    }
+    FunctionDecl *FD = FnD->getAsFunction();
+    // Track that this function will eventually have a body; Sema needs
+    // to know this.
+    Actions.CheckForFunctionRedefinition(FD);
+    FD->setWillHaveBody(true);
   } else {
     // If semantic analysis could not build a function declaration,
     // just throw away the late-parsed declaration.
@@ -557,10 +548,6 @@ void Parser::ParseLexedMethodDef(LexedMethod &LM) {
          "current template being instantiated!");
 
   ParseFunctionStatementBody(LM.D, FnScope);
-
-  // Clear the late-template-parsed bit if we set it before.
-  if (LM.D)
-    LM.D->getAsFunction()->setLateTemplateParsed(false);
 
   while (Tok.isNot(tok::eof))
     ConsumeAnyToken();

Modified: vendor/clang/dist/lib/Sema/SemaCast.cpp
==============================================================================
--- vendor/clang/dist/lib/Sema/SemaCast.cpp	Sun Aug 20 21:02:51 2017	(r322728)
+++ vendor/clang/dist/lib/Sema/SemaCast.cpp	Sun Aug 20 21:03:30 2017	(r322729)
@@ -552,7 +552,14 @@ CastsAwayConstness(Sema &Self, QualType SrcType, QualT
     Qualifiers SrcQuals, DestQuals;
     Self.Context.getUnqualifiedArrayType(UnwrappedSrcType, SrcQuals);
     Self.Context.getUnqualifiedArrayType(UnwrappedDestType, DestQuals);
-    
+
+    // We do not meaningfully track object const-ness of Objective-C object
+    // types. Remove const from the source type if either the source or
+    // the destination is an Objective-C object type.
+    if (UnwrappedSrcType->isObjCObjectType() ||
+        UnwrappedDestType->isObjCObjectType())
+      SrcQuals.removeConst();
+
     Qualifiers RetainedSrcQuals, RetainedDestQuals;
     if (CheckCVR) {
       RetainedSrcQuals.setCVRQualifiers(SrcQuals.getCVRQualifiers());

Modified: vendor/clang/dist/lib/Sema/SemaCodeComplete.cpp
==============================================================================
--- vendor/clang/dist/lib/Sema/SemaCodeComplete.cpp	Sun Aug 20 21:02:51 2017	(r322728)
+++ vendor/clang/dist/lib/Sema/SemaCodeComplete.cpp	Sun Aug 20 21:03:30 2017	(r322729)
@@ -2401,10 +2401,7 @@ formatBlockPlaceholder(const PrintingPolicy &Policy, c
 static std::string GetDefaultValueString(const ParmVarDecl *Param,
                                          const SourceManager &SM,
                                          const LangOptions &LangOpts) {
-  const Expr *defaultArg = Param->getDefaultArg();
-  if (!defaultArg)
-    return "";
-  const SourceRange SrcRange = defaultArg->getSourceRange();
+  const SourceRange SrcRange = Param->getDefaultArgRange();
   CharSourceRange CharSrcRange = CharSourceRange::getTokenRange(SrcRange);
   bool Invalid = CharSrcRange.isInvalid();
   if (Invalid)

Modified: vendor/clang/dist/lib/Sema/SemaDecl.cpp
==============================================================================
--- vendor/clang/dist/lib/Sema/SemaDecl.cpp	Sun Aug 20 21:02:51 2017	(r322728)
+++ vendor/clang/dist/lib/Sema/SemaDecl.cpp	Sun Aug 20 21:03:30 2017	(r322729)
@@ -6999,6 +6999,21 @@ void Sema::CheckShadow(NamedDecl *D, NamedDecl *Shadow
           return;
         }
       }
+
+      if (cast<VarDecl>(ShadowedDecl)->hasLocalStorage()) {
+        // A variable can't shadow a local variable in an enclosing scope, if
+        // they are separated by a non-capturing declaration context.
+        for (DeclContext *ParentDC = NewDC;
+             ParentDC && !ParentDC->Equals(OldDC);
+             ParentDC = getLambdaAwareParentOfDeclContext(ParentDC)) {
+          // Only block literals, captured statements, and lambda expressions
+          // can capture; other scopes don't.
+          if (!isa<BlockDecl>(ParentDC) && !isa<CapturedDecl>(ParentDC) &&
+              !isLambdaCallOperator(ParentDC)) {
+            return;
+          }
+        }
+      }
     }
   }
 
@@ -12075,8 +12090,9 @@ Decl *Sema::ActOnStartOfFunctionDef(Scope *FnBodyScope
     FD->setInvalidDecl();
   }
 
-  // See if this is a redefinition.
-  if (!FD->isLateTemplateParsed()) {
+  // See if this is a redefinition. If 'will have body' is already set, then
+  // these checks were already performed when it was set.
+  if (!FD->willHaveBody() && !FD->isLateTemplateParsed()) {
     CheckForFunctionRedefinition(FD, nullptr, SkipBody);
 
     // If we're skipping the body, we're done. Don't enter the scope.
@@ -13278,6 +13294,7 @@ Decl *Sema::ActOnTag(Scope *S, unsigned TagSpec, TagUs
         AddMsStructLayoutForRecord(RD);
       }
     }
+    New->setLexicalDeclContext(CurContext);
     return New;
   };
 

Modified: vendor/clang/dist/lib/Sema/SemaTemplateInstantiateDecl.cpp
==============================================================================
--- vendor/clang/dist/lib/Sema/SemaTemplateInstantiateDecl.cpp	Sun Aug 20 21:02:51 2017	(r322728)
+++ vendor/clang/dist/lib/Sema/SemaTemplateInstantiateDecl.cpp	Sun Aug 20 21:03:30 2017	(r322729)
@@ -3771,6 +3771,8 @@ void Sema::InstantiateFunctionDefinition(SourceLocatio
   if (PatternDef) {
     Pattern = PatternDef->getBody(PatternDef);
     PatternDecl = PatternDef;
+    if (PatternDef->willHaveBody())
+      PatternDef = nullptr;
   }
 
   // FIXME: We need to track the instantiation stack in order to know which

Modified: vendor/clang/dist/test/CXX/dcl.dcl/dcl.attr/dcl.attr.nodiscard/p2.cpp
==============================================================================
--- vendor/clang/dist/test/CXX/dcl.dcl/dcl.attr/dcl.attr.nodiscard/p2.cpp	Sun Aug 20 21:02:51 2017	(r322728)
+++ vendor/clang/dist/test/CXX/dcl.dcl/dcl.attr/dcl.attr.nodiscard/p2.cpp	Sun Aug 20 21:03:30 2017	(r322729)
@@ -1,5 +1,5 @@
-// RUN: %clang_cc1 -fsyntax-only -std=c++1z -verify -Wc++1z-extensions %s
-// RUN: %clang_cc1 -fsyntax-only -std=c++11 -verify -DEXT -Wc++1z-extensions %s
+// RUN: %clang_cc1 -fsyntax-only -std=c++17 -verify -Wc++17-extensions %s
+// RUN: %clang_cc1 -fsyntax-only -std=c++11 -verify -DEXT -Wc++17-extensions %s
 
 struct [[nodiscard]] S {};
 S get_s();
@@ -23,7 +23,7 @@ void f() {
 }
 
 #ifdef EXT
-// expected-warning@4 {{use of the 'nodiscard' attribute is a C++1z extension}}
-// expected-warning@8 {{use of the 'nodiscard' attribute is a C++1z extension}}
-// expected-warning@11 {{use of the 'nodiscard' attribute is a C++1z extension}}
+// expected-warning@4 {{use of the 'nodiscard' attribute is a C++17 extension}}
+// expected-warning@8 {{use of the 'nodiscard' attribute is a C++17 extension}}
+// expected-warning@11 {{use of the 'nodiscard' attribute is a C++17 extension}}
 #endif

Modified: vendor/clang/dist/test/CXX/dcl.dcl/dcl.attr/dcl.attr.unused/p3.cpp
==============================================================================
--- vendor/clang/dist/test/CXX/dcl.dcl/dcl.attr/dcl.attr.unused/p3.cpp	Sun Aug 20 21:02:51 2017	(r322728)
+++ vendor/clang/dist/test/CXX/dcl.dcl/dcl.attr/dcl.attr.unused/p3.cpp	Sun Aug 20 21:03:30 2017	(r322729)
@@ -1,5 +1,5 @@
-// RUN: %clang_cc1 -fsyntax-only -Wunused -Wused-but-marked-unused -std=c++1z -Wc++1z-extensions -verify %s
-// RUN: %clang_cc1 -fsyntax-only -Wunused -Wused-but-marked-unused -std=c++11 -Wc++1z-extensions -verify -DEXT %s
+// RUN: %clang_cc1 -fsyntax-only -Wunused -Wused-but-marked-unused -std=c++17 -Wc++17-extensions -verify %s
+// RUN: %clang_cc1 -fsyntax-only -Wunused -Wused-but-marked-unused -std=c++11 -Wc++17-extensions -verify -DEXT %s
 
 static_assert(__has_cpp_attribute(maybe_unused) == 201603, "");
 
@@ -20,7 +20,7 @@ void f() {
 }
 
 #ifdef EXT
-// expected-warning@6 {{use of the 'maybe_unused' attribute is a C++1z extension}}
-// expected-warning@13 {{use of the 'maybe_unused' attribute is a C++1z extension}}
-// expected-warning@14 {{use of the 'maybe_unused' attribute is a C++1z extension}}
+// expected-warning@6 {{use of the 'maybe_unused' attribute is a C++17 extension}}
+// expected-warning@13 {{use of the 'maybe_unused' attribute is a C++17 extension}}
+// expected-warning@14 {{use of the 'maybe_unused' attribute is a C++17 extension}}

*** DIFF OUTPUT TRUNCATED AT 1000 LINES ***



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201708202103.v7KL3VPd015461>