svn commit: r320535 - in vendor/clang/dist: bindings/python/clang bindings/python/tests docs include/clang include/clang-c include/clang/AST include/clang/Basic include/clang/Driver include/clang/F...

Dimitry Andric dim at FreeBSD.org
Sat Jul 1 13:24:09 UTC 2017


Author: dim
Date: Sat Jul  1 13:24:05 2017
New Revision: 320535
URL: https://svnweb.freebsd.org/changeset/base/320535

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

Added:
  vendor/clang/dist/bindings/python/tests/test_exception_specification_kind.py   (contents, props changed)
  vendor/clang/dist/include/clang/Basic/BuiltinsNios2.def
  vendor/clang/dist/include/clang/Tooling/Refactoring/Rename/
  vendor/clang/dist/include/clang/Tooling/Refactoring/Rename/RenamingAction.h   (contents, props changed)
  vendor/clang/dist/include/clang/Tooling/Refactoring/Rename/USRFinder.h   (contents, props changed)
  vendor/clang/dist/include/clang/Tooling/Refactoring/Rename/USRFindingAction.h   (contents, props changed)
  vendor/clang/dist/include/clang/Tooling/Refactoring/Rename/USRLocFinder.h   (contents, props changed)
  vendor/clang/dist/lib/Tooling/Refactoring/Rename/
  vendor/clang/dist/lib/Tooling/Refactoring/Rename/RenamingAction.cpp   (contents, props changed)
  vendor/clang/dist/lib/Tooling/Refactoring/Rename/USRFinder.cpp   (contents, props changed)
  vendor/clang/dist/lib/Tooling/Refactoring/Rename/USRFindingAction.cpp   (contents, props changed)
  vendor/clang/dist/lib/Tooling/Refactoring/Rename/USRLocFinder.cpp   (contents, props changed)
  vendor/clang/dist/test/CodeGen/arm-execute-only.c   (contents, props changed)
  vendor/clang/dist/test/CodeGen/lto-newpm-pipeline.c   (contents, props changed)
  vendor/clang/dist/test/CodeGenCXX/dllexport-dtor-thunks.cpp   (contents, props changed)
  vendor/clang/dist/test/CodeGenCXX/msabi-blocks.cpp   (contents, props changed)
  vendor/clang/dist/test/CodeGenObjC/stret-lifetime.m
  vendor/clang/dist/test/CodeGenObjCXX/arc-indirect.mm
  vendor/clang/dist/test/Driver/nios2-cpu.c   (contents, props changed)
  vendor/clang/dist/test/Driver/unavailable_aligned_allocation.cpp   (contents, props changed)
  vendor/clang/dist/test/Index/ctor-init-source-loc.cpp   (contents, props changed)
  vendor/clang/dist/test/Modules/Inputs/F.framework/
  vendor/clang/dist/test/Modules/Inputs/F.framework/Headers/
  vendor/clang/dist/test/Modules/Inputs/F.framework/Headers/F.h   (contents, props changed)
  vendor/clang/dist/test/Modules/Inputs/F.framework/Modules/
  vendor/clang/dist/test/Modules/Inputs/F.framework/Modules/module.modulemap
  vendor/clang/dist/test/Modules/Inputs/F.framework/Modules/module.private.modulemap
  vendor/clang/dist/test/Modules/Inputs/F.framework/PrivateHeaders/
  vendor/clang/dist/test/Modules/Inputs/F.framework/PrivateHeaders/NS.h   (contents, props changed)
  vendor/clang/dist/test/Modules/Inputs/lookup-assert-protocol/
  vendor/clang/dist/test/Modules/Inputs/lookup-assert-protocol/Base.h   (contents, props changed)
  vendor/clang/dist/test/Modules/Inputs/lookup-assert-protocol/Derive.h   (contents, props changed)
  vendor/clang/dist/test/Modules/Inputs/lookup-assert-protocol/H3.h   (contents, props changed)
  vendor/clang/dist/test/Modules/Inputs/lookup-assert-protocol/module.map
  vendor/clang/dist/test/Modules/Inputs/preprocess-decluse/
  vendor/clang/dist/test/Modules/Inputs/preprocess-decluse/a.h   (contents, props changed)
  vendor/clang/dist/test/Modules/Inputs/preprocess-decluse/a.modulemap
  vendor/clang/dist/test/Modules/Inputs/preprocess-decluse/b.h   (contents, props changed)
  vendor/clang/dist/test/Modules/Inputs/preprocess-decluse/b.modulemap
  vendor/clang/dist/test/Modules/Inputs/preprocess-decluse/main.modulemap
  vendor/clang/dist/test/Modules/lookup-assert-protocol.m
  vendor/clang/dist/test/Modules/preprocess-decluse.cpp   (contents, props changed)
  vendor/clang/dist/test/Modules/redefinition-c-tagtypes.m
  vendor/clang/dist/test/Profile/Inputs/cxx-missing-bodies.proftext
  vendor/clang/dist/test/Profile/cxx-missing-bodies.cpp   (contents, props changed)
  vendor/clang/dist/test/SemaCXX/eval-crashes.cpp   (contents, props changed)
  vendor/clang/dist/test/SemaCXX/unavailable_aligned_allocation.cpp   (contents, props changed)
  vendor/clang/dist/test/clang-rename/
  vendor/clang/dist/test/clang-rename/ClassAsTemplateArgument.cpp   (contents, props changed)
  vendor/clang/dist/test/clang-rename/ClassFindByName.cpp   (contents, props changed)
  vendor/clang/dist/test/clang-rename/ClassSimpleRenaming.cpp   (contents, props changed)
  vendor/clang/dist/test/clang-rename/ClassTestMulti.cpp   (contents, props changed)
  vendor/clang/dist/test/clang-rename/ClassTestMultiByName.cpp   (contents, props changed)
  vendor/clang/dist/test/clang-rename/ComplexFunctionOverride.cpp   (contents, props changed)
  vendor/clang/dist/test/clang-rename/ComplicatedClassType.cpp   (contents, props changed)
  vendor/clang/dist/test/clang-rename/Ctor.cpp   (contents, props changed)
  vendor/clang/dist/test/clang-rename/CtorInitializer.cpp   (contents, props changed)
  vendor/clang/dist/test/clang-rename/DeclRefExpr.cpp   (contents, props changed)
  vendor/clang/dist/test/clang-rename/Field.cpp   (contents, props changed)
  vendor/clang/dist/test/clang-rename/FunctionMacro.cpp   (contents, props changed)
  vendor/clang/dist/test/clang-rename/FunctionOverride.cpp   (contents, props changed)
  vendor/clang/dist/test/clang-rename/FunctionWithClassFindByName.cpp   (contents, props changed)
  vendor/clang/dist/test/clang-rename/IncludeHeaderWithSymbol.cpp   (contents, props changed)
  vendor/clang/dist/test/clang-rename/Inputs/
  vendor/clang/dist/test/clang-rename/Inputs/HeaderWithSymbol.h   (contents, props changed)
  vendor/clang/dist/test/clang-rename/Inputs/OffsetToNewName.yaml
  vendor/clang/dist/test/clang-rename/Inputs/QualifiedNameToNewName.yaml
  vendor/clang/dist/test/clang-rename/InvalidNewName.cpp   (contents, props changed)
  vendor/clang/dist/test/clang-rename/InvalidOffset.cpp   (contents, props changed)
  vendor/clang/dist/test/clang-rename/InvalidQualifiedName.cpp   (contents, props changed)
  vendor/clang/dist/test/clang-rename/MemberExprMacro.cpp   (contents, props changed)
  vendor/clang/dist/test/clang-rename/Namespace.cpp   (contents, props changed)
  vendor/clang/dist/test/clang-rename/NoNewName.cpp   (contents, props changed)
  vendor/clang/dist/test/clang-rename/TemplateClassInstantiation.cpp   (contents, props changed)
  vendor/clang/dist/test/clang-rename/TemplateTypename.cpp   (contents, props changed)
  vendor/clang/dist/test/clang-rename/TemplatedClassFunction.cpp   (contents, props changed)
  vendor/clang/dist/test/clang-rename/UserDefinedConversion.cpp   (contents, props changed)
  vendor/clang/dist/test/clang-rename/Variable.cpp   (contents, props changed)
  vendor/clang/dist/test/clang-rename/VariableMacro.cpp   (contents, props changed)
  vendor/clang/dist/test/clang-rename/YAMLInput.cpp   (contents, props changed)
  vendor/clang/dist/tools/clang-rename/
  vendor/clang/dist/tools/clang-rename/CMakeLists.txt   (contents, props changed)
  vendor/clang/dist/tools/clang-rename/ClangRename.cpp   (contents, props changed)
  vendor/clang/dist/tools/clang-rename/clang-rename.el
  vendor/clang/dist/tools/clang-rename/clang-rename.py   (contents, props changed)
  vendor/clang/dist/unittests/Rename/
  vendor/clang/dist/unittests/Rename/CMakeLists.txt   (contents, props changed)
  vendor/clang/dist/unittests/Rename/ClangRenameTest.h   (contents, props changed)
  vendor/clang/dist/unittests/Rename/RenameClassTest.cpp   (contents, props changed)
  vendor/clang/dist/unittests/Tooling/CastExprTest.cpp   (contents, props changed)
Modified:
  vendor/clang/dist/bindings/python/clang/cindex.py
  vendor/clang/dist/docs/UsersManual.rst
  vendor/clang/dist/include/clang-c/Index.h
  vendor/clang/dist/include/clang/AST/ASTContext.h
  vendor/clang/dist/include/clang/AST/ASTStructuralEquivalence.h
  vendor/clang/dist/include/clang/AST/Decl.h
  vendor/clang/dist/include/clang/AST/NSAPI.h
  vendor/clang/dist/include/clang/AST/OpenMPClause.h
  vendor/clang/dist/include/clang/AST/RecursiveASTVisitor.h
  vendor/clang/dist/include/clang/AST/Redeclarable.h
  vendor/clang/dist/include/clang/Basic/AttrDocs.td
  vendor/clang/dist/include/clang/Basic/BuiltinsWebAssembly.def
  vendor/clang/dist/include/clang/Basic/DiagnosticASTKinds.td
  vendor/clang/dist/include/clang/Basic/DiagnosticDriverKinds.td
  vendor/clang/dist/include/clang/Basic/DiagnosticGroups.td
  vendor/clang/dist/include/clang/Basic/DiagnosticSemaKinds.td
  vendor/clang/dist/include/clang/Basic/LangOptions.def
  vendor/clang/dist/include/clang/Basic/OpenMPKinds.def
  vendor/clang/dist/include/clang/Basic/SourceLocation.h
  vendor/clang/dist/include/clang/Basic/SourceManager.h
  vendor/clang/dist/include/clang/Basic/TargetBuiltins.h
  vendor/clang/dist/include/clang/Basic/TargetOptions.h
  vendor/clang/dist/include/clang/Basic/Visibility.h
  vendor/clang/dist/include/clang/Driver/CC1Options.td
  vendor/clang/dist/include/clang/Driver/Compilation.h
  vendor/clang/dist/include/clang/Driver/Driver.h
  vendor/clang/dist/include/clang/Driver/Options.td
  vendor/clang/dist/include/clang/Format/Format.h
  vendor/clang/dist/include/clang/Frontend/ASTUnit.h
  vendor/clang/dist/include/clang/Frontend/CodeGenOptions.def
  vendor/clang/dist/include/clang/Frontend/DiagnosticRenderer.h
  vendor/clang/dist/include/clang/Frontend/TextDiagnostic.h
  vendor/clang/dist/include/clang/Frontend/Utils.h
  vendor/clang/dist/include/clang/Lex/HeaderSearch.h
  vendor/clang/dist/include/clang/Lex/PTHLexer.h
  vendor/clang/dist/include/clang/Sema/Lookup.h
  vendor/clang/dist/include/clang/Sema/Sema.h
  vendor/clang/dist/include/clang/Serialization/ASTReader.h
  vendor/clang/dist/include/clang/StaticAnalyzer/Checkers/Checkers.td
  vendor/clang/dist/include/clang/module.modulemap
  vendor/clang/dist/lib/AST/ASTContext.cpp
  vendor/clang/dist/lib/AST/ASTStructuralEquivalence.cpp
  vendor/clang/dist/lib/AST/Decl.cpp
  vendor/clang/dist/lib/AST/DeclCXX.cpp
  vendor/clang/dist/lib/AST/Expr.cpp
  vendor/clang/dist/lib/AST/ExprConstant.cpp
  vendor/clang/dist/lib/AST/MicrosoftMangle.cpp
  vendor/clang/dist/lib/AST/ODRHash.cpp
  vendor/clang/dist/lib/AST/RecordLayoutBuilder.cpp
  vendor/clang/dist/lib/AST/StmtProfile.cpp
  vendor/clang/dist/lib/Basic/SourceLocation.cpp
  vendor/clang/dist/lib/Basic/SourceManager.cpp
  vendor/clang/dist/lib/Basic/Targets.cpp
  vendor/clang/dist/lib/CodeGen/BackendUtil.cpp
  vendor/clang/dist/lib/CodeGen/CGBuiltin.cpp
  vendor/clang/dist/lib/CodeGen/CGCall.cpp
  vendor/clang/dist/lib/CodeGen/CGDecl.cpp
  vendor/clang/dist/lib/CodeGen/CGObjCMac.cpp
  vendor/clang/dist/lib/CodeGen/CGObjCRuntime.cpp
  vendor/clang/dist/lib/CodeGen/CGOpenMPRuntime.cpp
  vendor/clang/dist/lib/CodeGen/CGStmtOpenMP.cpp
  vendor/clang/dist/lib/CodeGen/CodeGenAction.cpp
  vendor/clang/dist/lib/CodeGen/CodeGenPGO.cpp
  vendor/clang/dist/lib/Driver/Compilation.cpp
  vendor/clang/dist/lib/Driver/Driver.cpp
  vendor/clang/dist/lib/Driver/SanitizerArgs.cpp
  vendor/clang/dist/lib/Driver/ToolChains/Arch/ARM.cpp
  vendor/clang/dist/lib/Driver/ToolChains/Clang.cpp
  vendor/clang/dist/lib/Driver/ToolChains/CommonArgs.cpp
  vendor/clang/dist/lib/Driver/ToolChains/CrossWindows.cpp
  vendor/clang/dist/lib/Driver/ToolChains/Darwin.cpp
  vendor/clang/dist/lib/Driver/ToolChains/Darwin.h
  vendor/clang/dist/lib/Driver/ToolChains/MipsLinux.cpp
  vendor/clang/dist/lib/Format/ContinuationIndenter.cpp
  vendor/clang/dist/lib/Format/Format.cpp
  vendor/clang/dist/lib/Format/FormatToken.h
  vendor/clang/dist/lib/Format/NamespaceEndCommentsFixer.cpp
  vendor/clang/dist/lib/Format/TokenAnnotator.cpp
  vendor/clang/dist/lib/Format/UnwrappedLineFormatter.cpp
  vendor/clang/dist/lib/Format/UnwrappedLineParser.cpp
  vendor/clang/dist/lib/Format/UnwrappedLineParser.h
  vendor/clang/dist/lib/Frontend/ASTMerge.cpp
  vendor/clang/dist/lib/Frontend/ASTUnit.cpp
  vendor/clang/dist/lib/Frontend/ChainedIncludesSource.cpp
  vendor/clang/dist/lib/Frontend/CompilerInstance.cpp
  vendor/clang/dist/lib/Frontend/CompilerInvocation.cpp
  vendor/clang/dist/lib/Frontend/CreateInvocationFromCommandLine.cpp
  vendor/clang/dist/lib/Frontend/DependencyFile.cpp
  vendor/clang/dist/lib/Frontend/DiagnosticRenderer.cpp
  vendor/clang/dist/lib/Frontend/FrontendAction.cpp
  vendor/clang/dist/lib/Frontend/FrontendActions.cpp
  vendor/clang/dist/lib/Frontend/InitPreprocessor.cpp
  vendor/clang/dist/lib/Frontend/ModuleDependencyCollector.cpp
  vendor/clang/dist/lib/Frontend/SerializedDiagnosticPrinter.cpp
  vendor/clang/dist/lib/Frontend/TextDiagnostic.cpp
  vendor/clang/dist/lib/Frontend/TextDiagnosticPrinter.cpp
  vendor/clang/dist/lib/Lex/ModuleMap.cpp
  vendor/clang/dist/lib/Lex/PPMacroExpansion.cpp
  vendor/clang/dist/lib/Parse/ParseDecl.cpp
  vendor/clang/dist/lib/Parse/ParseDeclCXX.cpp
  vendor/clang/dist/lib/Sema/AnalysisBasedWarnings.cpp
  vendor/clang/dist/lib/Sema/Sema.cpp
  vendor/clang/dist/lib/Sema/SemaChecking.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/SemaExprCXX.cpp
  vendor/clang/dist/lib/Sema/SemaOpenMP.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/ASTReaderStmt.cpp
  vendor/clang/dist/lib/Serialization/ASTWriter.cpp
  vendor/clang/dist/lib/StaticAnalyzer/Checkers/UnixAPIChecker.cpp
  vendor/clang/dist/lib/Tooling/CompilationDatabase.cpp
  vendor/clang/dist/lib/Tooling/Refactoring/AtomicChange.cpp
  vendor/clang/dist/lib/Tooling/Refactoring/CMakeLists.txt
  vendor/clang/dist/test/Analysis/malloc-overflow2.c
  vendor/clang/dist/test/Analysis/unix-fns.c
  vendor/clang/dist/test/CMakeLists.txt
  vendor/clang/dist/test/CodeGen/arm-v8.1a-neon-intrinsics.c
  vendor/clang/dist/test/CodeGen/avx512f-builtins.c
  vendor/clang/dist/test/CodeGen/builtins-wasm.c
  vendor/clang/dist/test/CodeGen/mangle-ms.c
  vendor/clang/dist/test/CodeGen/mangle.c
  vendor/clang/dist/test/CodeGen/named_reg_global.c
  vendor/clang/dist/test/CodeGen/neon-immediate-ubsan.c
  vendor/clang/dist/test/CodeGen/pgo-sample-thinlto-summary.c
  vendor/clang/dist/test/CodeGen/xray-attributes-supported.cpp
  vendor/clang/dist/test/CodeGenCXX/mangle-ms.cpp
  vendor/clang/dist/test/CodeGenObjC/ivar-type-encoding.m
  vendor/clang/dist/test/CodeGenObjC/parameterized_classes.m
  vendor/clang/dist/test/CodeGenObjC/protocol-comdat.m
  vendor/clang/dist/test/CodeGenObjC/stret-1.m
  vendor/clang/dist/test/CodeGenOpenCL/addr-space-struct-arg.cl
  vendor/clang/dist/test/Driver/arm-execute-only.c
  vendor/clang/dist/test/Driver/clang_f_opts.c
  vendor/clang/dist/test/Driver/darwin-version.c
  vendor/clang/dist/test/Driver/fuzzer.c
  vendor/clang/dist/test/Driver/openmp-offload.c
  vendor/clang/dist/test/Driver/windows-cross.c
  vendor/clang/dist/test/FixIt/fixit-format-darwin.m
  vendor/clang/dist/test/FixIt/format-darwin.m
  vendor/clang/dist/test/Frontend/Inputs/optimization-remark-with-hotness-sample.proftext
  vendor/clang/dist/test/Frontend/optimization-remark-with-hotness.c
  vendor/clang/dist/test/Index/get-cursor.cpp
  vendor/clang/dist/test/Index/linkage.c
  vendor/clang/dist/test/Modules/diag-flags.cpp
  vendor/clang/dist/test/Modules/elaborated-type-specifier-from-hidden-module.m
  vendor/clang/dist/test/Modules/odr_hash.cpp
  vendor/clang/dist/test/Modules/redefinition-same-header.m
  vendor/clang/dist/test/OpenMP/parallel_codegen.cpp
  vendor/clang/dist/test/OpenMP/target_codegen.cpp
  vendor/clang/dist/test/OpenMP/target_codegen_global_capture.cpp
  vendor/clang/dist/test/OpenMP/target_data_codegen.cpp
  vendor/clang/dist/test/OpenMP/target_data_use_device_ptr_codegen.cpp
  vendor/clang/dist/test/OpenMP/target_enter_data_codegen.cpp
  vendor/clang/dist/test/OpenMP/target_exit_data_codegen.cpp
  vendor/clang/dist/test/OpenMP/target_firstprivate_codegen.cpp
  vendor/clang/dist/test/OpenMP/target_is_device_ptr_codegen.cpp
  vendor/clang/dist/test/OpenMP/target_map_codegen.cpp
  vendor/clang/dist/test/OpenMP/target_parallel_codegen.cpp
  vendor/clang/dist/test/OpenMP/target_teams_codegen.cpp
  vendor/clang/dist/test/OpenMP/target_update_codegen.cpp
  vendor/clang/dist/test/OpenMP/taskloop_ast_print.cpp
  vendor/clang/dist/test/OpenMP/taskloop_simd_ast_print.cpp
  vendor/clang/dist/test/PCH/attrs.c
  vendor/clang/dist/test/Preprocessor/aarch64-target-features.c
  vendor/clang/dist/test/Preprocessor/arm-target-features.c
  vendor/clang/dist/test/Preprocessor/predefined-arch-macros.c
  vendor/clang/dist/test/Preprocessor/predefined-macros.c
  vendor/clang/dist/test/Profile/cxx-structors.cpp
  vendor/clang/dist/test/Sema/diagnose_if.c
  vendor/clang/dist/test/Sema/integer-overflow.c
  vendor/clang/dist/test/Sema/overloadable.c
  vendor/clang/dist/test/SemaCXX/constant-expression-cxx11.cpp
  vendor/clang/dist/test/SemaCXX/type-traits.cpp
  vendor/clang/dist/test/SemaCXX/warn-throw-out-noexcept-func.cpp
  vendor/clang/dist/test/SemaOpenCL/extension-begin.cl
  vendor/clang/dist/test/SemaTemplate/destructor-template.cpp
  vendor/clang/dist/tools/CMakeLists.txt
  vendor/clang/dist/tools/c-index-test/c-index-test.c
  vendor/clang/dist/tools/c-index-test/core_main.cpp
  vendor/clang/dist/tools/driver/driver.cpp
  vendor/clang/dist/tools/libclang/CIndex.cpp
  vendor/clang/dist/tools/libclang/CIndexDiagnostic.cpp
  vendor/clang/dist/tools/libclang/CXType.cpp
  vendor/clang/dist/tools/libclang/libclang.exports
  vendor/clang/dist/unittests/CMakeLists.txt
  vendor/clang/dist/unittests/Driver/ToolChainTest.cpp
  vendor/clang/dist/unittests/Format/FormatTest.cpp
  vendor/clang/dist/unittests/Format/FormatTestJava.cpp
  vendor/clang/dist/unittests/Format/FormatTestProto.cpp
  vendor/clang/dist/unittests/Format/SortIncludesTest.cpp
  vendor/clang/dist/unittests/Tooling/CMakeLists.txt
  vendor/clang/dist/unittests/Tooling/CompilationDatabaseTest.cpp
  vendor/clang/dist/unittests/Tooling/RecursiveASTVisitorTest.cpp
  vendor/clang/dist/unittests/Tooling/RefactoringTest.cpp
  vendor/clang/dist/unittests/Tooling/TestVisitor.h
  vendor/clang/dist/utils/bash-autocomplete.sh

Modified: vendor/clang/dist/bindings/python/clang/cindex.py
==============================================================================
--- vendor/clang/dist/bindings/python/clang/cindex.py	Sat Jul  1 13:22:10 2017	(r320534)
+++ vendor/clang/dist/bindings/python/clang/cindex.py	Sat Jul  1 13:24:05 2017	(r320535)
@@ -1367,6 +1367,30 @@ TemplateArgumentKind.DECLARATION = TemplateArgumentKin
 TemplateArgumentKind.NULLPTR = TemplateArgumentKind(3)
 TemplateArgumentKind.INTEGRAL = TemplateArgumentKind(4)
 
+### Exception Specification Kinds ###
+class ExceptionSpecificationKind(BaseEnumeration):
+    """
+    An ExceptionSpecificationKind describes the kind of exception specification
+    that a function has.
+    """
+
+    # The required BaseEnumeration declarations.
+    _kinds = []
+    _name_map = None
+
+    def __repr__(self):
+        return 'ExceptionSpecificationKind.{}'.format(self.name)
+
+ExceptionSpecificationKind.NONE = ExceptionSpecificationKind(0)
+ExceptionSpecificationKind.DYNAMIC_NONE = ExceptionSpecificationKind(1)
+ExceptionSpecificationKind.DYNAMIC = ExceptionSpecificationKind(2)
+ExceptionSpecificationKind.MS_ANY = ExceptionSpecificationKind(3)
+ExceptionSpecificationKind.BASIC_NOEXCEPT = ExceptionSpecificationKind(4)
+ExceptionSpecificationKind.COMPUTED_NOEXCEPT = ExceptionSpecificationKind(5)
+ExceptionSpecificationKind.UNEVALUATED = ExceptionSpecificationKind(6)
+ExceptionSpecificationKind.UNINSTANTIATED = ExceptionSpecificationKind(7)
+ExceptionSpecificationKind.UNPARSED = ExceptionSpecificationKind(8)
+
 ### Cursors ###
 
 class Cursor(Structure):
@@ -1587,6 +1611,18 @@ class Cursor(Structure):
         return self._result_type
 
     @property
+    def exception_specification_kind(self):
+        '''
+        Retrieve the exception specification kind, which is one of the values
+        from the ExceptionSpecificationKind enumeration.
+        '''
+        if not hasattr(self, '_exception_specification_kind'):
+            exc_kind = conf.lib.clang_getCursorExceptionSpecificationType(self)
+            self._exception_specification_kind = ExceptionSpecificationKind.from_id(exc_kind)
+
+        return self._exception_specification_kind
+
+    @property
     def underlying_typedef_type(self):
         """Return the underlying type of a typedef declaration.
 
@@ -2253,6 +2289,14 @@ class Type(Structure):
         conf.lib.clang_Type_visitFields(self,
                             callbacks['fields_visit'](visitor), fields)
         return iter(fields)
+
+    def get_exception_specification_kind(self):
+        """
+        Return the kind of the exception specification; a value from
+        the ExceptionSpecificationKind enumeration.
+        """
+        return ExceptionSpecificationKind.from_id(
+                conf.lib.clang.getExceptionSpecificationType(self))
 
     @property
     def spelling(self):

Added: vendor/clang/dist/bindings/python/tests/test_exception_specification_kind.py
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ vendor/clang/dist/bindings/python/tests/test_exception_specification_kind.py	Sat Jul  1 13:24:05 2017	(r320535)
@@ -0,0 +1,27 @@
+import clang.cindex
+from clang.cindex import ExceptionSpecificationKind
+from .util import get_tu
+
+
+def find_function_declarations(node, declarations=[]):
+    if node.kind == clang.cindex.CursorKind.FUNCTION_DECL:
+        declarations.append((node.spelling, node.exception_specification_kind))
+    for child in node.get_children():
+        declarations = find_function_declarations(child, declarations)
+    return declarations
+
+
+def test_exception_specification_kind():
+    source = """int square1(int x);
+                int square2(int x) noexcept;
+                int square3(int x) noexcept(noexcept(x * x));"""
+
+    tu = get_tu(source, lang='cpp', flags=['-std=c++14'])
+
+    declarations = find_function_declarations(tu.cursor)
+    expected = [
+        ('square1', ExceptionSpecificationKind.NONE),
+        ('square2', ExceptionSpecificationKind.BASIC_NOEXCEPT),
+        ('square3', ExceptionSpecificationKind.COMPUTED_NOEXCEPT)
+    ]
+    assert declarations == expected

Modified: vendor/clang/dist/docs/UsersManual.rst
==============================================================================
--- vendor/clang/dist/docs/UsersManual.rst	Sat Jul  1 13:22:10 2017	(r320534)
+++ vendor/clang/dist/docs/UsersManual.rst	Sat Jul  1 13:24:05 2017	(r320535)
@@ -322,18 +322,27 @@ output format of the diagnostics that it generates.
    by category, so it should be a high level category. We want dozens
    of these, not hundreds or thousands of them.
 
+.. _opt_fsave-optimization-record:
+
+**-fsave-optimization-record**
+   Write optimization remarks to a YAML file.
+
+   This option, which defaults to off, controls whether Clang writes
+   optimization reports to a YAML file. By recording diagnostics in a file,
+   using a structured YAML format, users can parse or sort the remarks in a
+   convenient way.
+
 .. _opt_fdiagnostics-show-hotness:
 
 **-f[no-]diagnostics-show-hotness**
    Enable profile hotness information in diagnostic line.
 
-   This option, which defaults to off, controls whether Clang prints the
-   profile hotness associated with a diagnostics in the presence of
-   profile-guided optimization information.  This is currently supported with
-   optimization remarks (see :ref:`Options to Emit Optimization Reports
-   <rpass>`).  The hotness information allows users to focus on the hot
-   optimization remarks that are likely to be more relevant for run-time
-   performance.
+   This option controls whether Clang prints the profile hotness associated
+   with diagnostics in the presence of profile-guided optimization information.
+   This is currently supported with optimization remarks (see
+   :ref:`Options to Emit Optimization Reports <rpass>`). The hotness information
+   allows users to focus on the hot optimization remarks that are likely to be
+   more relevant for run-time performance.
 
    For example, in this output, the block containing the callsite of `foo` was
    executed 3000 times according to the profile data:
@@ -343,6 +352,23 @@ output format of the diagnostics that it generates.
          s.c:7:10: remark: foo inlined into bar (hotness: 3000) [-Rpass-analysis=inline]
            sum += foo(x, x - 2);
                   ^
+
+   This option is implied when
+   :ref:`-fsave-optimization-record <opt_fsave-optimization-record>` is used.
+   Otherwise, it defaults to off.
+
+.. _opt_fdiagnostics-hotness-threshold:
+
+**-fdiagnostics-hotness-threshold**
+   Prevent optimization remarks from being output if they do not have at least
+   this hotness value.
+
+   This option, which defaults to zero, controls the minimum hotness an
+   optimization remark would need in order to be output by Clang. This is
+   currently supported with optimization remarks (see :ref:`Options to Emit
+   Optimization Reports <rpass>`) when profile hotness information in
+   diagnostics is enabled (see
+   :ref:`-fdiagnostics-show-hotness <opt_fdiagnostics-show-hotness>`).
 
 .. _opt_fdiagnostics-fixit-info:
 

Modified: vendor/clang/dist/include/clang-c/Index.h
==============================================================================
--- vendor/clang/dist/include/clang-c/Index.h	Sat Jul  1 13:22:10 2017	(r320534)
+++ vendor/clang/dist/include/clang-c/Index.h	Sat Jul  1 13:24:05 2017	(r320535)
@@ -171,8 +171,61 @@ typedef struct CXVersion {
    */
   int Subminor;
 } CXVersion;
-  
+
 /**
+ * \brief Describes the exception specification of a cursor.
+ *
+ * A negative value indicates that the cursor is not a function declaration.
+ */
+enum CXCursor_ExceptionSpecificationKind {
+
+  /**
+   * \brief The cursor has no exception specification.
+   */
+  CXCursor_ExceptionSpecificationKind_None,
+
+  /**
+   * \brief The cursor has exception specification throw()
+   */
+  CXCursor_ExceptionSpecificationKind_DynamicNone,
+
+  /**
+   * \brief The cursor has exception specification throw(T1, T2)
+   */
+  CXCursor_ExceptionSpecificationKind_Dynamic,
+
+  /**
+   * \brief The cursor has exception specification throw(...).
+   */
+  CXCursor_ExceptionSpecificationKind_MSAny,
+
+  /**
+   * \brief The cursor has exception specification basic noexcept.
+   */
+  CXCursor_ExceptionSpecificationKind_BasicNoexcept,
+
+  /**
+   * \brief The cursor has exception specification computed noexcept.
+   */
+  CXCursor_ExceptionSpecificationKind_ComputedNoexcept,
+
+  /**
+   * \brief The exception specification has not yet been evaluated.
+   */
+  CXCursor_ExceptionSpecificationKind_Unevaluated,
+
+  /**
+   * \brief The exception specification has not yet been instantiated.
+   */
+  CXCursor_ExceptionSpecificationKind_Uninstantiated,
+
+  /**
+   * \brief The exception specification has not been parsed yet.
+   */
+  CXCursor_ExceptionSpecificationKind_Unparsed
+};
+
+/**
  * \brief Provides a shared context for creating translation units.
  *
  * It provides two options:
@@ -3471,6 +3524,13 @@ CINDEX_LINKAGE enum CXCallingConv clang_getFunctionTyp
 CINDEX_LINKAGE CXType clang_getResultType(CXType T);
 
 /**
+ * \brief Retrieve the exception specification type associated with a function type.
+ *
+ * If a non-function type is passed in, an error code of -1 is returned.
+ */
+CINDEX_LINKAGE int clang_getExceptionSpecificationType(CXType T);
+
+/**
  * \brief Retrieve the number of non-variadic parameters associated with a
  * function type.
  *
@@ -3497,6 +3557,13 @@ CINDEX_LINKAGE unsigned clang_isFunctionTypeVariadic(C
  * This only returns a valid type if the cursor refers to a function or method.
  */
 CINDEX_LINKAGE CXType clang_getCursorResultType(CXCursor C);
+
+/**
+ * \brief Retrieve the exception specification type associated with a given cursor.
+ *
+ * This only returns a valid result if the cursor refers to a function or method.
+ */
+CINDEX_LINKAGE int clang_getCursorExceptionSpecificationType(CXCursor C);
 
 /**
  * \brief Return 1 if the CXType is a POD (plain old data) type, and 0

Modified: vendor/clang/dist/include/clang/AST/ASTContext.h
==============================================================================
--- vendor/clang/dist/include/clang/AST/ASTContext.h	Sat Jul  1 13:22:10 2017	(r320534)
+++ vendor/clang/dist/include/clang/AST/ASTContext.h	Sat Jul  1 13:24:05 2017	(r320535)
@@ -2050,6 +2050,11 @@ class ASTContext : public RefCountedBase<ASTContext> {
   /// Get the offset of a FieldDecl or IndirectFieldDecl, in bits.
   uint64_t getFieldOffset(const ValueDecl *FD) const;
 
+  /// Get the offset of an ObjCIvarDecl in bits.
+  uint64_t lookupFieldBitOffset(const ObjCInterfaceDecl *OID,
+                                const ObjCImplementationDecl *ID,
+                                const ObjCIvarDecl *Ivar) const;
+
   bool isNearlyEmpty(const CXXRecordDecl *RD) const;
 
   VTableContextBase *getVTableContext();

Modified: vendor/clang/dist/include/clang/AST/ASTStructuralEquivalence.h
==============================================================================
--- vendor/clang/dist/include/clang/AST/ASTStructuralEquivalence.h	Sat Jul  1 13:22:10 2017	(r320534)
+++ vendor/clang/dist/include/clang/AST/ASTStructuralEquivalence.h	Sat Jul  1 13:24:05 2017	(r320535)
@@ -62,9 +62,11 @@ struct StructuralEquivalenceContext {
   StructuralEquivalenceContext(
       ASTContext &FromCtx, ASTContext &ToCtx,
       llvm::DenseSet<std::pair<Decl *, Decl *>> &NonEquivalentDecls,
-      bool StrictTypeSpelling = false, bool Complain = true)
+      bool StrictTypeSpelling = false, bool Complain = true,
+      bool ErrorOnTagTypeMismatch = false)
       : FromCtx(FromCtx), ToCtx(ToCtx), NonEquivalentDecls(NonEquivalentDecls),
-        StrictTypeSpelling(StrictTypeSpelling), Complain(Complain),
+        StrictTypeSpelling(StrictTypeSpelling),
+        ErrorOnTagTypeMismatch(ErrorOnTagTypeMismatch), Complain(Complain),
         LastDiagFromC2(false) {}
 
   DiagnosticBuilder Diag1(SourceLocation Loc, unsigned DiagID);

Modified: vendor/clang/dist/include/clang/AST/Decl.h
==============================================================================
--- vendor/clang/dist/include/clang/AST/Decl.h	Sat Jul  1 13:22:10 2017	(r320534)
+++ vendor/clang/dist/include/clang/AST/Decl.h	Sat Jul  1 13:24:05 2017	(r320535)
@@ -2019,7 +2019,10 @@ class FunctionDecl : public DeclaratorDecl, public Dec
   /// These functions have special behavior under C++1y [expr.new]:
   ///    An implementation is allowed to omit a call to a replaceable global
   ///    allocation function. [...]
-  bool isReplaceableGlobalAllocationFunction() const;
+  ///
+  /// If this function is an aligned allocation/deallocation function, return
+  /// true through IsAligned.
+  bool isReplaceableGlobalAllocationFunction(bool *IsAligned = nullptr) const;
 
   /// Compute the language linkage.
   LanguageLinkage getLanguageLinkage() const;

Modified: vendor/clang/dist/include/clang/AST/NSAPI.h
==============================================================================
--- vendor/clang/dist/include/clang/AST/NSAPI.h	Sat Jul  1 13:22:10 2017	(r320534)
+++ vendor/clang/dist/include/clang/AST/NSAPI.h	Sat Jul  1 13:24:05 2017	(r320535)
@@ -49,7 +49,7 @@ class NSAPI { (public)
     NSStr_initWithString,
     NSStr_initWithUTF8String
   };
-  static const unsigned NumNSStringMethods = 5;
+  static const unsigned NumNSStringMethods = 6;
 
   IdentifierInfo *getNSClassId(NSClassIdKindKind K) const;
 
@@ -112,7 +112,7 @@ class NSAPI { (public)
     NSMutableDict_setObjectForKeyedSubscript,
     NSMutableDict_setValueForKey
   };
-  static const unsigned NumNSDictionaryMethods = 14;
+  static const unsigned NumNSDictionaryMethods = 13;
   
   /// \brief The Objective-C NSDictionary selectors.
   Selector getNSDictionarySelector(NSDictionaryMethodKind MK) const;

Modified: vendor/clang/dist/include/clang/AST/OpenMPClause.h
==============================================================================
--- vendor/clang/dist/include/clang/AST/OpenMPClause.h	Sat Jul  1 13:22:10 2017	(r320534)
+++ vendor/clang/dist/include/clang/AST/OpenMPClause.h	Sat Jul  1 13:24:05 2017	(r320535)
@@ -20,6 +20,7 @@
 #include "clang/AST/Stmt.h"
 #include "clang/Basic/OpenMPKinds.h"
 #include "clang/Basic/SourceLocation.h"
+#include "llvm/ADT/MapVector.h"
 
 namespace clang {
 
@@ -3001,7 +3002,7 @@ class OMPMappableExprListClause : public OMPVarListCla
     // Organize the components by declaration and retrieve the original
     // expression. Original expressions are always the first component of the
     // mappable component list.
-    llvm::DenseMap<ValueDecl *, SmallVector<MappableExprComponentListRef, 8>>
+    llvm::MapVector<ValueDecl *, SmallVector<MappableExprComponentListRef, 8>>
         ComponentListMap;
     {
       auto CI = ComponentLists.begin();

Modified: vendor/clang/dist/include/clang/AST/RecursiveASTVisitor.h
==============================================================================
--- vendor/clang/dist/include/clang/AST/RecursiveASTVisitor.h	Sat Jul  1 13:22:10 2017	(r320534)
+++ vendor/clang/dist/include/clang/AST/RecursiveASTVisitor.h	Sat Jul  1 13:24:05 2017	(r320535)
@@ -593,6 +593,16 @@ bool RecursiveASTVisitor<Derived>::PostVisitStmt(Stmt 
 #define STMT(CLASS, PARENT)                                                    \
   case Stmt::CLASS##Class:                                                     \
     TRY_TO(WalkUpFrom##CLASS(static_cast<CLASS *>(S))); break;
+#define INITLISTEXPR(CLASS, PARENT)                                            \
+  case Stmt::CLASS##Class:                                                     \
+    {                                                                          \
+      auto ILE = static_cast<CLASS *>(S);                                      \
+      if (auto Syn = ILE->isSemanticForm() ? ILE->getSyntacticForm() : ILE)    \
+        TRY_TO(WalkUpFrom##CLASS(Syn));                                        \
+      if (auto Sem = ILE->isSemanticForm() ? ILE : ILE->getSemanticForm())     \
+        TRY_TO(WalkUpFrom##CLASS(Sem));                                        \
+      break;                                                                   \
+    }
 #include "clang/AST/StmtNodes.inc"
   }
 
@@ -2220,13 +2230,15 @@ bool RecursiveASTVisitor<Derived>::TraverseSynOrSemIni
 // the syntactic and the semantic form.
 //
 // There is no guarantee about which form \p S takes when this method is called.
-DEF_TRAVERSE_STMT(InitListExpr, {
+template <typename Derived>
+bool RecursiveASTVisitor<Derived>::TraverseInitListExpr(
+    InitListExpr *S, DataRecursionQueue *Queue) {
   TRY_TO(TraverseSynOrSemInitListExpr(
       S->isSemanticForm() ? S->getSyntacticForm() : S, Queue));
   TRY_TO(TraverseSynOrSemInitListExpr(
       S->isSemanticForm() ? S : S->getSemanticForm(), Queue));
-  ShouldVisitChildren = false;
-})
+  return true;
+}
 
 // GenericSelectionExpr is a special case because the types and expressions
 // are interleaved.  We also need to watch out for null types (default

Modified: vendor/clang/dist/include/clang/AST/Redeclarable.h
==============================================================================
--- vendor/clang/dist/include/clang/AST/Redeclarable.h	Sat Jul  1 13:22:10 2017	(r320534)
+++ vendor/clang/dist/include/clang/AST/Redeclarable.h	Sat Jul  1 13:24:05 2017	(r320535)
@@ -21,6 +21,60 @@
 namespace clang {
 class ASTContext;
 
+// Some notes on redeclarables:
+//
+//  - Every redeclarable is on a circular linked list.
+//
+//  - Every decl has a pointer to the first element of the chain _and_ a
+//    DeclLink that may point to one of 3 possible states:
+//      - the "previous" (temporal) element in the chain
+//      - the "latest" (temporal) element in the chain
+//      - the an "uninitialized-latest" value (when newly-constructed)
+//
+//  - The first element is also often called the canonical element. Every
+//    element has a pointer to it so that "getCanonical" can be fast.
+//
+//  - Most links in the chain point to previous, except the link out of
+//    the first; it points to latest.
+//
+//  - Elements are called "first", "previous", "latest" or
+//    "most-recent" when referring to temporal order: order of addition
+//    to the chain.
+//
+//  - To make matters confusing, the DeclLink type uses the term "next"
+//    for its pointer-storage internally (thus functions like
+//    NextIsPrevious). It's easiest to just ignore the implementation of
+//    DeclLink when making sense of the redeclaration chain.
+//
+//  - There's also a "definition" link for several types of
+//    redeclarable, where only one definition should exist at any given
+//    time (and the defn pointer is stored in the decl's "data" which
+//    is copied to every element on the chain when it's changed).
+//
+//    Here is some ASCII art:
+//
+//      "first"                                     "latest"
+//      "canonical"                                 "most recent"
+//      +------------+         first                +--------------+
+//      |            | <--------------------------- |              |
+//      |            |                              |              |
+//      |            |                              |              |
+//      |            |       +--------------+       |              |
+//      |            | first |              |       |              |
+//      |            | <---- |              |       |              |
+//      |            |       |              |       |              |
+//      | @class A   |  link | @interface A |  link | @class A     |
+//      | seen first | <---- | seen second  | <---- | seen third   |
+//      |            |       |              |       |              |
+//      +------------+       +--------------+       +--------------+
+//      | data       | defn  | data         |  defn | data         |
+//      |            | ----> |              | <---- |              |
+//      +------------+       +--------------+       +--------------+
+//        |                     |     ^                  ^
+//        |                     |defn |                  |
+//        | link                +-----+                  |
+//        +-->-------------------------------------------+
+
 /// \brief Provides common interface for the Decls that can be redeclared.
 template<typename decl_type>
 class Redeclarable {

Modified: vendor/clang/dist/include/clang/Basic/AttrDocs.td
==============================================================================
--- vendor/clang/dist/include/clang/Basic/AttrDocs.td	Sat Jul  1 13:22:10 2017	(r320534)
+++ vendor/clang/dist/include/clang/Basic/AttrDocs.td	Sat Jul  1 13:24:05 2017	(r320535)
@@ -605,20 +605,27 @@ semantics:
   for ``T`` and ``U`` to be incompatible.
 
 The declaration of ``overloadable`` functions is restricted to function
-declarations and definitions.  Most importantly, if any function with a given
-name is given the ``overloadable`` attribute, then all function declarations
-and definitions with that name (and in that scope) must have the
-``overloadable`` attribute.  This rule even applies to redeclarations of
-functions whose original declaration had the ``overloadable`` attribute, e.g.,
+declarations and definitions.  If a function is marked with the ``overloadable``
+attribute, then all declarations and definitions of functions with that name,
+except for at most one (see the note below about unmarked overloads), must have
+the ``overloadable`` attribute.  In addition, redeclarations of a function with
+the ``overloadable`` attribute must have the ``overloadable`` attribute, and
+redeclarations of a function without the ``overloadable`` attribute must *not*
+have the ``overloadable`` attribute. e.g.,
 
 .. code-block:: c
 
   int f(int) __attribute__((overloadable));
   float f(float); // error: declaration of "f" must have the "overloadable" attribute
+  int f(int); // error: redeclaration of "f" must have the "overloadable" attribute
 
   int g(int) __attribute__((overloadable));
   int g(int) { } // error: redeclaration of "g" must also have the "overloadable" attribute
 
+  int h(int);
+  int h(int) __attribute__((overloadable)); // error: declaration of "h" must not
+                                            // have the "overloadable" attribute
+
 Functions marked ``overloadable`` must have prototypes.  Therefore, the
 following code is ill-formed:
 
@@ -651,7 +658,28 @@ caveats to this use of name mangling:
   linkage specification, it's name *will* be mangled in the same way as it
   would in C.
 
-Query for this feature with ``__has_extension(attribute_overloadable)``.
+For the purpose of backwards compatibility, at most one function with the same
+name as other ``overloadable`` functions may omit the ``overloadable``
+attribute. In this case, the function without the ``overloadable`` attribute
+will not have its name mangled.
+
+For example:
+
+.. code-block:: c
+
+  // Notes with mangled names assume Itanium mangling.
+  int f(int);
+  int f(double) __attribute__((overloadable));
+  void foo() {
+    f(5); // Emits a call to f (not _Z1fi, as it would with an overload that
+          // was marked with overloadable).
+    f(1.0); // Emits a call to _Z1fd.
+  }
+
+Support for unmarked overloads is not present in some versions of clang. You may
+query for it using ``__has_extension(overloadable_unmarked)``.
+
+Query for this attribute with ``__has_attribute(overloadable)``.
   }];
 }
 

Added: vendor/clang/dist/include/clang/Basic/BuiltinsNios2.def
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ vendor/clang/dist/include/clang/Basic/BuiltinsNios2.def	Sat Jul  1 13:24:05 2017	(r320535)
@@ -0,0 +1,70 @@
+//===-- BuiltinsNios2.def - Nios2 Builtin function database --------*- C++ -*-==//
+//
+//                     The LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+//
+// This file defines the Nios2-specific builtin function database. Users of
+// this file must define the BUILTIN macro to make use of this information.
+//
+//===----------------------------------------------------------------------===//
+
+// The format of this database matches clang/Basic/Builtins.def.
+
+#if defined(BUILTIN) && !defined(TARGET_BUILTIN)
+#   define TARGET_BUILTIN(ID, TYPE, ATTRS, FEATURE) BUILTIN(ID, TYPE, ATTRS)
+#endif
+
+// Nios2 R1 builtins:
+
+//int __builtin_ldbio(volatile const void *);
+BUILTIN(__builtin_ldbio, "ivDC*", "")
+//int __builtin_ldbuio(volatile const void *);
+BUILTIN(__builtin_ldbuio, "ivDC*", "")
+//int __builtin_ldhio(volatile const void *);
+BUILTIN(__builtin_ldhio, "ivDC*", "")
+//int __builtin_ldhuio(volatile const void *);
+BUILTIN(__builtin_ldhuio, "ivDC*", "")
+//int __builtin_ldwio(volatile const void *);
+BUILTIN(__builtin_ldwio, "ivDC*", "")
+//int __builtin_ldwuio(int);
+BUILTIN(__builtin_ldwuio, "ii", "")
+// int __builtin_rdctl(int);
+BUILTIN(__builtin_rdctl, "iIi", "")
+// void __builtin_wrctl(int, int);
+BUILTIN(__builtin_wrctl, "vIii", "")
+// int __builtin_rdprs(int, int);
+BUILTIN(__builtin_rdprs, "iii", "")
+//void __builtin_stbio(volatile void *, int);
+BUILTIN(__builtin_stbio, "vvD*i", "")
+//void __builtin_sthio(volatile void *, int);
+BUILTIN(__builtin_sthio, "vvD*i", "")
+//void __builtin_stwio(volatile void *, int);
+BUILTIN(__builtin_stwio, "vvD*i", "")
+//void __builtin_sync(void);
+BUILTIN(__builtin_sync, "v", "")
+// void __builtin_flushd(volatile void *);
+BUILTIN(__builtin_flushd, "vvD*", "")
+// void __builtin_flushda(volatile void *);
+BUILTIN(__builtin_flushda, "vvD*", "")
+
+// Nios2 R2 builtins:
+
+// int __builtin_wrpie(int);
+TARGET_BUILTIN(__builtin_wrpie, "ii", "", "nios2r2mandatory")
+// void __builtin_eni(int);
+TARGET_BUILTIN(__builtin_eni, "vi", "", "nios2r2mandatory")
+// int __builtin_ldex(volatile const void *);
+TARGET_BUILTIN(__builtin_ldex, "ivDC*", "", "nios2r2mandatory")
+// int __builtin_stex(volatile void *, int);
+TARGET_BUILTIN(__builtin_stex, "ivD*i", "", "nios2r2mandatory")
+// int __builtin_ldsex(volatile const void *);
+TARGET_BUILTIN(__builtin_ldsex, "ivDC*", "", "nios2r2mpx")
+// int __builtin_stsex(volatile void *, int);
+TARGET_BUILTIN(__builtin_stsex, "ivDC*i", "", "nios2r2mpx")
+
+#undef BUILTIN
+#undef TARGET_BUILTIN

Modified: vendor/clang/dist/include/clang/Basic/BuiltinsWebAssembly.def
==============================================================================
--- vendor/clang/dist/include/clang/Basic/BuiltinsWebAssembly.def	Sat Jul  1 13:22:10 2017	(r320534)
+++ vendor/clang/dist/include/clang/Basic/BuiltinsWebAssembly.def	Sat Jul  1 13:24:05 2017	(r320535)
@@ -21,4 +21,8 @@
 BUILTIN(__builtin_wasm_current_memory, "z", "n")
 BUILTIN(__builtin_wasm_grow_memory, "zz", "n")
 
+// Exception handling builtins.
+BUILTIN(__builtin_wasm_throw, "vUiv*", "r")
+BUILTIN(__builtin_wasm_rethrow, "v", "r")
+
 #undef BUILTIN

Modified: vendor/clang/dist/include/clang/Basic/DiagnosticASTKinds.td
==============================================================================
--- vendor/clang/dist/include/clang/Basic/DiagnosticASTKinds.td	Sat Jul  1 13:22:10 2017	(r320534)
+++ vendor/clang/dist/include/clang/Basic/DiagnosticASTKinds.td	Sat Jul  1 13:24:05 2017	(r320535)
@@ -200,12 +200,17 @@ def note_odr_defined_here : Note<"also defined here">;
 def err_odr_function_type_inconsistent : Error<
   "external function %0 declared with incompatible types in different "
   "translation units (%1 vs. %2)">;
-def warn_odr_tag_type_inconsistent : Warning<
-  "type %0 has incompatible definitions in different translation units">,
-  InGroup<DiagGroup<"odr">>;
+def warn_odr_tag_type_inconsistent
+    : Warning<"type %0 has incompatible definitions in different translation "
+              "units">,
+      InGroup<DiagGroup<"odr">>;
+def err_odr_tag_type_inconsistent
+    : Error<"type %0 has incompatible definitions in different translation "
+            "units">;
 def note_odr_tag_kind_here: Note<
   "%0 is a %select{struct|interface|union|class|enum}1 here">;
 def note_odr_field : Note<"field %0 has type %1 here">;
+def note_odr_field_name : Note<"field has name %0 here">;
 def note_odr_missing_field : Note<"no corresponding field here">;
 def note_odr_bit_field : Note<"bit-field %0 with type %1 and length %2 here">;
 def note_odr_not_bit_field : Note<"field %0 is not a bit-field">;

Modified: vendor/clang/dist/include/clang/Basic/DiagnosticDriverKinds.td
==============================================================================
--- vendor/clang/dist/include/clang/Basic/DiagnosticDriverKinds.td	Sat Jul  1 13:22:10 2017	(r320534)
+++ vendor/clang/dist/include/clang/Basic/DiagnosticDriverKinds.td	Sat Jul  1 13:24:05 2017	(r320535)
@@ -138,6 +138,9 @@ 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<
+  "invalid iOS deployment version '%0', iOS 10 is the maximum deployment "
+  "target for 32-bit targets">;
 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<
@@ -195,8 +198,8 @@ def warn_drv_unused_argument : Warning<
 def warn_drv_empty_joined_argument : Warning<
   "joined argument expects additional value: '%0'">,
   InGroup<UnusedCommandLineArgument>;
-def warn_drv_fdiagnostics_show_hotness_requires_pgo : Warning<
-  "argument '-fdiagnostics-show-hotness' requires profile-guided optimization information">,
+def warn_drv_diagnostics_hotness_requires_pgo : Warning<
+  "argument '%0' requires profile-guided optimization information">,
   InGroup<UnusedCommandLineArgument>;
 def warn_drv_clang_unsupported : Warning<
   "the clang compiler does not support '%0'">;

Modified: vendor/clang/dist/include/clang/Basic/DiagnosticGroups.td
==============================================================================
--- vendor/clang/dist/include/clang/Basic/DiagnosticGroups.td	Sat Jul  1 13:22:10 2017	(r320534)
+++ vendor/clang/dist/include/clang/Basic/DiagnosticGroups.td	Sat Jul  1 13:24:05 2017	(r320535)
@@ -311,6 +311,7 @@ def : DiagGroup<"nonportable-cfstrings">;
 def NonVirtualDtor : DiagGroup<"non-virtual-dtor">;
 def : DiagGroup<"effc++", [NonVirtualDtor]>;
 def OveralignedType : DiagGroup<"over-aligned">;
+def AlignedAllocationUnavailable : DiagGroup<"aligned-allocation-unavailable">;
 def OldStyleCast : DiagGroup<"old-style-cast">;
 def : DiagGroup<"old-style-definition">;
 def OutOfLineDeclaration : DiagGroup<"out-of-line-declaration">;

Modified: vendor/clang/dist/include/clang/Basic/DiagnosticSemaKinds.td
==============================================================================
--- vendor/clang/dist/include/clang/Basic/DiagnosticSemaKinds.td	Sat Jul  1 13:22:10 2017	(r320534)
+++ vendor/clang/dist/include/clang/Basic/DiagnosticSemaKinds.td	Sat Jul  1 13:24:05 2017	(r320535)
@@ -3294,13 +3294,15 @@ def warn_iboutletcollection_property_assign : Warning<
   "IBOutletCollection properties should be copy/strong and not assign">,
   InGroup<ObjCInvalidIBOutletProperty>;
   
-def err_attribute_overloadable_missing : Error<
-  "%select{overloaded function|redeclaration of}0 %1 must have the "
-  "'overloadable' attribute">;
+def err_attribute_overloadable_mismatch : Error<
+  "redeclaration of %0 must %select{not |}1have the 'overloadable' attribute">;
 def note_attribute_overloadable_prev_overload : Note<
-  "previous overload of function is here">;
+  "previous %select{unmarked |}0overload of function is here">;
 def err_attribute_overloadable_no_prototype : Error<
   "'overloadable' function %0 must have a prototype">;
+def err_attribute_overloadable_multiple_unmarked_overloads : Error<
+  "at most one overload for a given name may lack the 'overloadable' "
+  "attribute">;
 def warn_ns_attribute_wrong_return_type : Warning<
   "%0 attribute only applies to %select{functions|methods|properties}1 that "
   "return %select{an Objective-C object|a pointer|a non-retainable pointer}2">,
@@ -6405,6 +6407,12 @@ def warn_overaligned_type : Warning<
   "type %0 requires %1 bytes of alignment and the default allocator only "
   "guarantees %2 bytes">,
   InGroup<OveralignedType>, DefaultIgnore;
+def warn_aligned_allocation_unavailable :Warning<
+  "aligned %select{allocation|deallocation}0 function of type '%1' possibly "
+  "unavailable on %2">, InGroup<AlignedAllocationUnavailable>, DefaultError;
+def note_silence_unligned_allocation_unavailable : Note<
+  "if you supply your own aligned allocation functions, use "
+  "-Wno-aligned-allocation-unavailable to silence this diagnostic">;
 
 def err_conditional_void_nonvoid : Error<
   "%select{left|right}1 operand to ? is void, but %select{right|left}1 operand "
@@ -8402,7 +8410,7 @@ def warn_opencl_attr_deprecated_ignored : Warning <
 def err_opencl_variadic_function : Error<
   "invalid prototype, variadic arguments are not allowed in OpenCL">;
 def err_opencl_requires_extension : Error<
-  "use of %select{type |declaration}0%1 requires %2 extension to be enabled">;
+  "use of %select{type|declaration}0 %1 requires %2 extension to be enabled">;
 
 // OpenCL v2.0 s6.13.6 -- Builtin Pipe Functions
 def err_opencl_builtin_pipe_first_arg : Error<

Modified: vendor/clang/dist/include/clang/Basic/LangOptions.def
==============================================================================
--- vendor/clang/dist/include/clang/Basic/LangOptions.def	Sat Jul  1 13:22:10 2017	(r320534)
+++ vendor/clang/dist/include/clang/Basic/LangOptions.def	Sat Jul  1 13:24:05 2017	(r320535)
@@ -199,6 +199,7 @@ LANGOPT(CUDADeviceApproxTranscendentals, 1, 0, "using 
 
 LANGOPT(SizedDeallocation , 1, 0, "sized deallocation")
 LANGOPT(AlignedAllocation , 1, 0, "aligned allocation")
+LANGOPT(AlignedAllocationUnavailable, 1, 0, "aligned allocation functions are unavailable")
 LANGOPT(NewAlignOverride  , 32, 0, "maximum alignment guaranteed by '::operator new(size_t)'")
 LANGOPT(ConceptsTS , 1, 0, "enable C++ Extensions for Concepts")
 BENIGN_LANGOPT(ModulesCodegen , 1, 0, "Modules code generation")

Modified: vendor/clang/dist/include/clang/Basic/OpenMPKinds.def
==============================================================================
--- vendor/clang/dist/include/clang/Basic/OpenMPKinds.def	Sat Jul  1 13:22:10 2017	(r320534)
+++ vendor/clang/dist/include/clang/Basic/OpenMPKinds.def	Sat Jul  1 13:24:05 2017	(r320535)
@@ -552,6 +552,7 @@ OPENMP_TASKLOOP_CLAUSE(priority)
 OPENMP_TASKLOOP_CLAUSE(grainsize)
 OPENMP_TASKLOOP_CLAUSE(nogroup)
 OPENMP_TASKLOOP_CLAUSE(num_tasks)
+OPENMP_TASKLOOP_CLAUSE(reduction)
 
 // Clauses allowed for OpenMP directive 'taskloop simd'.
 OPENMP_TASKLOOP_SIMD_CLAUSE(if)
@@ -572,6 +573,7 @@ OPENMP_TASKLOOP_SIMD_CLAUSE(simdlen)
 OPENMP_TASKLOOP_SIMD_CLAUSE(grainsize)
 OPENMP_TASKLOOP_SIMD_CLAUSE(nogroup)
 OPENMP_TASKLOOP_SIMD_CLAUSE(num_tasks)
+OPENMP_TASKLOOP_SIMD_CLAUSE(reduction)
 
 // Clauses allowed for OpenMP directive 'critical'.
 OPENMP_CRITICAL_CLAUSE(hint)

Modified: vendor/clang/dist/include/clang/Basic/SourceLocation.h
==============================================================================
--- vendor/clang/dist/include/clang/Basic/SourceLocation.h	Sat Jul  1 13:22:10 2017	(r320534)
+++ vendor/clang/dist/include/clang/Basic/SourceLocation.h	Sat Jul  1 13:24:05 2017	(r320535)
@@ -262,6 +262,65 @@ class CharSourceRange {  (public)
   bool isInvalid() const { return !isValid(); }
 };
 
+/// \brief Represents an unpacked "presumed" location which can be presented
+/// to the user.
+///
+/// A 'presumed' location can be modified by \#line and GNU line marker
+/// directives and is always the expansion point of a normal location.
+///
+/// You can get a PresumedLoc from a SourceLocation with SourceManager.
+class PresumedLoc {
+  const char *Filename;
+  unsigned Line, Col;
+  SourceLocation IncludeLoc;
+
+public:
+  PresumedLoc() : Filename(nullptr) {}
+  PresumedLoc(const char *FN, unsigned Ln, unsigned Co, SourceLocation IL)
+      : Filename(FN), Line(Ln), Col(Co), IncludeLoc(IL) {}
+
+  /// \brief Return true if this object is invalid or uninitialized.
+  ///
+  /// This occurs when created with invalid source locations or when walking
+  /// off the top of a \#include stack.
+  bool isInvalid() const { return Filename == nullptr; }
+  bool isValid() const { return Filename != nullptr; }
+
+  /// \brief Return the presumed filename of this location.
+  ///
+  /// This can be affected by \#line etc.
+  const char *getFilename() const {
+    assert(isValid());
+    return Filename;
+  }
+
+  /// \brief Return the presumed line number of this location.
+  ///
+  /// This can be affected by \#line etc.
+  unsigned getLine() const {
+    assert(isValid());
+    return Line;
+  }
+
+  /// \brief Return the presumed column number of this location.
+  ///
+  /// This cannot be affected by \#line, but is packaged here for convenience.
+  unsigned getColumn() const {
+    assert(isValid());
+    return Col;
+  }
+
+  /// \brief Return the presumed include location of this location.
+  ///
+  /// This can be affected by GNU linemarker directives.
+  SourceLocation getIncludeLoc() const {
+    assert(isValid());
+    return IncludeLoc;
+  }
+};
+
+class FileEntry;
+
 /// \brief A SourceLocation and its associated SourceManager.
 ///
 /// This is useful for argument passing to functions that expect both objects.
@@ -274,6 +333,12 @@ class FullSourceLoc : public SourceLocation { (public)
   explicit FullSourceLoc(SourceLocation Loc, const SourceManager &SM)
     : SourceLocation(Loc), SrcMgr(&SM) {}
 
+  bool hasManager() const {
+      bool hasSrcMgr =  SrcMgr != nullptr;
+      assert(hasSrcMgr == isValid() && "FullSourceLoc has location but no manager");
+      return hasSrcMgr;
+  }
+
   /// \pre This FullSourceLoc has an associated SourceManager.
   const SourceManager &getManager() const {
     assert(SrcMgr && "SourceManager is NULL.");
@@ -284,6 +349,13 @@ class FullSourceLoc : public SourceLocation { (public)
 
   FullSourceLoc getExpansionLoc() const;
   FullSourceLoc getSpellingLoc() const;
+  FullSourceLoc getFileLoc() const;
+  std::pair<FullSourceLoc, FullSourceLoc> getImmediateExpansionRange() const;
+  PresumedLoc getPresumedLoc(bool UseLineDirectives = true) const;
+  bool isMacroArgExpansion(FullSourceLoc *StartLoc = nullptr) const;
+  FullSourceLoc getImmediateMacroCallerLoc() const;
+  std::pair<FullSourceLoc, StringRef> getModuleImportLoc() const;
+  unsigned getFileOffset() const;
 
   unsigned getExpansionLineNumber(bool *Invalid = nullptr) const;
   unsigned getExpansionColumnNumber(bool *Invalid = nullptr) const;
@@ -293,7 +365,13 @@ class FullSourceLoc : public SourceLocation { (public)
 
   const char *getCharacterData(bool *Invalid = nullptr) const;
 
+  unsigned getLineNumber(bool *Invalid = nullptr) const;
+  unsigned getColumnNumber(bool *Invalid = nullptr) const;
 
+  std::pair<FullSourceLoc, FullSourceLoc> getExpansionRange() const;
+
+  const FileEntry *getFileEntry() const;
+
   /// \brief Return a StringRef to the source buffer data for the
   /// specified FileID.
   StringRef getBufferData(bool *Invalid = nullptr) const;
@@ -345,50 +423,6 @@ class FullSourceLoc : public SourceLocation { (public)
 
 };
 
-/// \brief Represents an unpacked "presumed" location which can be presented
-/// to the user.
-///
-/// A 'presumed' location can be modified by \#line and GNU line marker
-/// directives and is always the expansion point of a normal location.
-///
-/// You can get a PresumedLoc from a SourceLocation with SourceManager.
-class PresumedLoc {
-  const char *Filename;
-  unsigned Line, Col;
-  SourceLocation IncludeLoc;
-public:
-  PresumedLoc() : Filename(nullptr) {}
-  PresumedLoc(const char *FN, unsigned Ln, unsigned Co, SourceLocation IL)
-    : Filename(FN), Line(Ln), Col(Co), IncludeLoc(IL) {
-  }
-
-  /// \brief Return true if this object is invalid or uninitialized.
-  ///
-  /// This occurs when created with invalid source locations or when walking
-  /// off the top of a \#include stack.
-  bool isInvalid() const { return Filename == nullptr; }
-  bool isValid() const { return Filename != nullptr; }
-
-  /// \brief Return the presumed filename of this location.
-  ///
-  /// This can be affected by \#line etc.
-  const char *getFilename() const { assert(isValid()); return Filename; }
-
-  /// \brief Return the presumed line number of this location.
-  ///
-  /// This can be affected by \#line etc.
-  unsigned getLine() const { assert(isValid()); return Line; }
-
-  /// \brief Return the presumed column number of this location.
-  ///
-  /// This cannot be affected by \#line, but is packaged here for convenience.
-  unsigned getColumn() const { assert(isValid()); return Col; }
-
-  /// \brief Return the presumed include location of this location.
-  ///
-  /// This can be affected by GNU linemarker directives.
-  SourceLocation getIncludeLoc() const { assert(isValid()); return IncludeLoc; }
-};
 
 
 }  // end namespace clang

Modified: vendor/clang/dist/include/clang/Basic/SourceManager.h
==============================================================================
--- vendor/clang/dist/include/clang/Basic/SourceManager.h	Sat Jul  1 13:22:10 2017	(r320534)
+++ vendor/clang/dist/include/clang/Basic/SourceManager.h	Sat Jul  1 13:24:05 2017	(r320535)
@@ -80,9 +80,19 @@ namespace SrcMgr {
   /// system_header is seen or in various other cases.
   ///
   enum CharacteristicKind {
-    C_User, C_System, C_ExternCSystem
+    C_User, C_System, C_ExternCSystem, C_User_ModuleMap, C_System_ModuleMap
   };
 
+  /// Determine whether a file / directory characteristic is for system code.
+  inline bool isSystem(CharacteristicKind CK) {
+    return CK != C_User && CK != C_User_ModuleMap;
+  }
+
+  /// Determine whether a file characteristic is for a module map.
+  inline bool isModuleMap(CharacteristicKind CK) {
+    return CK == C_User_ModuleMap || CK == C_System_ModuleMap;
+  }
+
   /// \brief One instance of this struct is kept for every file loaded or used.
   ///
   /// This object owns the MemoryBuffer object.
@@ -251,13 +261,15 @@ namespace SrcMgr {
     /// preprocessing of this \#include, including this SLocEntry.
     ///
     /// Zero means the preprocessor didn't provide such info for this SLocEntry.
-    unsigned NumCreatedFIDs;
+    unsigned NumCreatedFIDs : 31;
 
-    /// \brief Contains the ContentCache* and the bits indicating the
-    /// characteristic of the file and whether it has \#line info, all
-    /// bitmangled together.
-    uintptr_t Data;
+    /// \brief Whether this FileInfo has any \#line directives.
+    unsigned HasLineDirectives : 1;
 
+    /// \brief The content cache and the characteristic of the file.
+    llvm::PointerIntPair<const ContentCache*, 3, CharacteristicKind>
+        ContentAndKind;
+
     friend class clang::SourceManager;
     friend class clang::ASTWriter;
     friend class clang::ASTReader;
@@ -269,10 +281,9 @@ namespace SrcMgr {
       FileInfo X;
       X.IncludeLoc = IL.getRawEncoding();
       X.NumCreatedFIDs = 0;
-      X.Data = (uintptr_t)Con;
-      assert((X.Data & 7) == 0 &&"ContentCache pointer insufficiently aligned");
-      assert((unsigned)FileCharacter < 4 && "invalid file character");
-      X.Data |= (unsigned)FileCharacter;
+      X.HasLineDirectives = false;
+      X.ContentAndKind.setPointer(Con);
+      X.ContentAndKind.setInt(FileCharacter);
       return X;
     }
 
@@ -280,22 +291,22 @@ namespace SrcMgr {
       return SourceLocation::getFromRawEncoding(IncludeLoc);
     }
 
-    const ContentCache* getContentCache() const {
-      return reinterpret_cast<const ContentCache*>(Data & ~uintptr_t(7));
+    const ContentCache *getContentCache() const {
+      return ContentAndKind.getPointer();
     }
 
     /// \brief Return whether this is a system header or not.
     CharacteristicKind getFileCharacteristic() const {
-      return (CharacteristicKind)(Data & 3);
+      return ContentAndKind.getInt();
     }
 
     /// \brief Return true if this FileID has \#line directives in it.
-    bool hasLineDirectives() const { return (Data & 4) != 0; }
+    bool hasLineDirectives() const { return HasLineDirectives; }
 
     /// \brief Set the flag that indicates that this FileID has
     /// line table entries associated with it.
     void setHasLineDirectives() {
-      Data |= 4;
+      HasLineDirectives = true;
     }
   };
 
@@ -407,6 +418,8 @@ namespace SrcMgr {
     };
 
   public:
+    SLocEntry() : Offset(), IsExpansion(), File() {}
+
     unsigned getOffset() const { return Offset; }
 
     bool isExpansion() const { return IsExpansion; }
@@ -789,9 +802,8 @@ class SourceManager : public RefCountedBase<SourceMana
   FileID createFileID(const FileEntry *SourceFile, SourceLocation IncludePos,
                       SrcMgr::CharacteristicKind FileCharacter,
                       int LoadedID = 0, unsigned LoadedOffset = 0) {
-    const SrcMgr::ContentCache *
-      IR = getOrCreateContentCache(SourceFile,
-                              /*isSystemFile=*/FileCharacter != SrcMgr::C_User);
+    const SrcMgr::ContentCache *IR =
+        getOrCreateContentCache(SourceFile, isSystem(FileCharacter));
     assert(IR && "getOrCreateContentCache() cannot return NULL");
     return createFileID(IR, IncludePos, FileCharacter, LoadedID, LoadedOffset);
   }
@@ -1360,7 +1372,7 @@ class SourceManager : public RefCountedBase<SourceMana
 
   /// \brief Returns if a SourceLocation is in a system header.
   bool isInSystemHeader(SourceLocation Loc) const {
-    return getFileCharacteristic(Loc) != SrcMgr::C_User;
+    return isSystem(getFileCharacteristic(Loc));
   }
 
   /// \brief Returns if a SourceLocation is in an "extern C" system header.
@@ -1476,6 +1488,17 @@ class SourceManager : public RefCountedBase<SourceMana
   ///
   /// \returns true if LHS source location comes before RHS, false otherwise.
   bool isBeforeInTranslationUnit(SourceLocation LHS, SourceLocation RHS) const;
+
+  /// \brief Determines whether the two decomposed source location is in the
+  ///        same translation unit. As a byproduct, it also calculates the order
+  ///        of the source locations in case they are in the same TU.
+  ///
+  /// \returns Pair of bools the first component is true if the two locations
+  ///          are in the same TU. The second bool is true if the first is true
+  ///          and \p LOffs is before \p ROffs.

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


More information about the svn-src-all mailing list