svn commit: r327124 - in vendor/clang/dist: cmake/caches docs include/clang/AST include/clang/Basic include/clang/Frontend include/clang/Index include/clang/Parse include/clang/Sema include/clang/S...

Dimitry Andric dim at FreeBSD.org
Sun Dec 24 01:00:31 UTC 2017


Author: dim
Date: Sun Dec 24 01:00:23 2017
New Revision: 327124
URL: https://svnweb.freebsd.org/changeset/base/327124

Log:
  Vendor import of clang trunk r321414:
  https://llvm.org/svn/llvm-project/cfe/trunk@321414

Added:
  vendor/clang/dist/test/Analysis/arc-zero-init.m
  vendor/clang/dist/test/CodeGen/aarch64-v8.2a-neon-intrinsics.c   (contents, props changed)
  vendor/clang/dist/test/CodeGen/ubsan-noreturn.c   (contents, props changed)
  vendor/clang/dist/test/CodeGenCXX/ubsan-unreachable.cpp   (contents, props changed)
  vendor/clang/dist/test/Driver/Inputs/basic_myriad_tree/lib/gcc/sparc-myriad-rtems/
  vendor/clang/dist/test/Driver/Inputs/basic_myriad_tree/lib/gcc/sparc-myriad-rtems/6.3.0/
  vendor/clang/dist/test/Driver/Inputs/basic_myriad_tree/lib/gcc/sparc-myriad-rtems/6.3.0/crtbegin.o   (contents, props changed)
  vendor/clang/dist/test/Driver/Inputs/basic_myriad_tree/lib/gcc/sparc-myriad-rtems/6.3.0/crtend.o   (contents, props changed)
  vendor/clang/dist/test/Driver/Inputs/basic_myriad_tree/lib/gcc/sparc-myriad-rtems/6.3.0/crti.o   (contents, props changed)
  vendor/clang/dist/test/Driver/Inputs/basic_myriad_tree/lib/gcc/sparc-myriad-rtems/6.3.0/crtn.o   (contents, props changed)
  vendor/clang/dist/test/Driver/Inputs/basic_myriad_tree/sparc-myriad-rtems/
  vendor/clang/dist/test/Driver/Inputs/basic_myriad_tree/sparc-myriad-rtems/include/
  vendor/clang/dist/test/Driver/Inputs/basic_myriad_tree/sparc-myriad-rtems/include/c++/
  vendor/clang/dist/test/Driver/Inputs/basic_myriad_tree/sparc-myriad-rtems/include/c++/6.3.0/
  vendor/clang/dist/test/Driver/Inputs/basic_myriad_tree/sparc-myriad-rtems/include/c++/6.3.0/.keep
  vendor/clang/dist/test/Driver/Inputs/basic_myriad_tree/sparc-myriad-rtems/lib/
  vendor/clang/dist/test/Driver/Inputs/basic_myriad_tree/sparc-myriad-rtems/lib/crt0.o   (contents, props changed)
  vendor/clang/dist/test/Index/skipped-bodies-templates.cpp   (contents, props changed)
  vendor/clang/dist/test/Modules/Inputs/implicit-private-canonical/
  vendor/clang/dist/test/Modules/Inputs/implicit-private-canonical/A.framework/
  vendor/clang/dist/test/Modules/Inputs/implicit-private-canonical/A.framework/Headers/
  vendor/clang/dist/test/Modules/Inputs/implicit-private-canonical/A.framework/Headers/a.h   (contents, props changed)
  vendor/clang/dist/test/Modules/Inputs/implicit-private-canonical/A.framework/Headers/aprivate.h   (contents, props changed)
  vendor/clang/dist/test/Modules/Inputs/implicit-private-canonical/A.framework/Modules/
  vendor/clang/dist/test/Modules/Inputs/implicit-private-canonical/A.framework/Modules/module.modulemap
  vendor/clang/dist/test/Modules/Inputs/implicit-private-canonical/A.framework/Modules/module.private.modulemap
  vendor/clang/dist/test/Modules/Inputs/implicit-private-canonical/A.framework/PrivateHeaders/
  vendor/clang/dist/test/Modules/Inputs/implicit-private-canonical/A.framework/PrivateHeaders/aprivate.h   (contents, props changed)
  vendor/clang/dist/test/Modules/Inputs/implicit-private-with-different-name/A.framework/PrivateHeaders/
  vendor/clang/dist/test/Modules/Inputs/implicit-private-with-different-name/A.framework/PrivateHeaders/aprivate.h   (contents, props changed)
  vendor/clang/dist/test/Modules/Inputs/implicit-private-with-submodule/
  vendor/clang/dist/test/Modules/Inputs/implicit-private-with-submodule/A.framework/
  vendor/clang/dist/test/Modules/Inputs/implicit-private-with-submodule/A.framework/Headers/
  vendor/clang/dist/test/Modules/Inputs/implicit-private-with-submodule/A.framework/Headers/a.h   (contents, props changed)
  vendor/clang/dist/test/Modules/Inputs/implicit-private-with-submodule/A.framework/Headers/aprivate.h   (contents, props changed)
  vendor/clang/dist/test/Modules/Inputs/implicit-private-with-submodule/A.framework/Modules/
  vendor/clang/dist/test/Modules/Inputs/implicit-private-with-submodule/A.framework/Modules/module.modulemap
  vendor/clang/dist/test/Modules/Inputs/implicit-private-with-submodule/A.framework/Modules/module.private.modulemap
  vendor/clang/dist/test/Modules/Inputs/implicit-private-with-submodule/A.framework/PrivateHeaders/
  vendor/clang/dist/test/Modules/Inputs/implicit-private-with-submodule/A.framework/PrivateHeaders/aprivate.h   (contents, props changed)
  vendor/clang/dist/test/Modules/implicit-map-dot-private.m
  vendor/clang/dist/test/Modules/implicit-private-canonical.m
  vendor/clang/dist/test/Modules/implicit-private-with-submodule.m
  vendor/clang/dist/test/SemaTemplate/nested-deduction-guides.cpp   (contents, props changed)
  vendor/clang/dist/test/SemaTemplate/temp_arg_enum_printing_more.cpp   (contents, props changed)
  vendor/clang/dist/unittests/CodeGen/IRMatchers.h   (contents, props changed)
  vendor/clang/dist/unittests/CodeGen/TBAAMetadataTest.cpp   (contents, props changed)
Deleted:
  vendor/clang/dist/test/Driver/Inputs/basic_myriad_tree/lib/gcc/sparc-myriad-elf/
  vendor/clang/dist/test/Driver/Inputs/basic_myriad_tree/sparc-myriad-elf/
  vendor/clang/dist/test/Modules/Inputs/implicit-private-with-different-name/A.framework/Headers/aprivate.h
Modified:
  vendor/clang/dist/cmake/caches/Fuchsia-stage2.cmake
  vendor/clang/dist/cmake/caches/Fuchsia.cmake
  vendor/clang/dist/docs/HardwareAssistedAddressSanitizerDesign.rst
  vendor/clang/dist/docs/Modules.rst
  vendor/clang/dist/docs/UndefinedBehaviorSanitizer.rst
  vendor/clang/dist/include/clang/AST/Decl.h
  vendor/clang/dist/include/clang/AST/ODRHash.h
  vendor/clang/dist/include/clang/AST/Type.h
  vendor/clang/dist/include/clang/Basic/Attr.td
  vendor/clang/dist/include/clang/Basic/DiagnosticFrontendKinds.td
  vendor/clang/dist/include/clang/Basic/DiagnosticIDs.h
  vendor/clang/dist/include/clang/Basic/DiagnosticLexKinds.td
  vendor/clang/dist/include/clang/Basic/DiagnosticSemaKinds.td
  vendor/clang/dist/include/clang/Basic/DiagnosticSerializationKinds.td
  vendor/clang/dist/include/clang/Basic/arm_neon.td
  vendor/clang/dist/include/clang/Frontend/PrecompiledPreamble.h
  vendor/clang/dist/include/clang/Index/IndexSymbol.h
  vendor/clang/dist/include/clang/Parse/Parser.h
  vendor/clang/dist/include/clang/Sema/Sema.h
  vendor/clang/dist/include/clang/Serialization/ASTReader.h
  vendor/clang/dist/include/clang/StaticAnalyzer/Core/BugReporter/PathDiagnostic.h
  vendor/clang/dist/lib/AST/ASTDumper.cpp
  vendor/clang/dist/lib/AST/ASTImporter.cpp
  vendor/clang/dist/lib/AST/Decl.cpp
  vendor/clang/dist/lib/AST/Expr.cpp
  vendor/clang/dist/lib/AST/ExprCXX.cpp
  vendor/clang/dist/lib/AST/ExprConstant.cpp
  vendor/clang/dist/lib/AST/ItaniumMangle.cpp
  vendor/clang/dist/lib/AST/ODRHash.cpp
  vendor/clang/dist/lib/AST/TypeLoc.cpp
  vendor/clang/dist/lib/AST/TypePrinter.cpp
  vendor/clang/dist/lib/Basic/Diagnostic.cpp
  vendor/clang/dist/lib/Basic/DiagnosticIDs.cpp
  vendor/clang/dist/lib/Basic/SourceManager.cpp
  vendor/clang/dist/lib/Basic/Targets/AArch64.cpp
  vendor/clang/dist/lib/Basic/Targets/X86.cpp
  vendor/clang/dist/lib/CodeGen/BackendUtil.cpp
  vendor/clang/dist/lib/CodeGen/CGAtomic.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/CGException.cpp
  vendor/clang/dist/lib/CodeGen/CGExpr.cpp
  vendor/clang/dist/lib/CodeGen/CGExprAgg.cpp
  vendor/clang/dist/lib/CodeGen/CGExprCXX.cpp
  vendor/clang/dist/lib/CodeGen/CGExprComplex.cpp
  vendor/clang/dist/lib/CodeGen/CodeGenFunction.h
  vendor/clang/dist/lib/CodeGen/CodeGenModule.cpp
  vendor/clang/dist/lib/CodeGen/CodeGenTBAA.cpp
  vendor/clang/dist/lib/CodeGen/CodeGenTypeCache.h
  vendor/clang/dist/lib/Driver/SanitizerArgs.cpp
  vendor/clang/dist/lib/Driver/ToolChains/Clang.cpp
  vendor/clang/dist/lib/Driver/ToolChains/CommonArgs.cpp
  vendor/clang/dist/lib/Driver/ToolChains/Darwin.cpp
  vendor/clang/dist/lib/Driver/ToolChains/Fuchsia.cpp
  vendor/clang/dist/lib/Driver/ToolChains/Myriad.cpp
  vendor/clang/dist/lib/Frontend/CompilerInstance.cpp
  vendor/clang/dist/lib/Frontend/PrecompiledPreamble.cpp
  vendor/clang/dist/lib/Headers/__clang_cuda_intrinsics.h
  vendor/clang/dist/lib/Headers/cpuid.h
  vendor/clang/dist/lib/Headers/xmmintrin.h
  vendor/clang/dist/lib/Index/IndexSymbol.cpp
  vendor/clang/dist/lib/Lex/HeaderSearch.cpp
  vendor/clang/dist/lib/Lex/ModuleMap.cpp
  vendor/clang/dist/lib/Lex/Preprocessor.cpp
  vendor/clang/dist/lib/Parse/ParseTemplate.cpp
  vendor/clang/dist/lib/Rewrite/HTMLRewrite.cpp
  vendor/clang/dist/lib/Sema/CodeCompleteConsumer.cpp
  vendor/clang/dist/lib/Sema/JumpDiagnostics.cpp
  vendor/clang/dist/lib/Sema/SemaChecking.cpp
  vendor/clang/dist/lib/Sema/SemaCodeComplete.cpp
  vendor/clang/dist/lib/Sema/SemaDecl.cpp
  vendor/clang/dist/lib/Sema/SemaDeclAttr.cpp
  vendor/clang/dist/lib/Sema/SemaDeclCXX.cpp
  vendor/clang/dist/lib/Sema/SemaExpr.cpp
  vendor/clang/dist/lib/Sema/SemaExprMember.cpp
  vendor/clang/dist/lib/Sema/SemaExprObjC.cpp
  vendor/clang/dist/lib/Sema/SemaInit.cpp
  vendor/clang/dist/lib/Sema/SemaOpenMP.cpp
  vendor/clang/dist/lib/Sema/SemaOverload.cpp
  vendor/clang/dist/lib/Sema/SemaTemplate.cpp
  vendor/clang/dist/lib/Sema/SemaTemplateDeduction.cpp
  vendor/clang/dist/lib/Sema/SemaTemplateInstantiateDecl.cpp
  vendor/clang/dist/lib/Sema/SemaType.cpp
  vendor/clang/dist/lib/Serialization/ASTReader.cpp
  vendor/clang/dist/lib/Serialization/ASTReaderDecl.cpp
  vendor/clang/dist/lib/Serialization/ASTWriterDecl.cpp
  vendor/clang/dist/lib/StaticAnalyzer/Checkers/DynamicTypePropagation.cpp
  vendor/clang/dist/lib/StaticAnalyzer/Checkers/PaddingChecker.cpp
  vendor/clang/dist/lib/StaticAnalyzer/Core/BugReporter.cpp
  vendor/clang/dist/lib/StaticAnalyzer/Core/BugReporterVisitors.cpp
  vendor/clang/dist/lib/StaticAnalyzer/Core/ExprEngineCXX.cpp
  vendor/clang/dist/lib/StaticAnalyzer/Core/HTMLDiagnostics.cpp
  vendor/clang/dist/lib/StaticAnalyzer/Core/RegionStore.cpp
  vendor/clang/dist/test/Analysis/initializer.cpp
  vendor/clang/dist/test/Analysis/inlining/false-positive-suppression.m
  vendor/clang/dist/test/Analysis/inlining/inline-defensive-checks.c
  vendor/clang/dist/test/Analysis/inlining/path-notes.m
  vendor/clang/dist/test/Analysis/nullptr.cpp
  vendor/clang/dist/test/Analysis/uninit-const.cpp
  vendor/clang/dist/test/CXX/dcl.decl/dcl.init/dcl.init.ref/p5-examples.cpp
  vendor/clang/dist/test/CXX/temp/temp.param/p2.cpp
  vendor/clang/dist/test/CodeGen/aarch64-neon-intrinsics.c
  vendor/clang/dist/test/CodeGen/aarch64-neon-ldst-one.c
  vendor/clang/dist/test/CodeGen/complex-math.c
  vendor/clang/dist/test/CodeGen/tbaa-array.cpp
  vendor/clang/dist/test/CodeGen/tbaa.cpp
  vendor/clang/dist/test/Driver/darwin-version.c
  vendor/clang/dist/test/Driver/fsanitize.c
  vendor/clang/dist/test/Driver/fuchsia.c
  vendor/clang/dist/test/Driver/myriad-toolchain.c
  vendor/clang/dist/test/Driver/objc-weak.m
  vendor/clang/dist/test/Driver/opt-record.c
  vendor/clang/dist/test/Driver/pic.c
  vendor/clang/dist/test/Driver/unavailable_aligned_allocation.cpp
  vendor/clang/dist/test/Frontend/float16.cpp
  vendor/clang/dist/test/Misc/ast-dump-attr.cpp
  vendor/clang/dist/test/Misc/ast-dump-color.cpp
  vendor/clang/dist/test/Misc/ast-dump-decl.cpp
  vendor/clang/dist/test/Misc/ast-dump-invalid.cpp
  vendor/clang/dist/test/Modules/add-remove-private.m
  vendor/clang/dist/test/Modules/auto-module-import.m
  vendor/clang/dist/test/Modules/global_index.m
  vendor/clang/dist/test/Modules/implicit-private-with-different-name.m
  vendor/clang/dist/test/Modules/modulemap-locations.m
  vendor/clang/dist/test/Modules/odr.cpp
  vendor/clang/dist/test/Modules/odr_hash.cpp
  vendor/clang/dist/test/Modules/prune.m
  vendor/clang/dist/test/Modules/redefinition-c-tagtypes.m
  vendor/clang/dist/test/Modules/requires-coroutines.mm
  vendor/clang/dist/test/Modules/requires.m
  vendor/clang/dist/test/Modules/requires.mm
  vendor/clang/dist/test/Modules/subframework-from-intermediate-path.m
  vendor/clang/dist/test/Modules/subframeworks.m
  vendor/clang/dist/test/OpenMP/dump.cpp
  vendor/clang/dist/test/OpenMP/parallel_for_codegen.cpp
  vendor/clang/dist/test/OpenMP/teams_distribute_parallel_for_num_threads_codegen.cpp
  vendor/clang/dist/test/OpenMP/teams_distribute_parallel_for_simd_num_threads_codegen.cpp
  vendor/clang/dist/test/Parser/cxx-decl.cpp
  vendor/clang/dist/test/Parser/objc-default-ctor-init.mm
  vendor/clang/dist/test/Preprocessor/predefined-arch-macros.c
  vendor/clang/dist/test/Sema/attr-ifunc.c
  vendor/clang/dist/test/Sema/builtin-object-size.c
  vendor/clang/dist/test/SemaCXX/compound-literal.cpp
  vendor/clang/dist/test/SemaCXX/decl-expr-ambiguity.cpp
  vendor/clang/dist/test/SemaCXX/return-noreturn.cpp
  vendor/clang/dist/test/SemaCXX/sourceranges.cpp
  vendor/clang/dist/test/SemaCXX/warn-redundant-move.cpp
  vendor/clang/dist/test/SemaObjCXX/block-cleanup.mm
  vendor/clang/dist/test/SemaTemplate/default-expr-arguments-2.cpp
  vendor/clang/dist/test/SemaTemplate/default-expr-arguments-3.cpp
  vendor/clang/dist/test/SemaTemplate/temp_arg_enum_printing.cpp
  vendor/clang/dist/tools/libclang/CXIndexDataConsumer.cpp
  vendor/clang/dist/unittests/AST/ASTImporterTest.cpp
  vendor/clang/dist/unittests/AST/NamedDeclPrinterTest.cpp
  vendor/clang/dist/unittests/CodeGen/CMakeLists.txt
  vendor/clang/dist/utils/TableGen/ClangAttrEmitter.cpp
  vendor/clang/dist/utils/TableGen/NeonEmitter.cpp

Modified: vendor/clang/dist/cmake/caches/Fuchsia-stage2.cmake
==============================================================================
--- vendor/clang/dist/cmake/caches/Fuchsia-stage2.cmake	Sun Dec 24 01:00:16 2017	(r327123)
+++ vendor/clang/dist/cmake/caches/Fuchsia-stage2.cmake	Sun Dec 24 01:00:23 2017	(r327124)
@@ -23,6 +23,7 @@ if(APPLE)
   set(LLDB_CODESIGN_IDENTITY "" CACHE STRING "")
 endif()
 
+set(LLVM_ENABLE_ASSERTIONS ON CACHE BOOL "")
 set(CMAKE_BUILD_TYPE RelWithDebInfo CACHE STRING "")
 set(CMAKE_C_FLAGS_RELWITHDEBINFO "-O3 -gline-tables-only -DNDEBUG" CACHE STRING "")
 set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-O3 -gline-tables-only -DNDEBUG" CACHE STRING "")

Modified: vendor/clang/dist/cmake/caches/Fuchsia.cmake
==============================================================================
--- vendor/clang/dist/cmake/caches/Fuchsia.cmake	Sun Dec 24 01:00:16 2017	(r327123)
+++ vendor/clang/dist/cmake/caches/Fuchsia.cmake	Sun Dec 24 01:00:23 2017	(r327124)
@@ -13,6 +13,7 @@ set(LLVM_ENABLE_TERMINFO OFF CACHE BOOL "")
 set(LLVM_ENABLE_ZLIB OFF CACHE BOOL "")
 set(CLANG_PLUGIN_SUPPORT OFF CACHE BOOL "")
 
+set(LLVM_ENABLE_ASSERTIONS ON CACHE BOOL "")
 set(CMAKE_BUILD_TYPE Release CACHE STRING "")
 
 set(BOOTSTRAP_LLVM_ENABLE_LTO ON CACHE BOOL "")

Modified: vendor/clang/dist/docs/HardwareAssistedAddressSanitizerDesign.rst
==============================================================================
--- vendor/clang/dist/docs/HardwareAssistedAddressSanitizerDesign.rst	Sun Dec 24 01:00:16 2017	(r327123)
+++ vendor/clang/dist/docs/HardwareAssistedAddressSanitizerDesign.rst	Sun Dec 24 01:00:23 2017	(r327124)
@@ -21,7 +21,7 @@ The redzones, the quarantine, and, to a less extent, t
 sources of AddressSanitizer's memory overhead.
 See the `AddressSanitizer paper`_ for details.
 
-AArch64 has the `Address Tagging`_, a hardware feature that allows
+AArch64 has the `Address Tagging`_ (or top-byte-ignore, TBI), a hardware feature that allows
 software to use 8 most significant bits of a 64-bit pointer as
 a tag. HWASAN uses `Address Tagging`_
 to implement a memory safety tool, similar to :doc:`AddressSanitizer`,
@@ -31,7 +31,7 @@ accuracy guarantees.
 Algorithm
 =========
 * Every heap/stack/global memory object is forcibly aligned by `N` bytes
-  (`N` is e.g. 16 or 64)
+  (`N` is e.g. 16 or 64). We call `N` the **granularity** of tagging.
 * For every such object a random `K`-bit tag `T` is chosen (`K` is e.g. 4 or 8)
 * The pointer to the object is tagged with `T`.
 * The memory for the object is also tagged with `T`
@@ -44,19 +44,35 @@ Instrumentation
 
 Memory Accesses
 ---------------
-All memory accesses are prefixed with a call to a run-time function.
-The function encodes the type and the size of access in its name;
-it receives the address as a parameter, e.g. `__hwasan_load4(void *ptr)`;
-it loads the memory tag, compares it with the
-pointer tag, and executes `__builtin_trap` (or calls `__hwasan_error_load4(void *ptr)`) on mismatch.
+All memory accesses are prefixed with an inline instruction sequence that
+verifies the tags. Currently, the following sequence is used:
 
-It's possible to inline this callback too.
 
+.. code-block:: asm
+
+  // int foo(int *a) { return *a; }
+  // clang -O2 --target=aarch64-linux -fsanitize=hwaddress -c load.c
+  foo:
+       0:	08 dc 44 d3 	ubfx	x8, x0, #4, #52  // shadow address
+       4:	08 01 40 39 	ldrb	w8, [x8]         // load shadow
+       8:	09 fc 78 d3 	lsr	x9, x0, #56      // address tag
+       c:	3f 01 08 6b 	cmp	w9, w8           // compare tags
+      10:	61 00 00 54 	b.ne	#12              // jump on mismatch
+      14:	00 00 40 b9 	ldr	w0, [x0]         // original load
+      18:	c0 03 5f d6 	ret             
+      1c:	40 20 40 d4 	hlt	#0x102           // halt
+      20:	00 00 40 b9 	ldr	w0, [x0]         // original load
+      24:	c0 03 5f d6 	ret
+
+
+Alternatively, memory accesses are prefixed with a function call.
+
 Heap
 ----
 
 Tagging the heap memory/pointers is done by `malloc`.
 This can be based on any malloc that forces all objects to be N-aligned.
+`free` tags the memory with a different tag.
 
 Stack
 -----
@@ -75,7 +91,7 @@ TODO: details.
 Error reporting
 ---------------
 
-Errors are generated by `__builtin_trap` and are handled by a signal handler.
+Errors are generated by the `HLT` instruction and are handled by a signal handler.
 
 Attribute
 ---------

Modified: vendor/clang/dist/docs/Modules.rst
==============================================================================
--- vendor/clang/dist/docs/Modules.rst	Sun Dec 24 01:00:16 2017	(r327123)
+++ vendor/clang/dist/docs/Modules.rst	Sun Dec 24 01:00:23 2017	(r327124)
@@ -859,13 +859,15 @@ express this with a single module map file in the libr
 
   module Foo {
     header "Foo.h"
-    
-    explicit module Private {
-      header "Foo_Private.h"
-    }
+    ...
   }
 
+  module Foo_Private {
+    header "Foo_Private.h"
+    ...
+  }
 
+
 because the header ``Foo_Private.h`` won't always be available. The
 module map file could be customized based on whether
 ``Foo_Private.h`` is available or not, but doing so requires custom
@@ -873,7 +875,7 @@ build machinery.
 
 Private module map files, which are named ``module.private.modulemap``
 (or, for backward compatibility, ``module_private.map``), allow one to
-augment the primary module map file with an additional submodule. For
+augment the primary module map file with an additional modules. For
 example, we would split the module map file above into two module map
 files:
 
@@ -883,9 +885,9 @@ files:
   module Foo {
     header "Foo.h"
   }
-  
+
   /* module.private.modulemap */
-  explicit module Foo.Private {
+  module Foo_Private {
     header "Foo_Private.h"
   }
 
@@ -899,13 +901,12 @@ boundaries.
 
 When writing a private module as part of a *framework*, it's recommended that:
 
-* Headers for this module are present in the ``PrivateHeaders``
-  framework subdirectory.
-* The private module is defined as a *submodule* of the public framework (if
-  there's one), similar to how ``Foo.Private`` is defined in the example above.
-* The ``explicit`` keyword should be used to guarantee that its content will
-  only be available when the submodule itself is explicitly named (through a
-  ``@import`` for example).
+* Headers for this module are present in the ``PrivateHeaders`` framework
+  subdirectory.
+* The private module is defined as a *top level module* with the name of the
+  public framework prefixed, like ``Foo_Private`` above. Clang has extra logic
+  to work with this naming, using ``FooPrivate`` or ``Foo.Private`` (submodule)
+  trigger warnings and might not work as expected.
 
 Modularizing a Platform
 =======================

Modified: vendor/clang/dist/docs/UndefinedBehaviorSanitizer.rst
==============================================================================
--- vendor/clang/dist/docs/UndefinedBehaviorSanitizer.rst	Sun Dec 24 01:00:16 2017	(r327123)
+++ vendor/clang/dist/docs/UndefinedBehaviorSanitizer.rst	Sun Dec 24 01:00:23 2017	(r327124)
@@ -124,8 +124,8 @@ Available checks are:
   -  ``-fsanitize=signed-integer-overflow``: Signed integer overflow,
      including all the checks added by ``-ftrapv``, and checking for
      overflow in signed division (``INT_MIN / -1``).
-  -  ``-fsanitize=unreachable``: If control flow reaches
-     ``__builtin_unreachable``.
+  -  ``-fsanitize=unreachable``: If control flow reaches an unreachable
+     program point.
   -  ``-fsanitize=unsigned-integer-overflow``: Unsigned integer
      overflows. Note that unlike signed integer overflow, unsigned integer
      is not undefined behavior. However, while it has well-defined semantics,

Modified: vendor/clang/dist/include/clang/AST/Decl.h
==============================================================================
--- vendor/clang/dist/include/clang/AST/Decl.h	Sun Dec 24 01:00:16 2017	(r327123)
+++ vendor/clang/dist/include/clang/AST/Decl.h	Sun Dec 24 01:00:23 2017	(r327124)
@@ -1759,6 +1759,11 @@ class FunctionDecl : public DeclaratorDecl, public Dec
   unsigned IsCopyDeductionCandidate : 1;
 
 private:
+
+  /// Store the ODRHash after first calculation.
+  unsigned HasODRHash : 1;
+  unsigned ODRHash;
+
   /// \brief End part of this FunctionDecl's source range.
   ///
   /// We could compute the full range in getSourceRange(). However, when we're
@@ -1841,8 +1846,9 @@ class FunctionDecl : public DeclaratorDecl, public Dec
         IsExplicitlyDefaulted(false), HasImplicitReturnZero(false),
         IsLateTemplateParsed(false), IsConstexpr(isConstexprSpecified),
         InstantiationIsPending(false), UsesSEHTry(false), HasSkippedBody(false),
-        WillHaveBody(false), IsCopyDeductionCandidate(false),
-        EndRangeLoc(NameInfo.getEndLoc()), DNLoc(NameInfo.getInfo()) {}
+        WillHaveBody(false), IsCopyDeductionCandidate(false), HasODRHash(false),
+        ODRHash(0), EndRangeLoc(NameInfo.getEndLoc()),
+        DNLoc(NameInfo.getInfo()) {}
 
   using redeclarable_base = Redeclarable<FunctionDecl>;
 
@@ -2438,6 +2444,10 @@ class FunctionDecl : public DeclaratorDecl, public Dec
   /// the corresponding Builtin ID. If the function is not a memory function,
   /// returns 0.
   unsigned getMemoryFunctionKind() const;
+
+  /// \brief Returns ODRHash of the function.  This value is calculated and
+  /// stored on first call, then the stored value returned on the other calls.
+  unsigned getODRHash();
 
   // Implement isa/cast/dyncast/etc.
   static bool classof(const Decl *D) { return classofKind(D->getKind()); }

Modified: vendor/clang/dist/include/clang/AST/ODRHash.h
==============================================================================
--- vendor/clang/dist/include/clang/AST/ODRHash.h	Sun Dec 24 01:00:16 2017	(r327123)
+++ vendor/clang/dist/include/clang/AST/ODRHash.h	Sun Dec 24 01:00:23 2017	(r327124)
@@ -53,6 +53,10 @@ class ODRHash { (public)
   // more information than the AddDecl class.
   void AddCXXRecordDecl(const CXXRecordDecl *Record);
 
+  // Use this for ODR checking functions between modules.  This method compares
+  // more information than the AddDecl class.
+  void AddFunctionDecl(const FunctionDecl *Function);
+
   // Process SubDecls of the main Decl.  This method calls the DeclVisitor
   // while AddDecl does not.
   void AddSubDecl(const Decl *D);

Modified: vendor/clang/dist/include/clang/AST/Type.h
==============================================================================
--- vendor/clang/dist/include/clang/AST/Type.h	Sun Dec 24 01:00:16 2017	(r327123)
+++ vendor/clang/dist/include/clang/AST/Type.h	Sun Dec 24 01:00:23 2017	(r327124)
@@ -976,16 +976,14 @@ class QualType { (public)
     return LHS.Value != RHS.Value;
   }
 
-  std::string getAsString() const {
-    return getAsString(split());
+  static std::string getAsString(SplitQualType split,
+                                 const PrintingPolicy &Policy) {
+    return getAsString(split.Ty, split.Quals, Policy);
   }
+  static std::string getAsString(const Type *ty, Qualifiers qs,
+                                 const PrintingPolicy &Policy);
 
-  static std::string getAsString(SplitQualType split) {
-    return getAsString(split.Ty, split.Quals);
-  }
-
-  static std::string getAsString(const Type *ty, Qualifiers qs);
-
+  std::string getAsString() const; 
   std::string getAsString(const PrintingPolicy &Policy) const;
 
   void print(raw_ostream &OS, const PrintingPolicy &Policy,

Modified: vendor/clang/dist/include/clang/Basic/Attr.td
==============================================================================
--- vendor/clang/dist/include/clang/Basic/Attr.td	Sun Dec 24 01:00:16 2017	(r327123)
+++ vendor/clang/dist/include/clang/Basic/Attr.td	Sun Dec 24 01:00:23 2017	(r327124)
@@ -267,14 +267,25 @@ def RenderScript : LangOpt<"RenderScript">;
 def ObjC : LangOpt<"ObjC1">;
 def BlocksSupported : LangOpt<"Blocks">;
 
-// Defines targets for target-specific attributes. The list of strings should
-// specify architectures for which the target applies, based off the ArchType
-// enumeration in Triple.h.
-class TargetArch<list<string> arches> {
-  list<string> Arches = arches;
+// Defines targets for target-specific attributes. Empty lists are unchecked.
+class TargetSpec {
+  // Specifies Architectures for which the target applies, based off the
+  // ArchType enumeration in Triple.h.
+  list<string> Arches = [];
+  // Specifies Operating Systems for which the target applies, based off the
+  // OSType enumeration in Triple.h
   list<string> OSes;
+  // Specifies the C++ ABIs for which the target applies, based off the
+  // TargetCXXABI::Kind in TargetCXXABI.h.
   list<string> CXXABIs;
+  // Specifies Object Formats for which the target applies, based off the
+  // ObjectFormatType enumeration in Triple.h
+  list<string> ObjectFormats;
 }
+
+class TargetArch<list<string> arches> : TargetSpec {
+  let Arches = arches;
+}
 def TargetARM : TargetArch<["arm", "thumb", "armeb", "thumbeb"]>;
 def TargetAVR : TargetArch<["avr"]>;
 def TargetMips32 : TargetArch<["mips", "mipsel"]>;
@@ -288,6 +299,9 @@ def TargetWindows : TargetArch<["x86", "x86_64", "arm"
 def TargetMicrosoftCXXABI : TargetArch<["x86", "x86_64", "arm", "thumb", "aarch64"]> {
   let CXXABIs = ["Microsoft"];
 }
+def TargetELF : TargetSpec {
+  let ObjectFormats = ["ELF"];
+}
 
 // Attribute subject match rules that are used for #pragma clang attribute.
 //
@@ -465,8 +479,8 @@ class InheritableAttr : Attr;
 
 /// A target-specific attribute.  This class is meant to be used as a mixin
 /// with InheritableAttr or Attr depending on the attribute's needs.
-class TargetSpecificAttr<TargetArch target> {
-  TargetArch Target = target;
+class TargetSpecificAttr<TargetSpec target> {
+  TargetSpec Target = target;
   // Attributes are generally required to have unique spellings for their names
   // so that the parser can determine what kind of attribute it has parsed.
   // However, target-specific attributes are special in that the attribute only
@@ -1121,7 +1135,7 @@ def IBOutletCollection : InheritableAttr {
   let Documentation = [Undocumented];
 }
 
-def IFunc : Attr {
+def IFunc : Attr, TargetSpecificAttr<TargetELF> {
   let Spellings = [GCC<"ifunc">];
   let Args = [StringArgument<"Resolver">];
   let Subjects = SubjectList<[Function]>;

Modified: vendor/clang/dist/include/clang/Basic/DiagnosticFrontendKinds.td
==============================================================================
--- vendor/clang/dist/include/clang/Basic/DiagnosticFrontendKinds.td	Sun Dec 24 01:00:16 2017	(r327123)
+++ vendor/clang/dist/include/clang/Basic/DiagnosticFrontendKinds.td	Sun Dec 24 01:00:23 2017	(r327124)
@@ -198,6 +198,11 @@ def err_missing_module : Error<
 def err_no_submodule : Error<"no submodule named %0 in module '%1'">;
 def err_no_submodule_suggest : Error<
   "no submodule named %0 in module '%1'; did you mean '%2'?">;
+def warn_no_priv_submodule_use_toplevel : Warning<
+  "no submodule named %0 in module '%1'; using top level '%2'">,
+  InGroup<PrivateModule>;
+def note_private_top_level_defined : Note<
+  "module defined here">;
 def warn_missing_submodule : Warning<"missing submodule '%0'">,
   InGroup<IncompleteUmbrella>;
 def note_module_import_here : Note<"module imported here">;

Modified: vendor/clang/dist/include/clang/Basic/DiagnosticIDs.h
==============================================================================
--- vendor/clang/dist/include/clang/Basic/DiagnosticIDs.h	Sun Dec 24 01:00:16 2017	(r327123)
+++ vendor/clang/dist/include/clang/Basic/DiagnosticIDs.h	Sun Dec 24 01:00:23 2017	(r327124)
@@ -297,7 +297,7 @@ class DiagnosticIDs : public RefCountedBase<Diagnostic
 
   /// \brief Get the set of all diagnostic IDs.
   static void getAllDiagnostics(diag::Flavor Flavor,
-                                SmallVectorImpl<diag::kind> &Diags);
+                                std::vector<diag::kind> &Diags);
 
   /// \brief Get the diagnostic option with the closest edit distance to the
   /// given group name.

Modified: vendor/clang/dist/include/clang/Basic/DiagnosticLexKinds.td
==============================================================================
--- vendor/clang/dist/include/clang/Basic/DiagnosticLexKinds.td	Sun Dec 24 01:00:16 2017	(r327123)
+++ vendor/clang/dist/include/clang/Basic/DiagnosticLexKinds.td	Sun Dec 24 01:00:23 2017	(r327124)
@@ -691,11 +691,15 @@ def err_mmap_expected_feature : Error<"expected a feat
 def err_mmap_expected_attribute : Error<"expected an attribute name">;
 def warn_mmap_unknown_attribute : Warning<"unknown attribute '%0'">,
   InGroup<IgnoredAttributes>;
-def warn_mmap_mismatched_top_level_private : Warning<
-  "top-level module '%0' in private module map, expected a submodule of '%1'">,
+def warn_mmap_mismatched_private_submodule : Warning<
+  "private submodule '%0' in private module map, expected top-level module">,
   InGroup<PrivateModule>;
-def note_mmap_rename_top_level_private_as_submodule : Note<
-  "make '%0' a submodule of '%1' to ensure it can be found by name">;
+def warn_mmap_mismatched_private_module_name : Warning<
+  "expected canonical name for private module '%0'">,
+  InGroup<PrivateModule>;
+def note_mmap_rename_top_level_private_module : Note<
+  "rename '%0' to ensure it can be found by name">;
+
 def err_mmap_duplicate_header_attribute : Error<
   "header attribute '%0' specified multiple times">;
 def err_mmap_invalid_header_attribute_value : Error<

Modified: vendor/clang/dist/include/clang/Basic/DiagnosticSemaKinds.td
==============================================================================
--- vendor/clang/dist/include/clang/Basic/DiagnosticSemaKinds.td	Sun Dec 24 01:00:16 2017	(r327123)
+++ vendor/clang/dist/include/clang/Basic/DiagnosticSemaKinds.td	Sun Dec 24 01:00:23 2017	(r327124)
@@ -3911,6 +3911,9 @@ def err_template_param_different_kind : Error<
   "%select{|template parameter }0redeclaration">;
 def note_template_param_different_kind : Note<
   "template parameter has a different kind in template argument">;
+
+def err_invalid_decl_specifier_in_nontype_parm : Error<
+  "invalid declaration specifier in template non-type parameter">;
   
 def err_template_nontype_parm_different_type : Error<
   "template non-type parameter has a different type %0 in template "

Modified: vendor/clang/dist/include/clang/Basic/DiagnosticSerializationKinds.td
==============================================================================
--- vendor/clang/dist/include/clang/Basic/DiagnosticSerializationKinds.td	Sun Dec 24 01:00:16 2017	(r327123)
+++ vendor/clang/dist/include/clang/Basic/DiagnosticSerializationKinds.td	Sun Dec 24 01:00:23 2017	(r327124)
@@ -270,6 +270,29 @@ def note_module_odr_violation_mismatch_decl_diff : Not
   "friend function %2|"
   "}1">;
 
+def err_module_odr_violation_function : Error<
+  "%q0 has different definitions in different modules; "
+  "%select{definition in module '%2'|defined here}1 "
+  "first difference is "
+  "%select{"
+  "return type is %4|"
+  "%ordinal4 parameter with name %5|"
+  "%ordinal4 parameter with type %5%select{| decayed from %7}6|"
+  "%ordinal4 parameter with%select{out|}5 a default argument|"
+  "%ordinal4 parameter with a default argument|"
+  "function body"
+  "}3">;
+
+def note_module_odr_violation_function : Note<"but in '%0' found "
+  "%select{"
+  "different return type %2|"
+  "%ordinal2 parameter with name %3|"
+  "%ordinal2 parameter with type %3%select{| decayed from %5}4|"
+  "%ordinal2 parameter with%select{out|}3 a default argument|"
+  "%ordinal2 parameter with a different default argument|"
+  "a different body"
+  "}1">;
+
 def err_module_odr_violation_mismatch_decl_unknown : Error<
   "%q0 %select{with definition in module '%2'|defined here}1 has different "
   "definitions in different modules; first difference is this "

Modified: vendor/clang/dist/include/clang/Basic/arm_neon.td
==============================================================================
--- vendor/clang/dist/include/clang/Basic/arm_neon.td	Sun Dec 24 01:00:16 2017	(r327123)
+++ vendor/clang/dist/include/clang/Basic/arm_neon.td	Sun Dec 24 01:00:23 2017	(r327124)
@@ -227,6 +227,7 @@ def OP_UNAVAILABLE : Operation {
 // u: unsigned integer (int/float args)
 // f: float (int args)
 // F: double (int args)
+// H: half (int args)
 // d: default
 // g: default, ignore 'Q' size modifier.
 // j: default, force 'Q' size modifier.
@@ -345,6 +346,7 @@ def OP_MLSLHi   : Op<(call "vmlsl", $p0, (call "vget_h
                                          (call "vget_high", $p2))>;
 def OP_MLSLHi_N : Op<(call "vmlsl_n", $p0, (call "vget_high", $p1), $p2)>;
 def OP_MUL_N    : Op<(op "*", $p0, (dup $p1))>;
+def OP_MULX_N   : Op<(call "vmulx", $p0, (dup $p1))>;
 def OP_MLA_N    : Op<(op "+", $p0, (op "*", $p1, (dup $p2)))>;
 def OP_MLS_N    : Op<(op "-", $p0, (op "*", $p1, (dup $p2)))>;
 def OP_FMLA_N   : Op<(call "vfma", $p0, $p1, (dup $p2))>;
@@ -1660,4 +1662,187 @@ def SCALAR_SQRDMLSH_LANEQ : SOpInst<"vqrdmlsh_laneq", 
 
 def SCALAR_VDUP_LANE : IInst<"vdup_lane", "sdi", "ScSsSiSlSfSdSUcSUsSUiSUlSPcSPs">;
 def SCALAR_VDUP_LANEQ : IInst<"vdup_laneq", "sji", "ScSsSiSlSfSdSUcSUsSUiSUlSPcSPs">;
+}
+
+// ARMv8.2-A FP16 intrinsics.
+let ArchGuard = "defined(__ARM_FEATURE_FP16_VECTOR_ARITHMETIC) && defined(__aarch64__)" in {
+
+  // ARMv8.2-A FP16 one-operand vector intrinsics.
+
+  // Comparison
+  def CMEQH    : SInst<"vceqz", "ud", "hQh">;
+  def CMGEH    : SInst<"vcgez", "ud", "hQh">;
+  def CMGTH    : SInst<"vcgtz", "ud", "hQh">;
+  def CMLEH    : SInst<"vclez", "ud", "hQh">;
+  def CMLTH    : SInst<"vcltz", "ud", "hQh">;
+
+  // Vector conversion
+  def VCVT_F16     : SInst<"vcvt_f16", "Hd",  "sUsQsQUs">;
+  def VCVT_S16     : SInst<"vcvt_s16", "xd",  "hQh">;
+  def VCVT_U16     : SInst<"vcvt_u16", "ud",  "hQh">;
+  def VCVTA_S16    : SInst<"vcvta_s16", "xd", "hQh">;
+  def VCVTA_U16    : SInst<"vcvta_u16", "ud", "hQh">;
+  def VCVTM_S16    : SInst<"vcvtm_s16", "xd", "hQh">;
+  def VCVTM_U16    : SInst<"vcvtm_u16", "ud", "hQh">;
+  def VCVTN_S16    : SInst<"vcvtn_s16", "xd", "hQh">;
+  def VCVTN_U16    : SInst<"vcvtn_u16", "ud", "hQh">;
+  def VCVTP_S16    : SInst<"vcvtp_s16", "xd", "hQh">;
+  def VCVTP_U16    : SInst<"vcvtp_u16", "ud", "hQh">;
+
+  // Vector rounding
+  def FRINTZH      : SInst<"vrnd",  "dd", "hQh">;
+  def FRINTNH      : SInst<"vrndn", "dd", "hQh">;
+  def FRINTAH      : SInst<"vrnda", "dd", "hQh">;
+  def FRINTPH      : SInst<"vrndp", "dd", "hQh">;
+  def FRINTMH      : SInst<"vrndm", "dd", "hQh">;
+  def FRINTXH      : SInst<"vrndx", "dd", "hQh">;
+  def FRINTIH      : SInst<"vrndi", "dd", "hQh">;
+
+  // Misc.
+  def VABSH        : SInst<"vabs", "dd", "hQh">;
+  def VNEGH        : SOpInst<"vneg", "dd", "hQh", OP_NEG>;
+  def VRECPEH      : SInst<"vrecpe", "dd", "hQh">;
+  def FRSQRTEH     : SInst<"vrsqrte", "dd", "hQh">;
+  def FSQRTH       : SInst<"vsqrt", "dd", "hQh">;
+
+  // ARMv8.2-A FP16 two-operands vector intrinsics.
+
+  // Misc.
+  def VADDH        : SOpInst<"vadd", "ddd", "hQh", OP_ADD>;
+  def VABDH        : SInst<"vabd", "ddd",  "hQh">;
+  def VSUBH         : SOpInst<"vsub", "ddd", "hQh", OP_SUB>;
+
+  // Comparison
+  let InstName = "vacge" in {
+	  def VCAGEH     : SInst<"vcage", "udd", "hQh">;
+	  def VCALEH     : SInst<"vcale", "udd", "hQh">;
+  }
+  let InstName = "vacgt" in {
+    def VCAGTH     : SInst<"vcagt", "udd", "hQh">;
+	  def VCALTH     : SInst<"vcalt", "udd", "hQh">;
+  }
+  def VCEQH        : SOpInst<"vceq", "udd", "hQh", OP_EQ>;
+  def VCGEH        : SOpInst<"vcge", "udd", "hQh", OP_GE>;
+  def VCGTH        : SOpInst<"vcgt", "udd", "hQh", OP_GT>;
+  let InstName = "vcge" in
+    def VCLEH      : SOpInst<"vcle", "udd", "hQh", OP_LE>;
+  let InstName = "vcgt" in
+    def VCLTH      : SOpInst<"vclt", "udd", "hQh", OP_LT>;
+
+  // Vector conversion
+  let isVCVT_N = 1 in {
+    def VCVT_N_F16 : SInst<"vcvt_n_f16", "Hdi", "sUsQsQUs">;
+    def VCVT_N_S16 : SInst<"vcvt_n_s16", "xdi", "hQh">;
+    def VCVT_N_U16 : SInst<"vcvt_n_u16", "udi", "hQh">;
+  }
+
+  // Max/Min
+  def VMAXH         : SInst<"vmax", "ddd", "hQh">;
+  def VMINH         : SInst<"vmin", "ddd", "hQh">;
+  def FMAXNMH       : SInst<"vmaxnm", "ddd", "hQh">;
+  def FMINNMH       : SInst<"vminnm", "ddd", "hQh">;
+
+  // Multiplication/Division
+  def VMULH         : SOpInst<"vmul", "ddd", "hQh", OP_MUL>;
+  def MULXH         : SInst<"vmulx", "ddd", "hQh">;
+  def FDIVH         : IOpInst<"vdiv", "ddd",  "hQh", OP_DIV>;
+
+  // Pairwise addition
+  def VPADDH        : SInst<"vpadd", "ddd", "hQh">;
+
+  // Pairwise Max/Min
+  def VPMAXH        : SInst<"vpmax", "ddd", "hQh">;
+  def VPMINH        : SInst<"vpmin", "ddd", "hQh">;
+  // Pairwise MaxNum/MinNum
+  def FMAXNMPH      : SInst<"vpmaxnm", "ddd", "hQh">;
+  def FMINNMPH      : SInst<"vpminnm", "ddd", "hQh">;
+
+  // Reciprocal/Sqrt
+  def VRECPSH       : SInst<"vrecps", "ddd", "hQh">;
+  def VRSQRTSH      : SInst<"vrsqrts", "ddd", "hQh">;
+
+  // ARMv8.2-A FP16 three-operands vector intrinsics.
+
+  // Vector fused multiply-add operations
+  def VFMAH        : SInst<"vfma", "dddd", "hQh">;
+  def VFMSH        : SOpInst<"vfms", "dddd", "hQh", OP_FMLS>;
+
+  // ARMv8.2-A FP16 lane vector intrinsics.
+
+  // FMA lane
+  def VFMA_LANEH   : IInst<"vfma_lane", "dddgi", "hQh">;
+  def VFMA_LANEQH  : IInst<"vfma_laneq", "dddji", "hQh">;
+
+  // FMA lane with scalar argument
+  def FMLA_NH      : SOpInst<"vfma_n", "ddds", "hQh", OP_FMLA_N>;
+  // Scalar floating point fused multiply-add (scalar, by element)
+  def SCALAR_FMLA_LANEH  : IInst<"vfma_lane", "sssdi", "Sh">;
+  def SCALAR_FMLA_LANEQH : IInst<"vfma_laneq", "sssji", "Sh">;
+
+  // FMS lane
+  def VFMS_LANEH   : IOpInst<"vfms_lane", "dddgi", "hQh", OP_FMS_LN>;
+  def VFMS_LANEQH  : IOpInst<"vfms_laneq", "dddji", "hQh", OP_FMS_LNQ>;
+  // FMS lane with scalar argument
+  def FMLS_NH      : SOpInst<"vfms_n", "ddds", "hQh", OP_FMLS_N>;
+  // Scalar floating foint fused multiply-subtract (scalar, by element)
+  def SCALAR_FMLS_LANEH  : IOpInst<"vfms_lane", "sssdi", "Sh", OP_FMS_LN>;
+  def SCALAR_FMLS_LANEQH : IOpInst<"vfms_laneq", "sssji", "Sh", OP_FMS_LNQ>;
+
+  // Mul lane
+  def VMUL_LANEH    : IOpInst<"vmul_lane", "ddgi", "hQh", OP_MUL_LN>;
+  def VMUL_LANEQH   : IOpInst<"vmul_laneq", "ddji", "hQh", OP_MUL_LN>;
+  def VMUL_NH       : IOpInst<"vmul_n", "dds", "hQh", OP_MUL_N>;
+  // Scalar floating point  multiply (scalar, by element)
+  def SCALAR_FMUL_LANEH  : IOpInst<"vmul_lane", "ssdi", "Sh", OP_SCALAR_MUL_LN>;
+  def SCALAR_FMUL_LANEQH : IOpInst<"vmul_laneq", "ssji", "Sh", OP_SCALAR_MUL_LN>;
+
+  // Mulx lane
+  def VMULX_LANEH   : IOpInst<"vmulx_lane", "ddgi", "hQh", OP_MULX_LN>;
+  def VMULX_LANEQH  : IOpInst<"vmulx_laneq", "ddji", "hQh", OP_MULX_LN>;
+  def VMULX_NH      : IOpInst<"vmulx_n", "dds", "hQh", OP_MULX_N>;
+  // TODO: Scalar floating point multiply extended (scalar, by element)
+  // Below ones are commented out because they need vmulx_f16(float16_t, float16_t)
+  // which will be implemented later with fp16 scalar intrinsic (arm_fp16.h)
+  //def SCALAR_FMULX_LANEH : IOpInst<"vmulx_lane", "ssdi", "Sh", OP_SCALAR_MUL_LN>;
+  //def SCALAR_FMULX_LANEQH : IOpInst<"vmulx_laneq", "ssji", "Sh", OP_SCALAR_MUL_LN>;
+
+  // ARMv8.2-A FP16 reduction vector intrinsics.
+  def VMAXVH   : SInst<"vmaxv", "sd", "hQh">;
+  def VMINVH   : SInst<"vminv", "sd", "hQh">;
+  def FMAXNMVH : SInst<"vmaxnmv", "sd", "hQh">;
+  def FMINNMVH : SInst<"vminnmv", "sd", "hQh">;
+
+  // Data processing intrinsics - section 5
+
+  // Logical operations
+  let isHiddenLInst = 1 in
+  def VBSLH    : SInst<"vbsl", "dudd", "hQh">;
+
+  // Transposition operations
+  def VZIPH    : WInst<"vzip", "2dd", "hQh">;
+  def VUZPH    : WInst<"vuzp", "2dd", "hQh">;
+  def VTRNH    : WInst<"vtrn", "2dd", "hQh">;
+
+  // Set all lanes to same value.
+  /* Already implemented prior to ARMv8.2-A.
+  def VMOV_NH  : WOpInst<"vmov_n", "ds", "hQh", OP_DUP>;
+  def VDUP_NH  : WOpInst<"vdup_n", "ds", "hQh", OP_DUP>;
+  def VDUP_LANE1H : WOpInst<"vdup_lane", "dgi", "hQh", OP_DUP_LN>;*/
+
+  // Vector Extract
+  def VEXTH      : WInst<"vext", "dddi", "hQh">;
+
+  // Reverse vector elements
+  def VREV64H    : WOpInst<"vrev64", "dd", "hQh", OP_REV64>;
+
+  // Permutation
+  def VTRN1H     : SOpInst<"vtrn1", "ddd", "hQh", OP_TRN1>;
+  def VZIP1H     : SOpInst<"vzip1", "ddd", "hQh", OP_ZIP1>;
+  def VUZP1H     : SOpInst<"vuzp1", "ddd", "hQh", OP_UZP1>;
+  def VTRN2H     : SOpInst<"vtrn2", "ddd", "hQh", OP_TRN2>;
+  def VZIP2H     : SOpInst<"vzip2", "ddd", "hQh", OP_ZIP2>;
+  def VUZP2H     : SOpInst<"vuzp2", "ddd", "hQh", OP_UZP2>;
+
+  def SCALAR_VDUP_LANEH  : IInst<"vdup_lane", "sdi", "Sh">;
+  def SCALAR_VDUP_LANEQH : IInst<"vdup_laneq", "sji", "Sh">;
 }

Modified: vendor/clang/dist/include/clang/Frontend/PrecompiledPreamble.h
==============================================================================
--- vendor/clang/dist/include/clang/Frontend/PrecompiledPreamble.h	Sun Dec 24 01:00:16 2017	(r327123)
+++ vendor/clang/dist/include/clang/Frontend/PrecompiledPreamble.h	Sun Dec 24 01:00:23 2017	(r327124)
@@ -19,6 +19,7 @@
 #include "llvm/ADT/IntrusiveRefCntPtr.h"
 #include "llvm/Support/AlignOf.h"
 #include "llvm/Support/MD5.h"
+#include <cstddef>
 #include <memory>
 #include <system_error>
 #include <type_traits>
@@ -89,6 +90,11 @@ class PrecompiledPreamble { (public)
   /// PreambleBounds used to build the preamble.
   PreambleBounds getBounds() const;
 
+  /// Returns the size, in bytes, that preamble takes on disk or in memory.
+  /// For on-disk preambles returns 0 if filesystem operations fail. Intended to
+  /// be used for logging and debugging purposes only.
+  std::size_t getSize() const;
+
   /// Check whether PrecompiledPreamble can be reused for the new contents(\p
   /// MainFileBuffer) of the main file.
   bool CanReuse(const CompilerInvocation &Invocation,
@@ -244,6 +250,11 @@ class PreambleCallbacks {
 public:
   virtual ~PreambleCallbacks() = default;
 
+  /// Called before FrontendAction::BeginSourceFile.
+  /// Can be used to store references to various CompilerInstance fields
+  /// (e.g. SourceManager) that may be interesting to the consumers of other
+  /// callbacks.
+  virtual void BeforeExecute(CompilerInstance &CI);
   /// Called after FrontendAction::Execute(), but before
   /// FrontendAction::EndSourceFile(). Can be used to transfer ownership of
   /// various CompilerInstance fields before they are destroyed.

Modified: vendor/clang/dist/include/clang/Index/IndexSymbol.h
==============================================================================
--- vendor/clang/dist/include/clang/Index/IndexSymbol.h	Sun Dec 24 01:00:16 2017	(r327123)
+++ vendor/clang/dist/include/clang/Index/IndexSymbol.h	Sun Dec 24 01:00:23 2017	(r327124)
@@ -56,7 +56,7 @@ enum class SymbolKind : uint8_t {
   Using,
 };
 
-enum class SymbolLanguage {
+enum class SymbolLanguage : uint8_t {
   C,
   ObjC,
   CXX,
@@ -64,7 +64,7 @@ enum class SymbolLanguage {
 };
 
 /// Language specific sub-kinds.
-enum class SymbolSubKind {
+enum class SymbolSubKind : uint8_t {
   None,
   CXXCopyConstructor,
   CXXMoveConstructor,
@@ -74,8 +74,9 @@ enum class SymbolSubKind {
   UsingValue,
 };
 
+typedef uint8_t SymbolPropertySet;
 /// Set of properties that provide additional info about a symbol.
-enum class SymbolProperty : uint8_t {
+enum class SymbolProperty : SymbolPropertySet {
   Generic                       = 1 << 0,
   TemplatePartialSpecialization = 1 << 1,
   TemplateSpecialization        = 1 << 2,
@@ -86,7 +87,6 @@ enum class SymbolProperty : uint8_t {
   Local                         = 1 << 7,
 };
 static const unsigned SymbolPropertyBitNum = 8;
-typedef unsigned SymbolPropertySet;
 
 /// Set of roles that are attributed to symbol occurrences.
 enum class SymbolRole : uint32_t {
@@ -127,8 +127,8 @@ struct SymbolRelation {
 struct SymbolInfo {
   SymbolKind Kind;
   SymbolSubKind SubKind;
-  SymbolPropertySet Properties;
   SymbolLanguage Lang;
+  SymbolPropertySet Properties;
 };
 
 SymbolInfo getSymbolInfo(const Decl *D);

Modified: vendor/clang/dist/include/clang/Parse/Parser.h
==============================================================================
--- vendor/clang/dist/include/clang/Parse/Parser.h	Sun Dec 24 01:00:16 2017	(r327123)
+++ vendor/clang/dist/include/clang/Parse/Parser.h	Sun Dec 24 01:00:23 2017	(r327124)
@@ -2748,10 +2748,10 @@ class Parser : public CodeCompletionHandler { (private
   bool ParseTemplateParameterList(unsigned Depth,
                                   SmallVectorImpl<NamedDecl*> &TemplateParams);
   bool isStartOfTemplateTypeParameter();
-  Decl *ParseTemplateParameter(unsigned Depth, unsigned Position);
-  Decl *ParseTypeParameter(unsigned Depth, unsigned Position);
-  Decl *ParseTemplateTemplateParameter(unsigned Depth, unsigned Position);
-  Decl *ParseNonTypeTemplateParameter(unsigned Depth, unsigned Position);
+  NamedDecl *ParseTemplateParameter(unsigned Depth, unsigned Position);
+  NamedDecl *ParseTypeParameter(unsigned Depth, unsigned Position);
+  NamedDecl *ParseTemplateTemplateParameter(unsigned Depth, unsigned Position);
+  NamedDecl *ParseNonTypeTemplateParameter(unsigned Depth, unsigned Position);
   void DiagnoseMisplacedEllipsis(SourceLocation EllipsisLoc,
                                  SourceLocation CorrectLoc,
                                  bool AlreadyHasEllipsis,

Modified: vendor/clang/dist/include/clang/Sema/Sema.h
==============================================================================
--- vendor/clang/dist/include/clang/Sema/Sema.h	Sun Dec 24 01:00:16 2017	(r327123)
+++ vendor/clang/dist/include/clang/Sema/Sema.h	Sun Dec 24 01:00:23 2017	(r327124)
@@ -6064,7 +6064,7 @@ class Sema { (public)
   void DiagnoseTemplateParameterShadow(SourceLocation Loc, Decl *PrevDecl);
   TemplateDecl *AdjustDeclIfTemplate(Decl *&Decl);
 
-  Decl *ActOnTypeParameter(Scope *S, bool Typename,
+  NamedDecl *ActOnTypeParameter(Scope *S, bool Typename,
                            SourceLocation EllipsisLoc,
                            SourceLocation KeyLoc,
                            IdentifierInfo *ParamName,
@@ -6077,12 +6077,12 @@ class Sema { (public)
                                              SourceLocation Loc);
   QualType CheckNonTypeTemplateParameterType(QualType T, SourceLocation Loc);
 
-  Decl *ActOnNonTypeTemplateParameter(Scope *S, Declarator &D,
+  NamedDecl *ActOnNonTypeTemplateParameter(Scope *S, Declarator &D,
                                       unsigned Depth,
                                       unsigned Position,
                                       SourceLocation EqualLoc,
                                       Expr *DefaultArg);
-  Decl *ActOnTemplateTemplateParameter(Scope *S,
+  NamedDecl *ActOnTemplateTemplateParameter(Scope *S,
                                        SourceLocation TmpLoc,
                                        TemplateParameterList *Params,
                                        SourceLocation EllipsisLoc,

Modified: vendor/clang/dist/include/clang/Serialization/ASTReader.h
==============================================================================
--- vendor/clang/dist/include/clang/Serialization/ASTReader.h	Sun Dec 24 01:00:16 2017	(r327123)
+++ vendor/clang/dist/include/clang/Serialization/ASTReader.h	Sun Dec 24 01:00:23 2017	(r327124)
@@ -1092,6 +1092,10 @@ class ASTReader (private)
   llvm::SmallDenseMap<CXXRecordDecl *, llvm::SmallVector<DataPointers, 2>, 2>
       PendingOdrMergeFailures;
 
+  /// \brief Function definitions in which we found an ODR violation.
+  llvm::SmallDenseMap<FunctionDecl *, llvm::SmallVector<FunctionDecl *, 2>, 2>
+      PendingFunctionOdrMergeFailures;
+
   /// \brief DeclContexts in which we have diagnosed an ODR violation.
   llvm::SmallPtrSet<DeclContext*, 2> DiagnosedOdrMergeFailures;
 

Modified: vendor/clang/dist/include/clang/StaticAnalyzer/Core/BugReporter/PathDiagnostic.h
==============================================================================
--- vendor/clang/dist/include/clang/StaticAnalyzer/Core/BugReporter/PathDiagnostic.h	Sun Dec 24 01:00:16 2017	(r327123)
+++ vendor/clang/dist/include/clang/StaticAnalyzer/Core/BugReporter/PathDiagnostic.h	Sun Dec 24 01:00:23 2017	(r327124)
@@ -334,7 +334,7 @@ class PathDiagnosticLocationPair { (public)
 // Path "pieces" for path-sensitive diagnostics.
 //===----------------------------------------------------------------------===//
 
-class PathDiagnosticPiece {
+class PathDiagnosticPiece: public llvm::FoldingSetNode {
 public:
   enum Kind { ControlFlow, Event, Macro, Call, Note };
   enum DisplayHint { Above, Below };

Modified: vendor/clang/dist/lib/AST/ASTDumper.cpp
==============================================================================
--- vendor/clang/dist/lib/AST/ASTDumper.cpp	Sun Dec 24 01:00:16 2017	(r327123)
+++ vendor/clang/dist/lib/AST/ASTDumper.cpp	Sun Dec 24 01:00:23 2017	(r327124)
@@ -99,6 +99,9 @@ namespace  {
     const CommandTraits *Traits;
     const SourceManager *SM;
 
+    /// The policy to use for printing; can be defaulted.
+    PrintingPolicy PrintPolicy;
+
     /// Pending[i] is an action to dump an entity at level i.
     llvm::SmallVector<std::function<void(bool isLastChild)>, 32> Pending;
 
@@ -207,12 +210,17 @@ namespace  {
   public:
     ASTDumper(raw_ostream &OS, const CommandTraits *Traits,
               const SourceManager *SM)
-      : OS(OS), Traits(Traits), SM(SM),
-        ShowColors(SM && SM->getDiagnostics().getShowColors()) { }
+        : ASTDumper(OS, Traits, SM,
+                    SM && SM->getDiagnostics().getShowColors()) {}
 
     ASTDumper(raw_ostream &OS, const CommandTraits *Traits,
               const SourceManager *SM, bool ShowColors)
-      : OS(OS), Traits(Traits), SM(SM), ShowColors(ShowColors) {}
+        : ASTDumper(OS, Traits, SM, ShowColors, LangOptions()) {}
+    ASTDumper(raw_ostream &OS, const CommandTraits *Traits,
+              const SourceManager *SM, bool ShowColors,
+              const PrintingPolicy &PrintPolicy)
+        : OS(OS), Traits(Traits), SM(SM), PrintPolicy(PrintPolicy),
+          ShowColors(ShowColors) {}
 
     void setDeserialize(bool D) { Deserialize = D; }
 
@@ -646,13 +654,13 @@ void ASTDumper::dumpBareType(QualType T, bool Desugar)
   ColorScope Color(*this, TypeColor);
 
   SplitQualType T_split = T.split();
-  OS << "'" << QualType::getAsString(T_split) << "'";
+  OS << "'" << QualType::getAsString(T_split, PrintPolicy) << "'";
 
   if (Desugar && !T.isNull()) {
     // If the type is sugared, also dump a (shallow) desugared type.
     SplitQualType D_split = T.getSplitDesugaredType();
     if (T_split != D_split)
-      OS << ":'" << QualType::getAsString(D_split) << "'";
+      OS << ":'" << QualType::getAsString(D_split, PrintPolicy) << "'";
   }
 }
 
@@ -1187,12 +1195,12 @@ void ASTDumper::VisitFunctionDecl(const FunctionDecl *
 
   if (const CXXMethodDecl *MD = dyn_cast<CXXMethodDecl>(D)) {
     if (MD->size_overridden_methods() != 0) {
-      auto dumpOverride =
-        [=](const CXXMethodDecl *D) {
-          SplitQualType T_split = D->getType().split();
-          OS << D << " " << D->getParent()->getName() << "::"
-             << D->getNameAsString() << " '" << QualType::getAsString(T_split) << "'";
-        };
+      auto dumpOverride = [=](const CXXMethodDecl *D) {
+        SplitQualType T_split = D->getType().split();
+        OS << D << " " << D->getParent()->getName()
+           << "::" << D->getNameAsString() << " '"
+           << QualType::getAsString(T_split, PrintPolicy) << "'";
+      };
 
       dumpChild([=] {
         auto Overrides = MD->overridden_methods();
@@ -1537,7 +1545,7 @@ void ASTDumper::VisitTemplateDeclSpecialization(const 
     case TSK_ExplicitInstantiationDefinition:
       if (!DumpExplicitInst)
         break;
-      // Fall through.
+      LLVM_FALLTHROUGH;
     case TSK_Undeclared:
     case TSK_ImplicitInstantiation:
       if (DumpRefOnly)
@@ -2682,15 +2690,19 @@ LLVM_DUMP_METHOD void Type::dump(llvm::raw_ostream &OS
 LLVM_DUMP_METHOD void Decl::dump() const { dump(llvm::errs()); }
 
 LLVM_DUMP_METHOD void Decl::dump(raw_ostream &OS, bool Deserialize) const {
-  ASTDumper P(OS, &getASTContext().getCommentCommandTraits(),
-              &getASTContext().getSourceManager());
+  const ASTContext &Ctx = getASTContext();
+  const SourceManager &SM = Ctx.getSourceManager();
+  ASTDumper P(OS, &Ctx.getCommentCommandTraits(), &SM,
+              SM.getDiagnostics().getShowColors(), Ctx.getPrintingPolicy());
   P.setDeserialize(Deserialize);
   P.dumpDecl(this);
 }
 
 LLVM_DUMP_METHOD void Decl::dumpColor() const {
-  ASTDumper P(llvm::errs(), &getASTContext().getCommentCommandTraits(),
-              &getASTContext().getSourceManager(), /*ShowColors*/true);
+  const ASTContext &Ctx = getASTContext();
+  ASTDumper P(llvm::errs(), &Ctx.getCommentCommandTraits(),
+              &Ctx.getSourceManager(), /*ShowColors*/ true,
+              Ctx.getPrintingPolicy());
   P.dumpDecl(this);
 }
 
@@ -2705,7 +2717,9 @@ LLVM_DUMP_METHOD void DeclContext::dumpLookups(raw_ost
   while (!DC->isTranslationUnit())
     DC = DC->getParent();
   ASTContext &Ctx = cast<TranslationUnitDecl>(DC)->getASTContext();
-  ASTDumper P(OS, &Ctx.getCommentCommandTraits(), &Ctx.getSourceManager());
+  const SourceManager &SM = Ctx.getSourceManager();
+  ASTDumper P(OS, &Ctx.getCommentCommandTraits(), &Ctx.getSourceManager(),
+              SM.getDiagnostics().getShowColors(), Ctx.getPrintingPolicy());
   P.setDeserialize(Deserialize);
   P.dumpLookups(this, DumpDecls);
 }

Modified: vendor/clang/dist/lib/AST/ASTImporter.cpp
==============================================================================
--- vendor/clang/dist/lib/AST/ASTImporter.cpp	Sun Dec 24 01:00:16 2017	(r327123)
+++ vendor/clang/dist/lib/AST/ASTImporter.cpp	Sun Dec 24 01:00:23 2017	(r327124)
@@ -134,17 +134,12 @@ namespace clang {
     bool ImportTemplateArguments(const TemplateArgument *FromArgs,
                                  unsigned NumFromArgs,
                                SmallVectorImpl<TemplateArgument> &ToArgs);
-    template <typename InContainerTy>
-    bool ImportTemplateArgumentListInfo(const InContainerTy &Container,
-                                        TemplateArgumentListInfo &ToTAInfo);
     bool IsStructuralMatch(RecordDecl *FromRecord, RecordDecl *ToRecord,
                            bool Complain = true);
     bool IsStructuralMatch(VarDecl *FromVar, VarDecl *ToVar,
                            bool Complain = true);
     bool IsStructuralMatch(EnumDecl *FromEnum, EnumDecl *ToRecord);
     bool IsStructuralMatch(EnumConstantDecl *FromEC, EnumConstantDecl *ToEC);
-    bool IsStructuralMatch(FunctionTemplateDecl *From,
-                           FunctionTemplateDecl *To);
     bool IsStructuralMatch(ClassTemplateDecl *From, ClassTemplateDecl *To);
     bool IsStructuralMatch(VarTemplateDecl *From, VarTemplateDecl *To);
     Decl *VisitDecl(Decl *D);
@@ -200,7 +195,6 @@ namespace clang {
                                             ClassTemplateSpecializationDecl *D);
     Decl *VisitVarTemplateDecl(VarTemplateDecl *D);
     Decl *VisitVarTemplateSpecializationDecl(VarTemplateSpecializationDecl *D);
-    Decl *VisitFunctionTemplateDecl(FunctionTemplateDecl *D);
 
     // Importing statements
     DeclGroupRef ImportDeclGroup(DeclGroupRef DG);
@@ -286,7 +280,6 @@ namespace clang {
     Expr *VisitCXXDeleteExpr(CXXDeleteExpr *E);
     Expr *VisitCXXConstructExpr(CXXConstructExpr *E);
     Expr *VisitCXXMemberCallExpr(CXXMemberCallExpr *E);
-    Expr *VisitCXXDependentScopeMemberExpr(CXXDependentScopeMemberExpr *E);
     Expr *VisitExprWithCleanups(ExprWithCleanups *EWC);
     Expr *VisitCXXThisExpr(CXXThisExpr *E);
     Expr *VisitCXXBoolLiteralExpr(CXXBoolLiteralExpr *E);
@@ -1254,18 +1247,6 @@ bool ASTNodeImporter::ImportTemplateArguments(const Te
   return false;
 }
 
-template <typename InContainerTy>
-bool ASTNodeImporter::ImportTemplateArgumentListInfo(
-    const InContainerTy &Container, TemplateArgumentListInfo &ToTAInfo) {
-  for (const auto &FromLoc : Container) {
-    if (auto ToLoc = ImportTemplateArgumentLoc(FromLoc))
-      ToTAInfo.addArgument(*ToLoc);
-    else
-      return true;
-  }
-  return false;
-}
-
 bool ASTNodeImporter::IsStructuralMatch(RecordDecl *FromRecord, 
                                         RecordDecl *ToRecord, bool Complain) {
   // Eliminate a potential failure point where we attempt to re-import
@@ -1299,14 +1280,6 @@ bool ASTNodeImporter::IsStructuralMatch(EnumDecl *From
   return Ctx.IsStructurallyEquivalent(FromEnum, ToEnum);
 }
 
-bool ASTNodeImporter::IsStructuralMatch(FunctionTemplateDecl *From,
-                                        FunctionTemplateDecl *To) {
-  StructuralEquivalenceContext Ctx(
-      Importer.getFromContext(), Importer.getToContext(),
-      Importer.getNonEquivalentDecls(), false, false);
-  return Ctx.IsStructurallyEquivalent(From, To);
-}
-
 bool ASTNodeImporter::IsStructuralMatch(EnumConstantDecl *FromEC,
                                         EnumConstantDecl *ToEC)
 {
@@ -4224,64 +4197,6 @@ Decl *ASTNodeImporter::VisitVarTemplateSpecializationD
   return D2;
 }
 
-Decl *ASTNodeImporter::VisitFunctionTemplateDecl(FunctionTemplateDecl *D) {
-  DeclContext *DC, *LexicalDC;
-  DeclarationName Name;
-  SourceLocation Loc;
-  NamedDecl *ToD;
-
-  if (ImportDeclParts(D, DC, LexicalDC, Name, ToD, Loc))
-    return nullptr;
-
-  if (ToD)
-    return ToD;
-
-  // Try to find a function in our own ("to") context with the same name, same
-  // type, and in the same context as the function we're importing.
-  if (!LexicalDC->isFunctionOrMethod()) {
-    unsigned IDNS = Decl::IDNS_Ordinary;
-    SmallVector<NamedDecl *, 2> FoundDecls;
-    DC->getRedeclContext()->localUncachedLookup(Name, FoundDecls);
-    for (unsigned I = 0, N = FoundDecls.size(); I != N; ++I) {
-      if (!FoundDecls[I]->isInIdentifierNamespace(IDNS))
-        continue;
-
-      if (FunctionTemplateDecl *FoundFunction =
-              dyn_cast<FunctionTemplateDecl>(FoundDecls[I])) {
-        if (FoundFunction->hasExternalFormalLinkage() &&
-            D->hasExternalFormalLinkage()) {
-          if (IsStructuralMatch(D, FoundFunction)) {
-            Importer.Imported(D, FoundFunction);
-            // FIXME: Actually try to merge the body and other attributes.
-            return FoundFunction;
-          }
-        }
-      }
-    }
-  }
-
-  TemplateParameterList *Params =
-      ImportTemplateParameterList(D->getTemplateParameters());
-  if (!Params)
-    return nullptr;
-
-  FunctionDecl *TemplatedFD =
-      cast_or_null<FunctionDecl>(Importer.Import(D->getTemplatedDecl()));
-  if (!TemplatedFD)
-    return nullptr;
-
-  FunctionTemplateDecl *ToFunc = FunctionTemplateDecl::Create(
-      Importer.getToContext(), DC, Loc, Name, Params, TemplatedFD);
-
-  TemplatedFD->setDescribedFunctionTemplate(ToFunc);
-  ToFunc->setAccess(D->getAccess());
-  ToFunc->setLexicalDeclContext(LexicalDC);
-  Importer.Imported(D, ToFunc);
-
-  LexicalDC->addDeclInternal(ToFunc);
-  return ToFunc;
-}
-
 //----------------------------------------------------------------------------
 // Import Statements
 //----------------------------------------------------------------------------
@@ -5842,47 +5757,6 @@ Expr *ASTNodeImporter::VisitCXXPseudoDestructorExpr(

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


More information about the svn-src-all mailing list