Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/external/bsd/llvm/dist/clang Import clang r319952 from branc...



details:   https://anonhg.NetBSD.org/src/rev/cf01d9e3edbe
branches:  trunk
changeset: 828513:cf01d9e3edbe
user:      joerg <joerg%NetBSD.org@localhost>
date:      Sun Dec 17 20:58:16 2017 +0000

description:
Import clang r319952 from branches/release_50

diffstat:

 external/bsd/llvm/dist/clang/bindings/python/clang/cindex.py                                         |    8 +-
 external/bsd/llvm/dist/clang/bindings/python/tests/cindex/test_diagnostics.py                        |    8 +
 external/bsd/llvm/dist/clang/bindings/python/tests/cindex/test_exception_specification_kind.py       |   27 +
 external/bsd/llvm/dist/clang/docs/ClangCommandLineReference.rst                                      |    4 +
 external/bsd/llvm/dist/clang/docs/ReleaseNotes.rst                                                   |  258 +++++++--
 external/bsd/llvm/dist/clang/include/clang-c/Index.h                                                 |    2 +
 external/bsd/llvm/dist/clang/include/clang/AST/Decl.h                                                |    3 +-
 external/bsd/llvm/dist/clang/include/clang/AST/DeclCXX.h                                             |   79 ++-
 external/bsd/llvm/dist/clang/include/clang/AST/StmtCXX.h                                             |    5 +
 external/bsd/llvm/dist/clang/include/clang/Basic/Attr.td                                             |    4 +-
 external/bsd/llvm/dist/clang/include/clang/Basic/AttrDocs.td                                         |   15 +
 external/bsd/llvm/dist/clang/include/clang/Basic/BuiltinsX86.def                                     |    5 +-
 external/bsd/llvm/dist/clang/include/clang/Basic/DiagnosticDriverKinds.td                            |    5 +-
 external/bsd/llvm/dist/clang/include/clang/Basic/DiagnosticGroups.td                                 |   16 +-
 external/bsd/llvm/dist/clang/include/clang/Basic/DiagnosticLexKinds.td                               |    6 +-
 external/bsd/llvm/dist/clang/include/clang/Basic/DiagnosticParseKinds.td                             |   50 +-
 external/bsd/llvm/dist/clang/include/clang/Basic/DiagnosticSemaKinds.td                              |   42 +-
 external/bsd/llvm/dist/clang/include/clang/Driver/Options.td                                         |    3 +
 external/bsd/llvm/dist/clang/include/clang/Driver/ToolChain.h                                        |    2 +-
 external/bsd/llvm/dist/clang/include/clang/Frontend/CodeGenOptions.def                               |    4 +
 external/bsd/llvm/dist/clang/include/clang/Frontend/CodeGenOptions.h                                 |   17 +
 external/bsd/llvm/dist/clang/include/clang/Frontend/LangStandards.def                                |   10 +-
 external/bsd/llvm/dist/clang/include/clang/Lex/Preprocessor.h                                        |    8 +-
 external/bsd/llvm/dist/clang/include/clang/Serialization/ASTBitCodes.h                               |    9 +-
 external/bsd/llvm/dist/clang/lib/AST/ASTImporter.cpp                                                 |    5 +
 external/bsd/llvm/dist/clang/lib/AST/DeclCXX.cpp                                                     |   39 +-
 external/bsd/llvm/dist/clang/lib/AST/ExprCXX.cpp                                                     |    4 +-
 external/bsd/llvm/dist/clang/lib/AST/ExprConstant.cpp                                                |   26 +-
 external/bsd/llvm/dist/clang/lib/AST/ODRHash.cpp                                                     |    8 +-
 external/bsd/llvm/dist/clang/lib/AST/StmtCXX.cpp                                                     |   14 +
 external/bsd/llvm/dist/clang/lib/Basic/Targets.cpp                                                   |   11 +-
 external/bsd/llvm/dist/clang/lib/CodeGen/ABIInfo.h                                                   |    2 +
 external/bsd/llvm/dist/clang/lib/CodeGen/CGCXXABI.cpp                                                |   31 +-
 external/bsd/llvm/dist/clang/lib/CodeGen/CGDebugInfo.cpp                                             |    2 +-
 external/bsd/llvm/dist/clang/lib/CodeGen/CGExpr.cpp                                                  |   11 +-
 external/bsd/llvm/dist/clang/lib/CodeGen/CGOpenMPRuntime.cpp                                         |   35 +-
 external/bsd/llvm/dist/clang/lib/CodeGen/CGOpenMPRuntime.h                                           |    4 +
 external/bsd/llvm/dist/clang/lib/CodeGen/CGStmtOpenMP.cpp                                            |   13 +-
 external/bsd/llvm/dist/clang/lib/CodeGen/CodeGenFunction.cpp                                         |   16 +-
 external/bsd/llvm/dist/clang/lib/CodeGen/CodeGenFunction.h                                           |    6 +-
 external/bsd/llvm/dist/clang/lib/CodeGen/CodeGenTypes.cpp                                            |    4 +
 external/bsd/llvm/dist/clang/lib/CodeGen/CodeGenTypes.h                                              |    1 +
 external/bsd/llvm/dist/clang/lib/CodeGen/ItaniumCXXABI.cpp                                           |   24 +-
 external/bsd/llvm/dist/clang/lib/CodeGen/MicrosoftCXXABI.cpp                                         |   52 +-
 external/bsd/llvm/dist/clang/lib/CodeGen/TargetInfo.cpp                                              |   40 +-
 external/bsd/llvm/dist/clang/lib/Driver/ToolChain.cpp                                                |    7 +-
 external/bsd/llvm/dist/clang/lib/Driver/ToolChains/BareMetal.cpp                                     |    8 -
 external/bsd/llvm/dist/clang/lib/Driver/ToolChains/BareMetal.h                                       |    2 -
 external/bsd/llvm/dist/clang/lib/Driver/ToolChains/Clang.cpp                                         |   11 +-
 external/bsd/llvm/dist/clang/lib/Driver/ToolChains/CrossWindows.cpp                                  |    2 +-
 external/bsd/llvm/dist/clang/lib/Driver/ToolChains/CrossWindows.h                                    |    2 +-
 external/bsd/llvm/dist/clang/lib/Driver/ToolChains/Darwin.cpp                                        |   49 +-
 external/bsd/llvm/dist/clang/lib/Driver/ToolChains/Darwin.h                                          |    2 +-
 external/bsd/llvm/dist/clang/lib/Driver/ToolChains/Gnu.cpp                                           |    2 +-
 external/bsd/llvm/dist/clang/lib/Driver/ToolChains/Gnu.h                                             |    2 +-
 external/bsd/llvm/dist/clang/lib/Driver/ToolChains/MSVC.cpp                                          |   87 ++-
 external/bsd/llvm/dist/clang/lib/Driver/ToolChains/MSVC.h                                            |   11 +-
 external/bsd/llvm/dist/clang/lib/Driver/ToolChains/MinGW.cpp                                         |    2 +-
 external/bsd/llvm/dist/clang/lib/Driver/ToolChains/MinGW.h                                           |    2 +-
 external/bsd/llvm/dist/clang/lib/Driver/ToolChains/NetBSD.h                                          |    5 +-
 external/bsd/llvm/dist/clang/lib/Driver/ToolChains/OpenBSD.cpp                                       |    2 +
 external/bsd/llvm/dist/clang/lib/Format/Format.cpp                                                   |    2 +-
 external/bsd/llvm/dist/clang/lib/Format/WhitespaceManager.cpp                                        |   27 +-
 external/bsd/llvm/dist/clang/lib/Format/WhitespaceManager.h                                          |    7 +-
 external/bsd/llvm/dist/clang/lib/Frontend/CompilerInvocation.cpp                                     |   27 +
 external/bsd/llvm/dist/clang/lib/Frontend/InitPreprocessor.cpp                                       |    5 +-
 external/bsd/llvm/dist/clang/lib/Headers/avx512fintrin.h                                             |    9 +-
 external/bsd/llvm/dist/clang/lib/Headers/float.h                                                     |    9 +
 external/bsd/llvm/dist/clang/lib/Headers/unwind.h                                                    |   78 +--
 external/bsd/llvm/dist/clang/lib/Lex/PPLexerChange.cpp                                               |   13 +-
 external/bsd/llvm/dist/clang/lib/Lex/Preprocessor.cpp                                                |    2 +
 external/bsd/llvm/dist/clang/lib/Parse/ParseCXXInlineMethods.cpp                                     |   23 +-
 external/bsd/llvm/dist/clang/lib/Parse/Parser.cpp                                                    |    2 -
 external/bsd/llvm/dist/clang/lib/Sema/Sema.cpp                                                       |    3 +
 external/bsd/llvm/dist/clang/lib/Sema/SemaCast.cpp                                                   |    9 +-
 external/bsd/llvm/dist/clang/lib/Sema/SemaCodeComplete.cpp                                           |    5 +-
 external/bsd/llvm/dist/clang/lib/Sema/SemaDecl.cpp                                                   |   47 +-
 external/bsd/llvm/dist/clang/lib/Sema/SemaDeclCXX.cpp                                                |   61 ++-
 external/bsd/llvm/dist/clang/lib/Sema/SemaExpr.cpp                                                   |    2 +-
 external/bsd/llvm/dist/clang/lib/Sema/SemaObjCProperty.cpp                                           |    4 +-
 external/bsd/llvm/dist/clang/lib/Sema/SemaOpenMP.cpp                                                 |   23 +-
 external/bsd/llvm/dist/clang/lib/Sema/SemaTemplateInstantiateDecl.cpp                                |    3 +
 external/bsd/llvm/dist/clang/lib/Serialization/ASTReaderDecl.cpp                                     |    6 +
 external/bsd/llvm/dist/clang/lib/Serialization/ASTReaderStmt.cpp                                     |   78 ++-
 external/bsd/llvm/dist/clang/lib/Serialization/ASTWriter.cpp                                         |    3 +
 external/bsd/llvm/dist/clang/lib/Serialization/ASTWriterStmt.cpp                                     |   49 +-
 external/bsd/llvm/dist/clang/lib/StaticAnalyzer/Core/RegionStore.cpp                                 |   13 +
 external/bsd/llvm/dist/clang/test/Analysis/ctor.mm                                                   |   17 +
 external/bsd/llvm/dist/clang/test/CXX/dcl.dcl/dcl.attr/dcl.attr.nodiscard/p2.cpp                     |   10 +-
 external/bsd/llvm/dist/clang/test/CXX/dcl.dcl/dcl.attr/dcl.attr.unused/p3.cpp                        |   10 +-
 external/bsd/llvm/dist/clang/test/CXX/drs/dr0xx.cpp                                                  |   20 +-
 external/bsd/llvm/dist/clang/test/CXX/drs/dr13xx.cpp                                                 |   18 +-
 external/bsd/llvm/dist/clang/test/CXX/drs/dr1xx.cpp                                                  |    4 +-
 external/bsd/llvm/dist/clang/test/CXX/drs/dr20xx.cpp                                                 |    2 +-
 external/bsd/llvm/dist/clang/test/CXX/drs/dr2xx.cpp                                                  |    8 +-
 external/bsd/llvm/dist/clang/test/CXX/drs/dr4xx.cpp                                                  |   10 +-
 external/bsd/llvm/dist/clang/test/CXX/drs/dr5xx.cpp                                                  |    4 +-
 external/bsd/llvm/dist/clang/test/CXX/stmt.stmt/stmt.iter/stmt.ranged/p1.cpp                         |    4 +-
 external/bsd/llvm/dist/clang/test/CodeCompletion/uninstantiated_params.cpp                           |   13 +
 external/bsd/llvm/dist/clang/test/CodeGen/arm-float-helpers.c                                        |  233 +++++++++
 external/bsd/llvm/dist/clang/test/CodeGen/avx512f-builtins.c                                         |    7 +
 external/bsd/llvm/dist/clang/test/CodeGen/complex-math.c                                             |   12 +-
 external/bsd/llvm/dist/clang/test/CodeGen/pause.c                                                    |   11 +
 external/bsd/llvm/dist/clang/test/CodeGen/tbaa-vec.cpp                                               |   20 +
 external/bsd/llvm/dist/clang/test/CodeGenCXX/catch-undef-behavior.cpp                                |   36 +
 external/bsd/llvm/dist/clang/test/CodeGenCXX/clang-abi-compat.cpp                                    |   19 +
 external/bsd/llvm/dist/clang/test/CodeGenCXX/debug-info-inlined.cpp                                  |   45 +
 external/bsd/llvm/dist/clang/test/CodeGenCXX/pr34163.cpp                                             |   13 +
 external/bsd/llvm/dist/clang/test/CodeGenCXX/uncopyable-args.cpp                                     |  156 ++++-
 external/bsd/llvm/dist/clang/test/Driver/baremetal.cpp                                               |   10 +-
 external/bsd/llvm/dist/clang/test/Driver/clang-translation.c                                         |   12 +
 external/bsd/llvm/dist/clang/test/Driver/darwin-version.c                                            |    6 +
 external/bsd/llvm/dist/clang/test/Driver/flags.c                                                     |    3 +
 external/bsd/llvm/dist/clang/test/Driver/openbsd.c                                                   |    5 +-
 external/bsd/llvm/dist/clang/test/Driver/unknown-std.cpp                                             |    4 +-
 external/bsd/llvm/dist/clang/test/FixIt/fixit.cpp                                                    |    2 +-
 external/bsd/llvm/dist/clang/test/Frontend/clang-abi-compat.cpp                                      |   15 +
 external/bsd/llvm/dist/clang/test/Index/preamble-conditionals-crash.cpp                              |   12 +
 external/bsd/llvm/dist/clang/test/Index/preamble-conditionals.cpp                                    |    8 +
 external/bsd/llvm/dist/clang/test/Lexer/cxx-features.cpp                                             |   30 +-
 external/bsd/llvm/dist/clang/test/Lexer/hexfloat.cpp                                                 |   10 +-
 external/bsd/llvm/dist/clang/test/Modules/Inputs/innerstructredef.h                                  |    6 +
 external/bsd/llvm/dist/clang/test/Modules/Inputs/module.map                                          |    9 +
 external/bsd/llvm/dist/clang/test/Modules/inner-struct-redefines-invisible.m                         |   12 +
 external/bsd/llvm/dist/clang/test/OpenMP/cancel_codegen_cleanup.cpp                                  |   46 +
 external/bsd/llvm/dist/clang/test/OpenMP/declare_reduction_codegen.cpp                               |   38 +
 external/bsd/llvm/dist/clang/test/OpenMP/distribute_parallel_for_simd_loop_messages.cpp              |    2 +-
 external/bsd/llvm/dist/clang/test/OpenMP/distribute_simd_loop_messages.cpp                           |    2 +-
 external/bsd/llvm/dist/clang/test/OpenMP/for_codegen.cpp                                             |   12 +
 external/bsd/llvm/dist/clang/test/OpenMP/for_linear_codegen.cpp                                      |    1 +
 external/bsd/llvm/dist/clang/test/OpenMP/for_loop_messages.cpp                                       |    2 +-
 external/bsd/llvm/dist/clang/test/OpenMP/for_simd_loop_messages.cpp                                  |    2 +-
 external/bsd/llvm/dist/clang/test/OpenMP/ordered_messages.cpp                                        |    8 +
 external/bsd/llvm/dist/clang/test/OpenMP/parallel_for_loop_messages.cpp                              |    2 +-
 external/bsd/llvm/dist/clang/test/OpenMP/parallel_for_simd_loop_messages.cpp                         |    2 +-
 external/bsd/llvm/dist/clang/test/OpenMP/parallel_reduction_codegen.cpp                              |    8 +
 external/bsd/llvm/dist/clang/test/OpenMP/simd_loop_messages.cpp                                      |    2 +-
 external/bsd/llvm/dist/clang/test/OpenMP/target_parallel_for_loop_messages.cpp                       |    2 +-
 external/bsd/llvm/dist/clang/test/OpenMP/target_parallel_for_simd_loop_messages.cpp                  |    2 +-
 external/bsd/llvm/dist/clang/test/OpenMP/target_simd_loop_messages.cpp                               |    2 +-
 external/bsd/llvm/dist/clang/test/OpenMP/target_teams_distribute_loop_messages.cpp                   |    2 +-
 external/bsd/llvm/dist/clang/test/OpenMP/target_teams_distribute_parallel_for_loop_messages.cpp      |    2 +-
 external/bsd/llvm/dist/clang/test/OpenMP/target_teams_distribute_parallel_for_simd_loop_messages.cpp |    2 +-
 external/bsd/llvm/dist/clang/test/OpenMP/target_teams_distribute_simd_loop_messages.cpp              |    2 +-
 external/bsd/llvm/dist/clang/test/OpenMP/task_codegen.c                                              |   30 +
 external/bsd/llvm/dist/clang/test/OpenMP/taskloop_codegen.cpp                                        |    4 +
 external/bsd/llvm/dist/clang/test/OpenMP/taskloop_loop_messages.cpp                                  |    2 +-
 external/bsd/llvm/dist/clang/test/OpenMP/taskloop_simd_loop_messages.cpp                             |    2 +-
 external/bsd/llvm/dist/clang/test/OpenMP/teams_distribute_loop_messages.cpp                          |    2 +-
 external/bsd/llvm/dist/clang/test/OpenMP/teams_distribute_parallel_for_loop_messages.cpp             |    2 +-
 external/bsd/llvm/dist/clang/test/OpenMP/teams_distribute_parallel_for_simd_loop_messages.cpp        |    2 +-
 external/bsd/llvm/dist/clang/test/OpenMP/teams_distribute_simd_loop_messages.cpp                     |    2 +-
 external/bsd/llvm/dist/clang/test/PCH/coroutines.cpp                                                 |   77 ++
 external/bsd/llvm/dist/clang/test/Parser/cxx0x-attributes.cpp                                        |    8 +-
 external/bsd/llvm/dist/clang/test/Parser/cxx1z-constexpr-lambdas.cpp                                 |    8 +-
 external/bsd/llvm/dist/clang/test/Parser/cxx1z-nested-namespace-definition.cpp                       |    6 +-
 external/bsd/llvm/dist/clang/test/Preprocessor/predefined-arch-macros.c                              |   10 +
 external/bsd/llvm/dist/clang/test/Sema/attr-selectany.c                                              |    2 +
 external/bsd/llvm/dist/clang/test/Sema/vector-cast.c                                                 |    8 +
 external/bsd/llvm/dist/clang/test/SemaCUDA/function-overload.cu                                      |    2 +-
 external/bsd/llvm/dist/clang/test/SemaCUDA/no-destructor-overload.cu                                 |   10 +-
 external/bsd/llvm/dist/clang/test/SemaCXX/attr-selectany.cpp                                         |    3 +
 external/bsd/llvm/dist/clang/test/SemaCXX/constant-expression-cxx1y.cpp                              |    6 +
 external/bsd/llvm/dist/clang/test/SemaCXX/cxx0x-compat.cpp                                           |    8 +-
 external/bsd/llvm/dist/clang/test/SemaCXX/cxx1z-class-template-argument-deduction.cpp                |   48 +-
 external/bsd/llvm/dist/clang/test/SemaCXX/cxx1z-init-statement.cpp                                   |    1 +
 external/bsd/llvm/dist/clang/test/SemaCXX/deprecated.cpp                                             |   16 +-
 external/bsd/llvm/dist/clang/test/SemaCXX/inline.cpp                                                 |    6 +-
 external/bsd/llvm/dist/clang/test/SemaCXX/static-assert.cpp                                          |    2 +-
 external/bsd/llvm/dist/clang/test/SemaCXX/unused.cpp                                                 |   50 +-
 external/bsd/llvm/dist/clang/test/SemaCXX/warn-c++1z-extensions.cpp                                  |    4 +-
 external/bsd/llvm/dist/clang/test/SemaCXX/warn-shadow.cpp                                            |    9 +
 external/bsd/llvm/dist/clang/test/SemaObjC/arc-property-decl-attrs.m                                 |   27 +
 external/bsd/llvm/dist/clang/test/SemaObjC/illegal-nonarc-bridged-cast.m                             |   17 +-
 external/bsd/llvm/dist/clang/test/SemaTemplate/temp_arg_nontype_cxx11.cpp                            |    2 +-
 external/bsd/llvm/dist/clang/tools/clang-format/clang-format.py                                      |    2 +-
 external/bsd/llvm/dist/clang/unittests/ASTMatchers/ASTMatchersNarrowingTest.cpp                      |   45 +-
 external/bsd/llvm/dist/clang/unittests/Format/FormatTest.cpp                                         |   10 +
 external/bsd/llvm/dist/clang/unittests/Format/FormatTestComments.cpp                                 |    7 +
 external/bsd/llvm/dist/clang/www/cxx_dr_status.html                                                  |   52 +-
 external/bsd/llvm/dist/clang/www/cxx_status.html                                                     |   13 +-
 external/bsd/llvm/dist/clang/www/make_cxx_dr_status                                                  |    8 +-
 182 files changed, 2363 insertions(+), 751 deletions(-)

diffs (truncated from 6634 to 300 lines):

diff -r 3bdf9deb5dac -r cf01d9e3edbe external/bsd/llvm/dist/clang/bindings/python/clang/cindex.py
--- a/external/bsd/llvm/dist/clang/bindings/python/clang/cindex.py      Sun Dec 17 20:53:07 2017 +0000
+++ b/external/bsd/llvm/dist/clang/bindings/python/clang/cindex.py      Sun Dec 17 20:58:16 2017 +0000
@@ -207,7 +207,7 @@
         conf.lib.clang_disposeString(self)
 
     @staticmethod
-    def from_result(res, fn, args):
+    def from_result(res, fn=None, args=None):
         assert isinstance(res, _CXString)
         return conf.lib.clang_getCString(res)
 
@@ -459,8 +459,7 @@
         """The command-line option that disables this diagnostic."""
         disable = _CXString()
         conf.lib.clang_getDiagnosticOption(self, byref(disable))
-
-        return conf.lib.clang_getCString(disable)
+        return _CXString.from_result(disable)
 
     def format(self, options=None):
         """
@@ -473,8 +472,7 @@
             options = conf.lib.clang_defaultDiagnosticDisplayOptions()
         if options & ~Diagnostic._FormatOptionsMask:
             raise ValueError('Invalid format options')
-        formatted = conf.lib.clang_formatDiagnostic(self, options)
-        return conf.lib.clang_getCString(formatted)
+        return conf.lib.clang_formatDiagnostic(self, options)
 
     def __repr__(self):
         return "<Diagnostic severity %r, location %r, spelling %r>" % (
diff -r 3bdf9deb5dac -r cf01d9e3edbe external/bsd/llvm/dist/clang/bindings/python/tests/cindex/test_diagnostics.py
--- a/external/bsd/llvm/dist/clang/bindings/python/tests/cindex/test_diagnostics.py     Sun Dec 17 20:53:07 2017 +0000
+++ b/external/bsd/llvm/dist/clang/bindings/python/tests/cindex/test_diagnostics.py     Sun Dec 17 20:58:16 2017 +0000
@@ -92,3 +92,11 @@
     assert children[0].spelling.endswith('declared here')
     assert children[0].location.line == 1
     assert children[0].location.column == 1
+
+def test_diagnostic_string_repr():
+    tu = get_tu('struct MissingSemicolon{}')
+    assert len(tu.diagnostics) == 1
+    d = tu.diagnostics[0]
+
+    assert repr(d) == '<Diagnostic severity 3, location <SourceLocation file \'t.c\', line 1, column 26>, spelling "expected \';\' after struct">'
+    
diff -r 3bdf9deb5dac -r cf01d9e3edbe external/bsd/llvm/dist/clang/bindings/python/tests/cindex/test_exception_specification_kind.py
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/external/bsd/llvm/dist/clang/bindings/python/tests/cindex/test_exception_specification_kind.py    Sun Dec 17 20:58:16 2017 +0000
@@ -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
diff -r 3bdf9deb5dac -r cf01d9e3edbe external/bsd/llvm/dist/clang/docs/ClangCommandLineReference.rst
--- a/external/bsd/llvm/dist/clang/docs/ClangCommandLineReference.rst   Sun Dec 17 20:53:07 2017 +0000
+++ b/external/bsd/llvm/dist/clang/docs/ClangCommandLineReference.rst   Sun Dec 17 20:58:16 2017 +0000
@@ -656,6 +656,10 @@
 
 Pass <arg> to the clang compiler
 
+.. option:: -fclang-abi-compat=<version>
+
+Attempt to match the ABI of Clang <version>
+
 .. option:: -fcomment-block-commands=<arg>,<arg2>...
 
 Treat each comma separated argument in <arg> as a documentation comment block command
diff -r 3bdf9deb5dac -r cf01d9e3edbe external/bsd/llvm/dist/clang/docs/ReleaseNotes.rst
--- a/external/bsd/llvm/dist/clang/docs/ReleaseNotes.rst        Sun Dec 17 20:53:07 2017 +0000
+++ b/external/bsd/llvm/dist/clang/docs/ReleaseNotes.rst        Sun Dec 17 20:58:16 2017 +0000
@@ -1,6 +1,6 @@
-=======================================
-Clang 5.0.0 (In-Progress) Release Notes
-=======================================
+=========================
+Clang 5.0.0 Release Notes
+=========================
 
 .. contents::
    :local:
@@ -8,12 +8,6 @@
 
 Written by the `LLVM Team <http://llvm.org/>`_
 
-.. warning::
-
-   These are in-progress notes for the upcoming Clang 5 release.
-   Release notes for previous releases can be found on
-   `the Download Page <http://releases.llvm.org/download.html>`_.
-
 Introduction
 ============
 
@@ -26,15 +20,9 @@
 releases may be downloaded from the `LLVM releases web
 site <http://llvm.org/releases/>`_.
 
-For more information about Clang or LLVM, including information about
-the latest release, please check out the main please see the `Clang Web
-Site <http://clang.llvm.org>`_ or the `LLVM Web
-Site <http://llvm.org>`_.
-
-Note that if you are reading this file from a Subversion checkout or the
-main Clang web page, this document applies to the *next* release, not
-the current one. To see the release notes for a specific release, please
-see the `releases page <http://llvm.org/releases/>`_.
+For more information about Clang or LLVM, including information about the
+latest release, please see the `Clang Web Site <http://clang.llvm.org>`_ or the
+`LLVM Web Site <http://llvm.org>`_.
 
 What's New in Clang 5.0.0?
 ==========================
@@ -47,21 +35,48 @@
 Major New Features
 ------------------
 
--  ...
+C++ coroutines
+^^^^^^^^^^^^^^
+`C++ coroutines TS
+<http://open-std.org/jtc1/sc22/wg21/docs/papers/2017/n4680.pdf>`_
+implementation has landed. Use ``-fcoroutines-ts -stdlib=libc++`` to enable
+coroutine support. Here is `an example
+<https://wandbox.org/permlink/Dth1IO5q8Oe31ew2>`_ to get you started.
+
 
 Improvements to Clang's diagnostics
 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
--  -Wcast-qual was implemented for C++. C-style casts are now properly
+-  ``-Wcast-qual`` was implemented for C++. C-style casts are now properly
    diagnosed.
 
--  -Wunused-lambda-capture warns when a variable explicitly captured
+-  ``-Wunused-lambda-capture`` warns when a variable explicitly captured
    by a lambda is not used in the body of the lambda.
 
+-  ``-Wstrict-prototypes`` is a new warning that warns about non-prototype
+   function and block declarations and types in C and Objective-C.
+
+-  ``-Wunguarded-availability`` is a new warning that warns about uses of new
+   APIs that were introduced in a system whose version is newer than the
+   deployment target version. A new Objective-C expression ``@available`` has
+   been introduced to perform system version checking at runtime. This warning
+   is off by default to prevent unexpected warnings in existing projects.
+   However, its less strict sibling ``-Wunguarded-availability-new`` is on by
+   default. It warns about unguarded uses of APIs only when they were introduced
+   in or after macOS 10.13, iOS 11, tvOS 11 or watchOS 4.
+
+-  The ``-Wdocumentation`` warning now allows the use of ``\param`` and
+   ``\returns`` documentation directives in the documentation comments for
+   declarations with a function or a block pointer type.
+
+-  The compiler no longer warns about unreachable ``__builtin_unreachable``
+   statements.
+
 New Compiler Flags
 ------------------
 
-The option ....
+- ``--autocomplete`` was implemented to obtain a list of flags and its arguments.
+  This is used for shell autocompletion.
 
 Deprecated Compiler Flags
 -------------------------
@@ -69,15 +84,19 @@
 The following options are deprecated and ignored. They will be removed in
 future versions of Clang.
 
-- -fslp-vectorize-aggressive used to enable the BB vectorizing pass. They have been superseeded
+- ``-fslp-vectorize-aggressive`` used to enable the BB vectorizing pass. They have been superseeded
   by the normal SLP vectorizer.
-- -fno-slp-vectorize-aggressive used to be the default behavior of clang.
+- ``-fno-slp-vectorize-aggressive`` used to be the default behavior of clang.
 
 New Pragmas in Clang
 -----------------------
 
-Clang now supports the ...
+- Clang now supports the ``clang attribute`` pragma that allows users to apply
+  an attribute to multiple declarations.
 
+- ``pragma pack`` directives that are included in a precompiled header are now
+  applied correctly to the declarations in the compilation unit that includes
+  that precompiled header.
 
 Attribute Changes in Clang
 --------------------------
@@ -85,63 +104,127 @@
 -  The ``overloadable`` attribute now allows at most one function with a given
    name to lack the ``overloadable`` attribute. This unmarked function will not
    have its name mangled.
-
-Windows Support
----------------
-
-Clang's support for building native Windows programs ...
-
+-  The ``ms_abi`` attribute and the ``__builtin_ms_va_list`` types and builtins
+   are now supported on AArch64.
 
 C Language Changes in Clang
 ---------------------------
 
-- ...
+- Added near complete support for implicit scalar to vector conversion, a GNU
+  C/C++ language extension. With this extension, the following code is
+  considered valid:
+
+.. code-block:: c
+
+    typedef unsigned v4i32 __attribute__((vector_size(16)));
 
-...
+    v4i32 foo(v4i32 a) {
+      // Here 5 is implicitly casted to an unsigned value and replicated into a
+      // vector with as many elements as 'a'.
+      return a + 5;
+    }
+
+The implicit conversion of a scalar value to a vector value--in the context of
+a vector expression--occurs when:
 
-C11 Feature Support
-^^^^^^^^^^^^^^^^^^^
+- The type of the vector is that of a ``__attribute__((vector_size(size)))``
+  vector, not an OpenCL ``__attribute__((ext_vector_type(size)))`` vector type.
+
+- The scalar value can be casted to that of the vector element's type without
+  the loss of precision based on the type of the scalar and the type of the
+  vector's elements.
 
-...
+- For compile time constant values, the above rule is weakened to consider the
+  value of the scalar constant rather than the constant's type. However,
+  for compatibility with GCC, floating point constants with precise integral
+  representations are not implicitly converted to integer values.
+
+Currently the basic integer and floating point types with the following
+operators are supported: ``+``, ``/``, ``-``, ``*``, ``%``, ``>``, ``<``,
+``>=``, ``<=``, ``==``, ``!=``, ``&``, ``|``, ``^`` and the corresponding
+assignment operators where applicable.
+
 
 C++ Language Changes in Clang
 -----------------------------
 
-...
+- We expect this to be the last Clang release that defaults to ``-std=gnu++98``
+  when using the GCC-compatible ``clang++`` driver. From Clang 6 onwards we
+  expect to use ``-std=gnu++14`` or a later standard by default, to match the
+  behavior of recent GCC releases. Users are encouraged to change their build
+  files to explicitly specify their desired C++ standard.
+
+- Support for the C++17 standard has been completed. This mode can be enabled
+  using ``-std=c++17`` (the old flag ``-std=c++1z`` is still supported for
+  compatibility).
 
-C++1z Feature Support
-^^^^^^^^^^^^^^^^^^^^^
+- When targeting a platform that uses the Itanium C++ ABI, Clang implements a
+  `recent change to the ABI`__ that passes objects of class type indirectly if they
+  have a non-trivial move constructor. Previous versions of Clang only
+  considered the copy constructor, resulting in an ABI change in rare cases,
+  but GCC has already implemented this change for several releases.
+  This affects all targets other than Windows and PS4. You can opt out of this
+  ABI change with ``-fclang-abi-compat=4.0``.
 
-...
+- As mentioned in `C Language Changes in Clang`_, Clang's support for
+  implicit scalar to vector conversions also applies to C++. Additionally
+  the following operators are also supported: ``&&`` and ``||``.
+
+.. __: https://github.com/itanium-cxx-abi/cxx-abi/commit/7099637aba11fed6bdad7ee65bf4fd3f97fbf076
 



Home | Main Index | Thread Index | Old Index