svn commit: r319142 - in vendor/clang/dist: . bindings/python/clang cmake/caches docs include/clang-c include/clang/AST include/clang/Basic include/clang/Driver include/clang/Format include/clang/F...
Dimitry Andric
dim at FreeBSD.org
Mon May 29 16:25:51 UTC 2017
Author: dim
Date: Mon May 29 16:25:46 2017
New Revision: 319142
URL: https://svnweb.freebsd.org/changeset/base/319142
Log:
Vendor import of clang trunk r304149:
https://llvm.org/svn/llvm-project/cfe/trunk@304149
Added:
vendor/clang/dist/cmake/caches/BaremetalARM.cmake
vendor/clang/dist/lib/Driver/ToolChains/BareMetal.cpp (contents, props changed)
vendor/clang/dist/lib/Driver/ToolChains/BareMetal.h (contents, props changed)
vendor/clang/dist/lib/Headers/avx512vpopcntdqintrin.h (contents, props changed)
vendor/clang/dist/test/CodeGen/avx512vpopcntdqintrin.c (contents, props changed)
vendor/clang/dist/test/CodeGen/union-tbaa1.c (contents, props changed)
vendor/clang/dist/test/CodeGen/xray-imbue-arg1.cpp (contents, props changed)
vendor/clang/dist/test/CodeGenCXX/union-tbaa2.cpp (contents, props changed)
vendor/clang/dist/test/CodeGenCoroutines/Inputs/
vendor/clang/dist/test/CodeGenCoroutines/Inputs/coroutine.h (contents, props changed)
vendor/clang/dist/test/CodeGenCoroutines/coro-gro.cpp (contents, props changed)
vendor/clang/dist/test/CodeGenCoroutines/coro-lambda.cpp (contents, props changed)
vendor/clang/dist/test/CodeGenCoroutines/coro-params.cpp (contents, props changed)
vendor/clang/dist/test/CodeGenCoroutines/coro-promise-dtor.cpp (contents, props changed)
vendor/clang/dist/test/CodeGenCoroutines/coro-ret-void.cpp (contents, props changed)
vendor/clang/dist/test/CodeGenCoroutines/coro-unhandled-exception.cpp (contents, props changed)
vendor/clang/dist/test/Driver/Inputs/baremetal_arm/
vendor/clang/dist/test/Driver/Inputs/baremetal_arm/include/
vendor/clang/dist/test/Driver/Inputs/baremetal_arm/include/c++/
vendor/clang/dist/test/Driver/Inputs/baremetal_arm/include/c++/5.0.0/
vendor/clang/dist/test/Driver/Inputs/baremetal_arm/include/c++/5.0.0/.keep
vendor/clang/dist/test/Driver/Inputs/baremetal_arm/include/c++/6.0.0/
vendor/clang/dist/test/Driver/Inputs/baremetal_arm/include/c++/6.0.0/.keep
vendor/clang/dist/test/Driver/Inputs/baremetal_arm/include/c++/v1/
vendor/clang/dist/test/Driver/Inputs/baremetal_arm/include/c++/v1/.keep
vendor/clang/dist/test/Driver/autocomplete.c (contents, props changed)
vendor/clang/dist/test/Driver/baremetal.cpp (contents, props changed)
vendor/clang/dist/test/Frontend/Inputs/SystemHeaderPrefix/line-directive-in-system.h (contents, props changed)
vendor/clang/dist/test/Frontend/Inputs/SystemHeaderPrefix/noline.h (contents, props changed)
vendor/clang/dist/test/Frontend/Inputs/line-directive.h (contents, props changed)
vendor/clang/dist/test/Frontend/system-header-line-directive.c (contents, props changed)
vendor/clang/dist/test/Misc/caret-diags-multiline.cpp (contents, props changed)
vendor/clang/dist/test/Modules/Inputs/DependsOnModule.framework/Headers/coroutines.h (contents, props changed)
vendor/clang/dist/test/Modules/Inputs/DependsOnModule.framework/Headers/not_coroutines.h (contents, props changed)
vendor/clang/dist/test/Modules/Inputs/diagnose-missing-import/
vendor/clang/dist/test/Modules/Inputs/diagnose-missing-import/a.h (contents, props changed)
vendor/clang/dist/test/Modules/Inputs/diagnose-missing-import/module.modulemap
vendor/clang/dist/test/Modules/diagnose-missing-import.m
vendor/clang/dist/test/Modules/requires-coroutines.mm
vendor/clang/dist/test/SemaCXX/coroutine-seh.cpp (contents, props changed)
vendor/clang/dist/test/SemaCXX/null-cast.cpp (contents, props changed)
vendor/clang/dist/test/SemaObjC/diagnose_if.m
vendor/clang/dist/utils/bash-autocomplete.sh (contents, props changed)
Deleted:
vendor/clang/dist/test/Driver/arm-darwin-builtin.c
Modified:
vendor/clang/dist/CMakeLists.txt
vendor/clang/dist/bindings/python/clang/cindex.py
vendor/clang/dist/docs/Modules.rst
vendor/clang/dist/include/clang-c/Index.h
vendor/clang/dist/include/clang/AST/Expr.h
vendor/clang/dist/include/clang/AST/StmtCXX.h
vendor/clang/dist/include/clang/Basic/Attr.td
vendor/clang/dist/include/clang/Basic/BuiltinsAMDGPU.def
vendor/clang/dist/include/clang/Basic/BuiltinsPPC.def
vendor/clang/dist/include/clang/Basic/BuiltinsX86.def
vendor/clang/dist/include/clang/Basic/DiagnosticOptions.def
vendor/clang/dist/include/clang/Basic/DiagnosticOptions.h
vendor/clang/dist/include/clang/Basic/DiagnosticSemaKinds.td
vendor/clang/dist/include/clang/Basic/SourceManager.h
vendor/clang/dist/include/clang/Basic/SourceManagerInternals.h
vendor/clang/dist/include/clang/Basic/TemplateKinds.h
vendor/clang/dist/include/clang/Basic/XRayLists.h
vendor/clang/dist/include/clang/Driver/CC1Options.td
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/CompilerInvocation.h
vendor/clang/dist/include/clang/Lex/ModuleMap.h
vendor/clang/dist/include/clang/Sema/AttributeList.h
vendor/clang/dist/include/clang/Sema/ParsedTemplate.h
vendor/clang/dist/include/clang/Sema/ScopeInfo.h
vendor/clang/dist/include/clang/Sema/Sema.h
vendor/clang/dist/include/clang/Tooling/CompilationDatabase.h
vendor/clang/dist/lib/AST/DeclBase.cpp
vendor/clang/dist/lib/AST/ExprConstant.cpp
vendor/clang/dist/lib/AST/MicrosoftMangle.cpp
vendor/clang/dist/lib/AST/StmtCXX.cpp
vendor/clang/dist/lib/Analysis/AnalysisDeclContext.cpp
vendor/clang/dist/lib/Basic/Module.cpp
vendor/clang/dist/lib/Basic/SourceManager.cpp
vendor/clang/dist/lib/Basic/Targets.cpp
vendor/clang/dist/lib/Basic/XRayLists.cpp
vendor/clang/dist/lib/CodeGen/CGBuiltin.cpp
vendor/clang/dist/lib/CodeGen/CGCoroutine.cpp
vendor/clang/dist/lib/CodeGen/CGExpr.cpp
vendor/clang/dist/lib/CodeGen/CGOpenMPRuntime.cpp
vendor/clang/dist/lib/CodeGen/CGOpenMPRuntimeNVPTX.cpp
vendor/clang/dist/lib/CodeGen/CodeGenModule.cpp
vendor/clang/dist/lib/CodeGen/TargetInfo.cpp
vendor/clang/dist/lib/Driver/CMakeLists.txt
vendor/clang/dist/lib/Driver/Driver.cpp
vendor/clang/dist/lib/Driver/ToolChains/Gnu.cpp
vendor/clang/dist/lib/Driver/ToolChains/Linux.cpp
vendor/clang/dist/lib/Driver/ToolChains/Myriad.cpp
vendor/clang/dist/lib/Format/ContinuationIndenter.cpp
vendor/clang/dist/lib/Format/Format.cpp
vendor/clang/dist/lib/Format/TokenAnnotator.cpp
vendor/clang/dist/lib/Frontend/ASTUnit.cpp
vendor/clang/dist/lib/Frontend/CompilerInvocation.cpp
vendor/clang/dist/lib/Frontend/CreateInvocationFromCommandLine.cpp
vendor/clang/dist/lib/Frontend/FrontendAction.cpp
vendor/clang/dist/lib/Frontend/InitPreprocessor.cpp
vendor/clang/dist/lib/Frontend/TextDiagnostic.cpp
vendor/clang/dist/lib/Headers/CMakeLists.txt
vendor/clang/dist/lib/Headers/altivec.h
vendor/clang/dist/lib/Headers/immintrin.h
vendor/clang/dist/lib/Index/IndexBody.cpp
vendor/clang/dist/lib/Index/IndexingContext.cpp
vendor/clang/dist/lib/Lex/LiteralSupport.cpp
vendor/clang/dist/lib/Lex/ModuleMap.cpp
vendor/clang/dist/lib/Lex/PPDirectives.cpp
vendor/clang/dist/lib/Lex/PPMacroExpansion.cpp
vendor/clang/dist/lib/Lex/Pragma.cpp
vendor/clang/dist/lib/Parse/ParseExprCXX.cpp
vendor/clang/dist/lib/Parse/ParseTemplate.cpp
vendor/clang/dist/lib/Sema/AnalysisBasedWarnings.cpp
vendor/clang/dist/lib/Sema/CoroutineStmtBuilder.h
vendor/clang/dist/lib/Sema/SemaChecking.cpp
vendor/clang/dist/lib/Sema/SemaCoroutine.cpp
vendor/clang/dist/lib/Sema/SemaDecl.cpp
vendor/clang/dist/lib/Sema/SemaDeclAttr.cpp
vendor/clang/dist/lib/Sema/SemaDeclCXX.cpp
vendor/clang/dist/lib/Sema/SemaExpr.cpp
vendor/clang/dist/lib/Sema/SemaLambda.cpp
vendor/clang/dist/lib/Sema/SemaLookup.cpp
vendor/clang/dist/lib/Sema/SemaOverload.cpp
vendor/clang/dist/lib/Sema/SemaTemplateInstantiate.cpp
vendor/clang/dist/lib/Sema/TreeTransform.h
vendor/clang/dist/lib/Tooling/CommonOptionsParser.cpp
vendor/clang/dist/lib/Tooling/CompilationDatabase.cpp
vendor/clang/dist/lib/Tooling/Tooling.cpp
vendor/clang/dist/test/CXX/class.access/p4.cpp
vendor/clang/dist/test/CodeGen/64bit-swiftcall.c
vendor/clang/dist/test/CodeGen/aarch64-neon-2velem.c
vendor/clang/dist/test/CodeGen/aarch64-neon-3v.c
vendor/clang/dist/test/CodeGen/aarch64-neon-across.c
vendor/clang/dist/test/CodeGen/aarch64-neon-extract.c
vendor/clang/dist/test/CodeGen/aarch64-neon-fcvt-intrinsics.c
vendor/clang/dist/test/CodeGen/aarch64-neon-fma.c
vendor/clang/dist/test/CodeGen/aarch64-neon-intrinsics.c
vendor/clang/dist/test/CodeGen/aarch64-neon-ldst-one.c
vendor/clang/dist/test/CodeGen/aarch64-neon-misc.c
vendor/clang/dist/test/CodeGen/aarch64-neon-perm.c
vendor/clang/dist/test/CodeGen/aarch64-neon-scalar-copy.c
vendor/clang/dist/test/CodeGen/aarch64-neon-scalar-x-indexed-elem.c
vendor/clang/dist/test/CodeGen/aarch64-neon-shifts.c
vendor/clang/dist/test/CodeGen/aarch64-neon-tbl.c
vendor/clang/dist/test/CodeGen/aarch64-neon-vcombine.c
vendor/clang/dist/test/CodeGen/aarch64-neon-vget-hilo.c
vendor/clang/dist/test/CodeGen/aarch64-neon-vget.c
vendor/clang/dist/test/CodeGen/aarch64-poly128.c
vendor/clang/dist/test/CodeGen/aarch64-poly64.c
vendor/clang/dist/test/CodeGen/address-safety-attr-kasan.cpp
vendor/clang/dist/test/CodeGen/address-safety-attr.cpp
vendor/clang/dist/test/CodeGen/arm-crc32.c
vendor/clang/dist/test/CodeGen/arm-neon-directed-rounding.c
vendor/clang/dist/test/CodeGen/arm-neon-fma.c
vendor/clang/dist/test/CodeGen/arm-neon-numeric-maxmin.c
vendor/clang/dist/test/CodeGen/arm-neon-shifts.c
vendor/clang/dist/test/CodeGen/arm-neon-vcvtX.c
vendor/clang/dist/test/CodeGen/arm-neon-vget.c
vendor/clang/dist/test/CodeGen/arm-swiftcall.c
vendor/clang/dist/test/CodeGen/arm64-crc32.c
vendor/clang/dist/test/CodeGen/arm64-lanes.c
vendor/clang/dist/test/CodeGen/arm64_vcopy.c
vendor/clang/dist/test/CodeGen/arm64_vdupq_n_f64.c
vendor/clang/dist/test/CodeGen/attr-coldhot.c
vendor/clang/dist/test/CodeGen/attr-naked.c
vendor/clang/dist/test/CodeGen/attr-target-x86.c
vendor/clang/dist/test/CodeGen/builtins-arm-exclusive.c
vendor/clang/dist/test/CodeGen/builtins-arm.c
vendor/clang/dist/test/CodeGen/builtins-arm64.c
vendor/clang/dist/test/CodeGen/builtins-ppc-error.c
vendor/clang/dist/test/CodeGen/builtins-ppc-vsx.c
vendor/clang/dist/test/CodeGen/mips-varargs.c
vendor/clang/dist/test/CodeGen/noduplicate-cxx11-test.cpp
vendor/clang/dist/test/CodeGen/piclevels.c
vendor/clang/dist/test/CodeGen/pragma-weak.c
vendor/clang/dist/test/CodeGen/unwind-attr.c
vendor/clang/dist/test/CodeGenCXX/apple-kext-indirect-virtual-dtor-call.cpp
vendor/clang/dist/test/CodeGenCXX/apple-kext-no-staticinit-section.cpp
vendor/clang/dist/test/CodeGenCXX/debug-info-global-ctor-dtor.cpp
vendor/clang/dist/test/CodeGenCXX/optnone-templates.cpp
vendor/clang/dist/test/CodeGenCXX/static-init-wasm.cpp
vendor/clang/dist/test/CodeGenCXX/thunks.cpp
vendor/clang/dist/test/CodeGenCoroutines/coro-alloc.cpp
vendor/clang/dist/test/CodeGenCoroutines/coro-await.cpp
vendor/clang/dist/test/CodeGenCoroutines/coro-builtins.c
vendor/clang/dist/test/CodeGenCoroutines/coro-cleanup.cpp
vendor/clang/dist/test/CodeGenCoroutines/coro-eh-cleanup.cpp
vendor/clang/dist/test/CodeGenObjC/gnu-exceptions.m
vendor/clang/dist/test/CodeGenOpenCL/amdgpu-alignment.cl
vendor/clang/dist/test/CodeGenOpenCL/amdgpu-attrs.cl
vendor/clang/dist/test/CodeGenOpenCL/amdgpu-debug-info-pointer-address-space.cl
vendor/clang/dist/test/CodeGenOpenCL/amdgpu-debug-info-variable-expression.cl
vendor/clang/dist/test/CodeGenOpenCL/amdgpu-nullptr.cl
vendor/clang/dist/test/CodeGenOpenCL/builtins-amdgcn.cl
vendor/clang/dist/test/CodeGenOpenCL/byval.cl
vendor/clang/dist/test/CodeGenOpenCL/half.cl
vendor/clang/dist/test/CodeGenOpenCL/size_t.cl
vendor/clang/dist/test/Driver/aarch64-cpus.c
vendor/clang/dist/test/Driver/amdgpu-features.c
vendor/clang/dist/test/Driver/arm-default-build-attributes.s
vendor/clang/dist/test/Driver/cl-outputs.c
vendor/clang/dist/test/Driver/clang_f_opts.c
vendor/clang/dist/test/Driver/cuda-external-tools.cu
vendor/clang/dist/test/Driver/darwin-iphone-defaults.m
vendor/clang/dist/test/Driver/debug-options.c
vendor/clang/dist/test/Driver/gfortran.f90
vendor/clang/dist/test/Driver/split-debug.h
vendor/clang/dist/test/Driver/unknown-arg.c
vendor/clang/dist/test/Frontend/gnu-mcount.c
vendor/clang/dist/test/Index/Core/index-instantiated-source.cpp
vendor/clang/dist/test/Index/Core/index-source.m
vendor/clang/dist/test/Index/index-attrs.c
vendor/clang/dist/test/Index/index-attrs.cpp
vendor/clang/dist/test/Index/index-module.m
vendor/clang/dist/test/Index/opencl-types.cl
vendor/clang/dist/test/Lexer/cxx-features.cpp
vendor/clang/dist/test/Modules/Inputs/DependsOnModule.framework/module.map
vendor/clang/dist/test/OpenMP/nvptx_target_codegen.cpp
vendor/clang/dist/test/OpenMP/target_codegen.cpp
vendor/clang/dist/test/OpenMP/target_codegen_registration.cpp
vendor/clang/dist/test/OpenMP/target_parallel_codegen.cpp
vendor/clang/dist/test/OpenMP/target_parallel_codegen_registration.cpp
vendor/clang/dist/test/OpenMP/target_parallel_if_codegen.cpp
vendor/clang/dist/test/OpenMP/target_parallel_num_threads_codegen.cpp
vendor/clang/dist/test/OpenMP/target_teams_codegen.cpp
vendor/clang/dist/test/OpenMP/target_teams_codegen_registration.cpp
vendor/clang/dist/test/OpenMP/target_teams_num_teams_codegen.cpp
vendor/clang/dist/test/OpenMP/target_teams_thread_limit_codegen.cpp
vendor/clang/dist/test/Parser/objc-available.m
vendor/clang/dist/test/Preprocessor/line-directive-output.c
vendor/clang/dist/test/Sema/128bitfloat.cpp
vendor/clang/dist/test/Sema/sizeof-struct-non-zero-as-member.cl
vendor/clang/dist/test/SemaCXX/coreturn.cpp
vendor/clang/dist/test/SemaCXX/coroutine-unhandled_exception-warning.cpp
vendor/clang/dist/test/SemaCXX/coroutines.cpp
vendor/clang/dist/test/SemaCXX/default-assignment-operator.cpp
vendor/clang/dist/test/SemaCXX/deprecated.cpp
vendor/clang/dist/test/SemaCXX/uninitialized.cpp
vendor/clang/dist/test/SemaCXX/virtual-base-used.cpp
vendor/clang/dist/test/SemaObjC/unguarded-availability.m
vendor/clang/dist/test/SemaOpenCL/invalid-pipes-cl2.0.cl
vendor/clang/dist/test/SemaOpenCL/vector_literals_invalid.cl
vendor/clang/dist/tools/clang-format/git-clang-format
vendor/clang/dist/tools/driver/driver.cpp
vendor/clang/dist/tools/libclang/CXCompilationDatabase.cpp
vendor/clang/dist/tools/libclang/CXType.cpp
vendor/clang/dist/tools/scan-build/libexec/ccc-analyzer
vendor/clang/dist/unittests/Driver/ToolChainTest.cpp
vendor/clang/dist/unittests/Format/CleanupTest.cpp
vendor/clang/dist/unittests/Format/FormatTest.cpp
vendor/clang/dist/unittests/Format/FormatTestJS.cpp
vendor/clang/dist/unittests/Format/FormatTestObjC.cpp
vendor/clang/dist/unittests/Tooling/CompilationDatabaseTest.cpp
vendor/clang/dist/utils/TableGen/ClangAttrEmitter.cpp
vendor/clang/dist/www/cxx_status.html
vendor/clang/dist/www/get_started.html
Modified: vendor/clang/dist/CMakeLists.txt
==============================================================================
--- vendor/clang/dist/CMakeLists.txt Mon May 29 16:25:32 2017 (r319141)
+++ vendor/clang/dist/CMakeLists.txt Mon May 29 16:25:46 2017 (r319142)
@@ -359,6 +359,10 @@ if (NOT LLVM_INSTALL_TOOLCHAIN_ONLY)
PATTERN "*.inc"
PATTERN "*.h"
)
+
+ install(PROGRAMS utils/bash-autocomplete.sh
+ DESTINATION share/clang
+ )
endif()
add_definitions( -D_GNU_SOURCE )
Modified: vendor/clang/dist/bindings/python/clang/cindex.py
==============================================================================
--- vendor/clang/dist/bindings/python/clang/cindex.py Mon May 29 16:25:32 2017 (r319141)
+++ vendor/clang/dist/bindings/python/clang/cindex.py Mon May 29 16:25:46 2017 (r319142)
@@ -1963,6 +1963,47 @@ TypeKind.DEPENDENTSIZEDARRAY = TypeKind(
TypeKind.MEMBERPOINTER = TypeKind(117)
TypeKind.AUTO = TypeKind(118)
TypeKind.ELABORATED = TypeKind(119)
+TypeKind.PIPE = TypeKind(120)
+TypeKind.OCLIMAGE1DRO = TypeKind(121)
+TypeKind.OCLIMAGE1DARRAYRO = TypeKind(122)
+TypeKind.OCLIMAGE1DBUFFERRO = TypeKind(123)
+TypeKind.OCLIMAGE2DRO = TypeKind(124)
+TypeKind.OCLIMAGE2DARRAYRO = TypeKind(125)
+TypeKind.OCLIMAGE2DDEPTHRO = TypeKind(126)
+TypeKind.OCLIMAGE2DARRAYDEPTHRO = TypeKind(127)
+TypeKind.OCLIMAGE2DMSAARO = TypeKind(128)
+TypeKind.OCLIMAGE2DARRAYMSAARO = TypeKind(129)
+TypeKind.OCLIMAGE2DMSAADEPTHRO = TypeKind(130)
+TypeKind.OCLIMAGE2DARRAYMSAADEPTHRO = TypeKind(131)
+TypeKind.OCLIMAGE3DRO = TypeKind(132)
+TypeKind.OCLIMAGE1DWO = TypeKind(133)
+TypeKind.OCLIMAGE1DARRAYWO = TypeKind(134)
+TypeKind.OCLIMAGE1DBUFFERWO = TypeKind(135)
+TypeKind.OCLIMAGE2DWO = TypeKind(136)
+TypeKind.OCLIMAGE2DARRAYWO = TypeKind(137)
+TypeKind.OCLIMAGE2DDEPTHWO = TypeKind(138)
+TypeKind.OCLIMAGE2DARRAYDEPTHWO = TypeKind(139)
+TypeKind.OCLIMAGE2DMSAAWO = TypeKind(140)
+TypeKind.OCLIMAGE2DARRAYMSAAWO = TypeKind(141)
+TypeKind.OCLIMAGE2DMSAADEPTHWO = TypeKind(142)
+TypeKind.OCLIMAGE2DARRAYMSAADEPTHWO = TypeKind(143)
+TypeKind.OCLIMAGE3DWO = TypeKind(144)
+TypeKind.OCLIMAGE1DRW = TypeKind(145)
+TypeKind.OCLIMAGE1DARRAYRW = TypeKind(146)
+TypeKind.OCLIMAGE1DBUFFERRW = TypeKind(147)
+TypeKind.OCLIMAGE2DRW = TypeKind(148)
+TypeKind.OCLIMAGE2DARRAYRW = TypeKind(149)
+TypeKind.OCLIMAGE2DDEPTHRW = TypeKind(150)
+TypeKind.OCLIMAGE2DARRAYDEPTHRW = TypeKind(151)
+TypeKind.OCLIMAGE2DMSAARW = TypeKind(152)
+TypeKind.OCLIMAGE2DARRAYMSAARW = TypeKind(153)
+TypeKind.OCLIMAGE2DMSAADEPTHRW = TypeKind(154)
+TypeKind.OCLIMAGE2DARRAYMSAADEPTHRW = TypeKind(155)
+TypeKind.OCLIMAGE3DRW = TypeKind(156)
+TypeKind.OCLSAMPLER = TypeKind(157)
+TypeKind.OCLEVENT = TypeKind(158)
+TypeKind.OCLQUEUE = TypeKind(159)
+TypeKind.OCLRESERVEID = TypeKind(160)
class RefQualifierKind(BaseEnumeration):
"""Describes a specific ref-qualifier of a type."""
Added: vendor/clang/dist/cmake/caches/BaremetalARM.cmake
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ vendor/clang/dist/cmake/caches/BaremetalARM.cmake Mon May 29 16:25:46 2017 (r319142)
@@ -0,0 +1,50 @@
+set(LLVM_TARGETS_TO_BUILD ARM;X86 CACHE STRING "")
+
+# Builtins
+set(LLVM_BUILTIN_TARGETS "armv7m-none-eabi;armv6m-none-eabi;armv7em-none-eabi" CACHE STRING "Builtin Targets")
+
+set(BUILTINS_armv6m-none-eabi_CMAKE_SYSROOT ${BAREMETAL_ARMV6M_SYSROOT} CACHE STRING "armv6m-none-eabi Sysroot")
+set(BUILTINS_armv6m-none-eabi_CMAKE_SYSTEM_NAME Generic CACHE STRING "armv6m-none-eabi System Name")
+set(BUILTINS_armv6m-none-eabi_COMPILER_RT_BAREMETAL_BUILD ON CACHE BOOL "armv6m-none-eabi Baremetal build")
+set(BUILTINS_armv6m-none-eabi_COMPILER_RT_OS_DIR "baremetal" CACHE STRING "armv6m-none-eabi os dir")
+
+set(BUILTINS_armv7m-none-eabi_CMAKE_SYSROOT ${BAREMETAL_ARMV7M_SYSROOT} CACHE STRING "armv7m-none-eabi Sysroot")
+set(BUILTINS_armv7m-none-eabi_CMAKE_SYSTEM_NAME Generic CACHE STRING "armv7m-none-eabi System Name")
+set(BUILTINS_armv7m-none-eabi_COMPILER_RT_BAREMETAL_BUILD ON CACHE BOOL "armv7m-none-eabi Baremetal build")
+set(BUILTINS_armv7m-none-eabi_CMAKE_C_FLAGS "-mfpu=fp-armv8" CACHE STRING "armv7m-none-eabi C Flags")
+set(BUILTINS_armv7m-none-eabi_CMAKE_ASM_FLAGS "-mfpu=fp-armv8" CACHE STRING "armv7m-none-eabi ASM Flags")
+set(BUILTINS_armv7m-none-eabi_COMPILER_RT_OS_DIR "baremetal" CACHE STRING "armv7m-none-eabi os dir")
+
+set(BUILTINS_armv7em-none-eabi_CMAKE_SYSROOT ${BAREMETAL_ARMV7EM_SYSROOT} CACHE STRING "armv7em-none-eabi Sysroot")
+set(BUILTINS_armv7em-none-eabi_CMAKE_SYSTEM_NAME Generic CACHE STRING "armv7em-none-eabi System Name")
+set(BUILTINS_armv7em-none-eabi_COMPILER_RT_BAREMETAL_BUILD ON CACHE BOOL "armv7em-none-eabi Baremetal build")
+set(BUILTINS_armv7em-none-eabi_CMAKE_C_FLAGS "-mfpu=fp-armv8" CACHE STRING "armv7em-none-eabi C Flags")
+set(BUILTINS_armv7em-none-eabi_CMAKE_ASM_FLAGS "-mfpu=fp-armv8" CACHE STRING "armv7em-none-eabi ASM Flags")
+set(BUILTINS_armv7em-none-eabi_COMPILER_RT_OS_DIR "baremetal" CACHE STRING "armv7em-none-eabi os dir")
+
+set(LLVM_INSTALL_TOOLCHAIN_ONLY ON CACHE BOOL "")
+set(LLVM_TOOLCHAIN_TOOLS
+ llc
+ llvm-ar
+ llvm-cxxfilt
+ llvm-dwarfdump
+ llvm-dsymutil
+ llvm-nm
+ llvm-objdump
+ llvm-ranlib
+ llvm-readobj
+ llvm-size
+ llvm-symbolizer
+ opt
+ CACHE STRING "")
+
+set(LLVM_DISTRIBUTION_COMPONENTS
+ clang
+ lld
+ clang-headers
+ builtins-armv6m-none-eabi
+ builtins-armv7m-none-eabi
+ builtins-armv7em-none-eabi
+ runtimes
+ ${LLVM_TOOLCHAIN_TOOLS}
+ CACHE STRING "")
Modified: vendor/clang/dist/docs/Modules.rst
==============================================================================
--- vendor/clang/dist/docs/Modules.rst Mon May 29 16:25:32 2017 (r319141)
+++ vendor/clang/dist/docs/Modules.rst Mon May 29 16:25:46 2017 (r319142)
@@ -413,6 +413,9 @@ altivec
blocks
The "blocks" language feature is available.
+coroutines
+ Support for the coroutines TS is available.
+
cplusplus
C++ support is available.
Modified: vendor/clang/dist/include/clang-c/Index.h
==============================================================================
--- vendor/clang/dist/include/clang-c/Index.h Mon May 29 16:25:32 2017 (r319141)
+++ vendor/clang/dist/include/clang-c/Index.h Mon May 29 16:25:46 2017 (r319142)
@@ -32,7 +32,7 @@
* compatible, thus CINDEX_VERSION_MAJOR is expected to remain stable.
*/
#define CINDEX_VERSION_MAJOR 0
-#define CINDEX_VERSION_MINOR 39
+#define CINDEX_VERSION_MINOR 40
#define CINDEX_VERSION_ENCODE(major, minor) ( \
((major) * 10000) \
@@ -3076,7 +3076,52 @@ enum CXTypeKind {
*
* E.g., struct S, or via a qualified name, e.g., N::M::type, or both.
*/
- CXType_Elaborated = 119
+ CXType_Elaborated = 119,
+
+ /* OpenCL PipeType. */
+ CXType_Pipe = 120,
+
+ /* OpenCL builtin types. */
+ CXType_OCLImage1dRO = 121,
+ CXType_OCLImage1dArrayRO = 122,
+ CXType_OCLImage1dBufferRO = 123,
+ CXType_OCLImage2dRO = 124,
+ CXType_OCLImage2dArrayRO = 125,
+ CXType_OCLImage2dDepthRO = 126,
+ CXType_OCLImage2dArrayDepthRO = 127,
+ CXType_OCLImage2dMSAARO = 128,
+ CXType_OCLImage2dArrayMSAARO = 129,
+ CXType_OCLImage2dMSAADepthRO = 130,
+ CXType_OCLImage2dArrayMSAADepthRO = 131,
+ CXType_OCLImage3dRO = 132,
+ CXType_OCLImage1dWO = 133,
+ CXType_OCLImage1dArrayWO = 134,
+ CXType_OCLImage1dBufferWO = 135,
+ CXType_OCLImage2dWO = 136,
+ CXType_OCLImage2dArrayWO = 137,
+ CXType_OCLImage2dDepthWO = 138,
+ CXType_OCLImage2dArrayDepthWO = 139,
+ CXType_OCLImage2dMSAAWO = 140,
+ CXType_OCLImage2dArrayMSAAWO = 141,
+ CXType_OCLImage2dMSAADepthWO = 142,
+ CXType_OCLImage2dArrayMSAADepthWO = 143,
+ CXType_OCLImage3dWO = 144,
+ CXType_OCLImage1dRW = 145,
+ CXType_OCLImage1dArrayRW = 146,
+ CXType_OCLImage1dBufferRW = 147,
+ CXType_OCLImage2dRW = 148,
+ CXType_OCLImage2dArrayRW = 149,
+ CXType_OCLImage2dDepthRW = 150,
+ CXType_OCLImage2dArrayDepthRW = 151,
+ CXType_OCLImage2dMSAARW = 152,
+ CXType_OCLImage2dArrayMSAARW = 153,
+ CXType_OCLImage2dMSAADepthRW = 154,
+ CXType_OCLImage2dArrayMSAADepthRW = 155,
+ CXType_OCLImage3dRW = 156,
+ CXType_OCLSampler = 157,
+ CXType_OCLEvent = 158,
+ CXType_OCLQueue = 159,
+ CXType_OCLReserveID = 160
};
/**
Modified: vendor/clang/dist/include/clang/AST/Expr.h
==============================================================================
--- vendor/clang/dist/include/clang/AST/Expr.h Mon May 29 16:25:32 2017 (r319141)
+++ vendor/clang/dist/include/clang/AST/Expr.h Mon May 29 16:25:46 2017 (r319142)
@@ -4284,6 +4284,9 @@ public:
}
Designator *getDesignator(unsigned Idx) { return &designators()[Idx]; }
+ const Designator *getDesignator(unsigned Idx) const {
+ return &designators()[Idx];
+ }
void setDesignators(const ASTContext &C, const Designator *Desigs,
unsigned NumDesigs);
Modified: vendor/clang/dist/include/clang/AST/StmtCXX.h
==============================================================================
--- vendor/clang/dist/include/clang/AST/StmtCXX.h Mon May 29 16:25:32 2017 (r319141)
+++ vendor/clang/dist/include/clang/AST/StmtCXX.h Mon May 29 16:25:46 2017 (r319142)
@@ -308,7 +308,9 @@ class CoroutineBodyStmt final
OnFallthrough, ///< Handler for control flow falling off the body.
Allocate, ///< Coroutine frame memory allocation.
Deallocate, ///< Coroutine frame memory deallocation.
- ReturnValue, ///< Return value for thunk function.
+ ReturnValue, ///< Return value for thunk function: p.get_return_object().
+ ResultDecl, ///< Declaration holding the result of get_return_object.
+ ReturnStmt, ///< Return statement for the thunk function.
ReturnStmtOnAllocFailure, ///< Return statement if allocation failed.
FirstParamMove ///< First offset for move construction of parameter copies.
};
@@ -332,7 +334,9 @@ public:
Stmt *OnFallthrough = nullptr;
Expr *Allocate = nullptr;
Expr *Deallocate = nullptr;
- Stmt *ReturnValue = nullptr;
+ Expr *ReturnValue = nullptr;
+ Stmt *ResultDecl = nullptr;
+ Stmt *ReturnStmt = nullptr;
Stmt *ReturnStmtOnAllocFailure = nullptr;
ArrayRef<Stmt *> ParamMoves;
};
@@ -381,10 +385,11 @@ public:
Expr *getDeallocate() const {
return cast_or_null<Expr>(getStoredStmts()[SubStmt::Deallocate]);
}
-
Expr *getReturnValueInit() const {
- return cast_or_null<Expr>(getStoredStmts()[SubStmt::ReturnValue]);
+ return cast<Expr>(getStoredStmts()[SubStmt::ReturnValue]);
}
+ Stmt *getResultDecl() const { return getStoredStmts()[SubStmt::ResultDecl]; }
+ Stmt *getReturnStmt() const { return getStoredStmts()[SubStmt::ReturnStmt]; }
Stmt *getReturnStmtOnAllocFailure() const {
return getStoredStmts()[SubStmt::ReturnStmtOnAllocFailure];
}
Modified: vendor/clang/dist/include/clang/Basic/Attr.td
==============================================================================
--- vendor/clang/dist/include/clang/Basic/Attr.td Mon May 29 16:25:32 2017 (r319141)
+++ vendor/clang/dist/include/clang/Basic/Attr.td Mon May 29 16:25:46 2017 (r319142)
@@ -149,6 +149,9 @@ class ExprArgument<string name, bit opt
class FunctionArgument<string name, bit opt = 0, bit fake = 0> : Argument<name,
opt,
fake>;
+class NamedArgument<string name, bit opt = 0, bit fake = 0> : Argument<name,
+ opt,
+ fake>;
class TypeArgument<string name, bit opt = 0> : Argument<name, opt>;
class UnsignedArgument<string name, bit opt = 0> : Argument<name, opt>;
class VariadicUnsignedArgument<string name> : Argument<name, 1>;
@@ -1819,14 +1822,14 @@ def Unavailable : InheritableAttr {
def DiagnoseIf : InheritableAttr {
let Spellings = [GNU<"diagnose_if">];
- let Subjects = SubjectList<[Function]>;
+ let Subjects = SubjectList<[Function, ObjCMethod, ObjCProperty]>;
let Args = [ExprArgument<"Cond">, StringArgument<"Message">,
EnumArgument<"DiagnosticType",
"DiagnosticType",
["error", "warning"],
["DT_Error", "DT_Warning"]>,
BoolArgument<"ArgDependent", 0, /*fake*/ 1>,
- FunctionArgument<"Parent", 0, /*fake*/ 1>];
+ NamedArgument<"Parent", 0, /*fake*/ 1>];
let DuplicatesAllowedWhileMerging = 1;
let LateParsed = 1;
let AdditionalMembers = [{
Modified: vendor/clang/dist/include/clang/Basic/BuiltinsAMDGPU.def
==============================================================================
--- vendor/clang/dist/include/clang/Basic/BuiltinsAMDGPU.def Mon May 29 16:25:32 2017 (r319141)
+++ vendor/clang/dist/include/clang/Basic/BuiltinsAMDGPU.def Mon May 29 16:25:46 2017 (r319142)
@@ -36,6 +36,7 @@ BUILTIN(__builtin_amdgcn_workitem_id_z,
// Instruction builtins.
//===----------------------------------------------------------------------===//
BUILTIN(__builtin_amdgcn_s_getreg, "UiIi", "n")
+BUILTIN(__builtin_amdgcn_s_getpc, "LUi", "n")
BUILTIN(__builtin_amdgcn_s_waitcnt, "vIi", "n")
BUILTIN(__builtin_amdgcn_s_sendmsg, "vIiUi", "n")
BUILTIN(__builtin_amdgcn_s_sendmsghalt, "vIiUi", "n")
Modified: vendor/clang/dist/include/clang/Basic/BuiltinsPPC.def
==============================================================================
--- vendor/clang/dist/include/clang/Basic/BuiltinsPPC.def Mon May 29 16:25:32 2017 (r319141)
+++ vendor/clang/dist/include/clang/Basic/BuiltinsPPC.def Mon May 29 16:25:46 2017 (r319142)
@@ -420,6 +420,9 @@ BUILTIN(__builtin_vsx_xvtstdcsp, "V4UiV4
BUILTIN(__builtin_vsx_insertword, "V16UcV4UiV16UcIi", "")
BUILTIN(__builtin_vsx_extractuword, "V2ULLiV16UcIi", "")
+BUILTIN(__builtin_vsx_xxpermdi, "v.", "t")
+BUILTIN(__builtin_vsx_xxsldwi, "v.", "t")
+
// HTM builtins
BUILTIN(__builtin_tbegin, "UiUIi", "")
BUILTIN(__builtin_tend, "UiUIi", "")
Modified: vendor/clang/dist/include/clang/Basic/BuiltinsX86.def
==============================================================================
--- vendor/clang/dist/include/clang/Basic/BuiltinsX86.def Mon May 29 16:25:32 2017 (r319141)
+++ vendor/clang/dist/include/clang/Basic/BuiltinsX86.def Mon May 29 16:25:46 2017 (r319142)
@@ -1107,6 +1107,9 @@ TARGET_BUILTIN(__builtin_ia32_vpconflict
TARGET_BUILTIN(__builtin_ia32_vplzcntd_512_mask, "V16iV16iV16iUs", "", "avx512cd")
TARGET_BUILTIN(__builtin_ia32_vplzcntq_512_mask, "V8LLiV8LLiV8LLiUc", "", "avx512cd")
+TARGET_BUILTIN(__builtin_ia32_vpopcntd_512, "V16iV16i", "", "avx512vpopcntdq")
+TARGET_BUILTIN(__builtin_ia32_vpopcntq_512, "V8LLiV8LLi", "", "avx512vpopcntdq")
+
TARGET_BUILTIN(__builtin_ia32_vpermi2varhi128_mask, "V8sV8sV8sV8sUc", "", "avx512vl,avx512bw")
TARGET_BUILTIN(__builtin_ia32_vpermi2varhi256_mask, "V16sV16sV16sV16sUs", "", "avx512vl,avx512bw")
TARGET_BUILTIN(__builtin_ia32_vpermt2varhi128_mask, "V8sV8sV8sV8sUc", "", "avx512vl,avx512bw")
Modified: vendor/clang/dist/include/clang/Basic/DiagnosticOptions.def
==============================================================================
--- vendor/clang/dist/include/clang/Basic/DiagnosticOptions.def Mon May 29 16:25:32 2017 (r319141)
+++ vendor/clang/dist/include/clang/Basic/DiagnosticOptions.def Mon May 29 16:25:46 2017 (r319142)
@@ -87,6 +87,8 @@ VALUE_DIAGOPT(TemplateBacktraceLimit, 32
VALUE_DIAGOPT(ConstexprBacktraceLimit, 32, DefaultConstexprBacktraceLimit)
/// Limit number of times to perform spell checking.
VALUE_DIAGOPT(SpellCheckingLimit, 32, DefaultSpellCheckingLimit)
+/// Limit number of lines shown in a snippet.
+VALUE_DIAGOPT(SnippetLineLimit, 32, DefaultSnippetLineLimit)
VALUE_DIAGOPT(TabStop, 32, DefaultTabStop) /// The distance between tab stops.
/// Column limit for formatting message diagnostics, or 0 if unused.
Modified: vendor/clang/dist/include/clang/Basic/DiagnosticOptions.h
==============================================================================
--- vendor/clang/dist/include/clang/Basic/DiagnosticOptions.h Mon May 29 16:25:32 2017 (r319141)
+++ vendor/clang/dist/include/clang/Basic/DiagnosticOptions.h Mon May 29 16:25:46 2017 (r319142)
@@ -63,11 +63,15 @@ public:
enum TextDiagnosticFormat { Clang, MSVC, Vi };
// Default values.
- enum { DefaultTabStop = 8, MaxTabStop = 100,
+ enum {
+ DefaultTabStop = 8,
+ MaxTabStop = 100,
DefaultMacroBacktraceLimit = 6,
DefaultTemplateBacktraceLimit = 10,
DefaultConstexprBacktraceLimit = 10,
- DefaultSpellCheckingLimit = 50 };
+ DefaultSpellCheckingLimit = 50,
+ DefaultSnippetLineLimit = 1,
+ };
// Define simple diagnostic options (with no accessors).
#define DIAGOPT(Name, Bits, Default) unsigned Name : Bits;
Modified: vendor/clang/dist/include/clang/Basic/DiagnosticSemaKinds.td
==============================================================================
--- vendor/clang/dist/include/clang/Basic/DiagnosticSemaKinds.td Mon May 29 16:25:32 2017 (r319141)
+++ vendor/clang/dist/include/clang/Basic/DiagnosticSemaKinds.td Mon May 29 16:25:46 2017 (r319142)
@@ -537,10 +537,10 @@ def err_maybe_falloff_nonvoid_block : Er
def err_falloff_nonvoid_block : Error<
"control reaches end of non-void block">;
def warn_maybe_falloff_nonvoid_coroutine : Warning<
- "control may reach end of non-void coroutine">,
+ "control may reach end of coroutine; which is undefined behavior because the promise type %0 does not declare 'return_void()'">,
InGroup<ReturnType>;
def warn_falloff_nonvoid_coroutine : Warning<
- "control reaches end of non-void coroutine">,
+ "control reaches end of coroutine; which is undefined behavior because the promise type %0 does not declare 'return_void()'">,
InGroup<ReturnType>;
def warn_suggest_noreturn_function : Warning<
"%select{function|method}0 %1 could be declared with attribute 'noreturn'">,
@@ -1554,11 +1554,9 @@ def note_ivar_decl : Note<"instance vari
def note_bitfield_decl : Note<"bit-field is declared here">;
def note_implicit_param_decl : Note<"%0 is an implicit parameter">;
def note_member_synthesized_at : Note<
- "implicit %select{default constructor|copy constructor|move constructor|copy "
- "assignment operator|move assignment operator|destructor}0 for %1 first "
- "required here">;
-def note_inhctor_synthesized_at : Note<
- "inherited constructor for %0 first required here">;
+ "in implicit %select{default constructor|copy constructor|move constructor|"
+ "copy assignment operator|move assignment operator|destructor}0 for %1 "
+ "first required here">;
def err_missing_default_ctor : Error<
"%select{constructor for %1 must explicitly initialize the|"
"implicit default constructor for %1 must explicitly initialize the|"
@@ -2769,6 +2767,7 @@ def warn_attribute_wrong_decl_type : War
"|types and namespaces"
"|Objective-C interfaces"
"|methods and properties"
+ "|functions, methods, and properties"
"|struct or union"
"|struct, union or class"
"|types"
@@ -2883,6 +2882,10 @@ def warn_partial_message : Warning<"%0 i
def warn_partial_fwdclass_message : Warning<
"%0 may be partial because the receiver type is unknown">,
InGroup<UnguardedAvailability>, DefaultIgnore;
+def warn_at_available_unchecked_use : Warning<
+ "%select{@available|__builtin_available}0 does not guard availability here; "
+ "use if (%select{@available|__builtin_available}0) instead">,
+ InGroup<DiagGroup<"unsupported-availability-guard">>;
// Thread Safety Attributes
def warn_invalid_capability_name : Warning<
@@ -6298,6 +6301,8 @@ def warn_ambiguous_suitable_delete_funct
InGroup<DiagGroup<"ambiguous-delete">>;
def note_member_declared_here : Note<
"member %0 declared here">;
+def note_member_first_declared_here : Note<
+ "member %0 first declared here">;
def err_decrement_bool : Error<"cannot decrement expression of type bool">;
def warn_increment_bool : Warning<
"incrementing expression of type bool is deprecated and "
@@ -8009,10 +8014,13 @@ def err_block_on_nonlocal : Error<
def err_block_on_vm : Error<
"__block attribute not allowed on declaration with a variably modified type">;
-def err_shufflevector_non_vector : Error<
- "first two arguments to __builtin_shufflevector must be vectors">;
-def err_shufflevector_incompatible_vector : Error<
- "first two arguments to __builtin_shufflevector must have the same type">;
+def err_vec_builtin_non_vector : Error<
+ "first two arguments to %0 must be vectors">;
+def err_vec_builtin_incompatible_vector : Error<
+ "first two arguments to %0 must have the same type">;
+def err_vsx_builtin_nonconstant_argument : Error<
+ "argument %0 to %1 must be a 2-bit unsigned literal (i.e. 0, 1, 2 or 3)">;
+
def err_shufflevector_nonconstant_argument : Error<
"index for __builtin_shufflevector must be a constant integer">;
def err_shufflevector_argument_too_large : Error<
@@ -8899,8 +8907,6 @@ def note_equivalent_internal_linkage_dec
def note_redefinition_modules_same_file : Note<
"'%0' included multiple times, additional include site in header from module '%1'">;
-def note_redefinition_modules_same_file_modulemap : Note<
- "consider adding '%0' as part of '%1' definition">;
def note_redefinition_include_same_file : Note<
"'%0' included multiple times, additional include site here">;
}
@@ -8944,8 +8950,10 @@ def err_coroutine_promise_type_incomplet
def err_coroutine_type_missing_specialization : Error<
"this function cannot be a coroutine: missing definition of "
"specialization %q0">;
-def err_coroutine_promise_return_ill_formed : Error<
- "%0 declares both 'return_value' and 'return_void'">;
+def err_coroutine_promise_incompatible_return_functions : Error<
+ "the coroutine promise type %0 declares both 'return_value' and 'return_void'">;
+def err_coroutine_promise_requires_return_function : Error<
+ "the coroutine promise type %0 must declare either 'return_value' or 'return_void'">;
def note_coroutine_promise_implicit_await_transform_required_here : Note<
"call to 'await_transform' implicitly required by 'co_await' here">;
def note_coroutine_promise_suspend_implicitly_required : Note<
@@ -8958,11 +8966,19 @@ def warn_coroutine_promise_unhandled_exc
InGroup<CoroutineMissingUnhandledException>;
def err_coroutine_promise_get_return_object_on_allocation_failure : Error<
"%0: 'get_return_object_on_allocation_failure()' must be a static member function">;
+def err_seh_in_a_coroutine_with_cxx_exceptions : Error<
+ "cannot use SEH '__try' in a coroutine when C++ exceptions are enabled">;
def err_coroutine_promise_new_requires_nothrow : Error<
"%0 is required to have a non-throwing noexcept specification when the promise "
"type declares 'get_return_object_on_allocation_failure()'">;
def note_coroutine_promise_call_implicitly_required : Note<
"call to %0 implicitly required by coroutine function here">;
+def err_await_suspend_invalid_return_type : Error<
+ "the return type of 'await_suspend' is required to be 'void' or 'bool' (have %0)"
+>;
+def note_await_ready_no_bool_conversion : Note<
+ "the return type of 'await_ready' is required to be contextually convertible to 'bool'"
+>;
}
let CategoryName = "Documentation Issue" in {
Modified: vendor/clang/dist/include/clang/Basic/SourceManager.h
==============================================================================
--- vendor/clang/dist/include/clang/Basic/SourceManager.h Mon May 29 16:25:32 2017 (r319141)
+++ vendor/clang/dist/include/clang/Basic/SourceManager.h Mon May 29 16:25:46 2017 (r319142)
@@ -1399,10 +1399,9 @@ public:
/// specified by Loc.
///
/// If FilenameID is -1, it is considered to be unspecified.
- void AddLineNote(SourceLocation Loc, unsigned LineNo, int FilenameID);
void AddLineNote(SourceLocation Loc, unsigned LineNo, int FilenameID,
bool IsFileEntry, bool IsFileExit,
- bool IsSystemHeader, bool IsExternCHeader);
+ SrcMgr::CharacteristicKind FileKind);
/// \brief Determine if the source manager has a line table.
bool hasLineTable() const { return LineTable != nullptr; }
Modified: vendor/clang/dist/include/clang/Basic/SourceManagerInternals.h
==============================================================================
--- vendor/clang/dist/include/clang/Basic/SourceManagerInternals.h Mon May 29 16:25:32 2017 (r319141)
+++ vendor/clang/dist/include/clang/Basic/SourceManagerInternals.h Mon May 29 16:25:46 2017 (r319142)
@@ -102,8 +102,6 @@ public:
unsigned getNumFilenames() const { return FilenamesByID.size(); }
void AddLineNote(FileID FID, unsigned Offset,
- unsigned LineNo, int FilenameID);
- void AddLineNote(FileID FID, unsigned Offset,
unsigned LineNo, int FilenameID,
unsigned EntryExit, SrcMgr::CharacteristicKind FileKind);
Modified: vendor/clang/dist/include/clang/Basic/TemplateKinds.h
==============================================================================
--- vendor/clang/dist/include/clang/Basic/TemplateKinds.h Mon May 29 16:25:32 2017 (r319141)
+++ vendor/clang/dist/include/clang/Basic/TemplateKinds.h Mon May 29 16:25:46 2017 (r319142)
@@ -26,13 +26,21 @@ enum TemplateNameKind {
TNK_Function_template,
/// The name refers to a template whose specialization produces a
/// type. The template itself could be a class template, template
- /// template parameter, or C++0x template alias.
+ /// template parameter, or template alias.
TNK_Type_template,
/// The name refers to a variable template whose specialization produces a
/// variable.
TNK_Var_template,
- /// The name refers to a dependent template name. Whether the
- /// template name is assumed to refer to a type template or a
+ /// The name refers to a dependent template name:
+ /// \code
+ /// template<typename MetaFun, typename T1, typename T2> struct apply2 {
+ /// typedef typename MetaFun::template apply<T1, T2>::type type;
+ /// };
+ /// \endcode
+ ///
+ /// Here, "apply" is a dependent template name within the typename
+ /// specifier in the typedef. "apply" is a nested template, and
+ /// whether the template name is assumed to refer to a type template or a
/// function template depends on the context in which the template
/// name occurs.
TNK_Dependent_template_name
Modified: vendor/clang/dist/include/clang/Basic/XRayLists.h
==============================================================================
--- vendor/clang/dist/include/clang/Basic/XRayLists.h Mon May 29 16:25:32 2017 (r319141)
+++ vendor/clang/dist/include/clang/Basic/XRayLists.h Mon May 29 16:25:46 2017 (r319142)
@@ -37,6 +37,7 @@ public:
NONE,
ALWAYS,
NEVER,
+ ALWAYS_ARG1,
};
ImbueAttribute shouldImbueFunction(StringRef FunctionName) const;
Modified: vendor/clang/dist/include/clang/Driver/CC1Options.td
==============================================================================
--- vendor/clang/dist/include/clang/Driver/CC1Options.td Mon May 29 16:25:32 2017 (r319141)
+++ vendor/clang/dist/include/clang/Driver/CC1Options.td Mon May 29 16:25:46 2017 (r319142)
@@ -172,6 +172,8 @@ def disable_llvm_optzns : Flag<["-"], "d
def disable_lifetimemarkers : Flag<["-"], "disable-lifetime-markers">,
HelpText<"Disable lifetime-markers emission even when optimizations are "
"enabled">;
+def disable_O0_optnone : Flag<["-"], "disable-O0-optnone">,
+ HelpText<"Disable adding the optnone attribute to functions at O0">;
def disable_red_zone : Flag<["-"], "disable-red-zone">,
HelpText<"Do not emit code that uses the red zone.">;
def dwarf_column_info : Flag<["-"], "dwarf-column-info">,
@@ -359,6 +361,9 @@ def fconstexpr_backtrace_limit : Separat
HelpText<"Set the maximum number of entries to print in a constexpr evaluation backtrace (0 = no limit).">;
def fspell_checking_limit : Separate<["-"], "fspell-checking-limit">, MetaVarName<"<N>">,
HelpText<"Set the maximum number of times to perform spell checking on unrecognized identifiers (0 = no limit).">;
+def fcaret_diagnostics_max_lines :
+ Separate<["-"], "fcaret-diagnostics-max-lines">, MetaVarName<"<N>">,
+ HelpText<"Set the maximum number of source lines to show in a caret diagnostic">;
def fmessage_length : Separate<["-"], "fmessage-length">, MetaVarName<"<N>">,
HelpText<"Format message diagnostics so that they fit within N columns or fewer, when possible.">;
def verify : Flag<["-"], "verify">,
Modified: vendor/clang/dist/include/clang/Driver/Options.td
==============================================================================
--- vendor/clang/dist/include/clang/Driver/Options.td Mon May 29 16:25:32 2017 (r319141)
+++ vendor/clang/dist/include/clang/Driver/Options.td Mon May 29 16:25:46 2017 (r319142)
@@ -469,6 +469,7 @@ def arch__errors__fatal : Flag<["-"], "a
def arch : Separate<["-"], "arch">, Flags<[DriverOption]>;
def arch__only : Separate<["-"], "arch_only">;
def a : Joined<["-"], "a">;
+def autocomplete : Joined<["--"], "autocomplete=">;
def bind__at__load : Flag<["-"], "bind_at_load">;
def bundle__loader : Separate<["-"], "bundle_loader">;
def bundle : Flag<["-"], "bundle">;
@@ -1740,6 +1741,7 @@ def mno_avx : Flag<["-"], "mno-avx">, Gr
def mno_avx2 : Flag<["-"], "mno-avx2">, Group<m_x86_Features_Group>;
def mno_avx512f : Flag<["-"], "mno-avx512f">, Group<m_x86_Features_Group>;
def mno_avx512cd : Flag<["-"], "mno-avx512cd">, Group<m_x86_Features_Group>;
+def mno_avx512vpopcntdq : Flag<["-"], "mno-avx512vpopcntdq">, Group<m_x86_Features_Group>;
def mno_avx512er : Flag<["-"], "mno-avx512er">, Group<m_x86_Features_Group>;
def mno_avx512pf : Flag<["-"], "mno-avx512pf">, Group<m_x86_Features_Group>;
def mno_avx512dq : Flag<["-"], "mno-avx512dq">, Group<m_x86_Features_Group>;
@@ -1940,6 +1942,7 @@ def mavx : Flag<["-"], "mavx">, Group<m_
def mavx2 : Flag<["-"], "mavx2">, Group<m_x86_Features_Group>;
def mavx512f : Flag<["-"], "mavx512f">, Group<m_x86_Features_Group>;
def mavx512cd : Flag<["-"], "mavx512cd">, Group<m_x86_Features_Group>;
+def mavx512vpopcntdq : Flag<["-"], "mavx512vpopcntdq">, Group<m_x86_Features_Group>;
def mavx512er : Flag<["-"], "mavx512er">, Group<m_x86_Features_Group>;
def mavx512pf : Flag<["-"], "mavx512pf">, Group<m_x86_Features_Group>;
def mavx512dq : Flag<["-"], "mavx512dq">, Group<m_x86_Features_Group>;
Modified: vendor/clang/dist/include/clang/Format/Format.h
==============================================================================
--- vendor/clang/dist/include/clang/Format/Format.h Mon May 29 16:25:32 2017 (r319141)
+++ vendor/clang/dist/include/clang/Format/Format.h Mon May 29 16:25:46 2017 (r319142)
@@ -710,16 +710,35 @@ struct FormatStyle {
/// \endcode
bool BreakBeforeTernaryOperators;
- /// \brief Always break constructor initializers before commas and align
- /// the commas with the colon.
- /// \code
- /// true: false:
- /// SomeClass::Constructor() vs. SomeClass::Constructor() : a(a),
- /// : a(a) b(b),
- /// , b(b) c(c) {}
- /// , c(c) {}
- /// \endcode
- bool BreakConstructorInitializersBeforeComma;
+ /// \brief Different ways to break initializers.
+ enum BreakConstructorInitializersStyle
+ {
+ /// Break constructor initializers before the colon and after the commas.
+ /// \code
+ /// Constructor()
+ /// : initializer1(),
+ /// initializer2()
+ /// \endcode
+ BCIS_BeforeColon,
+ /// Break constructor initializers before the colon and commas, and align
+ /// the commas with the colon.
+ /// \code
+ /// Constructor()
+ /// : initializer1()
+ /// , initializer2()
+ /// \endcode
+ BCIS_BeforeComma,
+ /// Break constructor initializers after the colon and commas.
+ /// \code
+ /// Constructor() :
+ /// initializer1(),
+ /// initializer2()
+ /// \endcode
+ BCIS_AfterColon
+ };
+
+ /// \brief The constructor initializers style to use..
+ BreakConstructorInitializersStyle BreakConstructorInitializers;
/// \brief Break after each annotation on a field in Java files.
/// \code{.java}
@@ -1390,8 +1409,7 @@ struct FormatStyle {
BreakBeforeBinaryOperators == R.BreakBeforeBinaryOperators &&
BreakBeforeBraces == R.BreakBeforeBraces &&
BreakBeforeTernaryOperators == R.BreakBeforeTernaryOperators &&
- BreakConstructorInitializersBeforeComma ==
- R.BreakConstructorInitializersBeforeComma &&
+ BreakConstructorInitializers == R.BreakConstructorInitializers &&
BreakAfterJavaFieldAnnotations == R.BreakAfterJavaFieldAnnotations &&
BreakStringLiterals == R.BreakStringLiterals &&
ColumnLimit == R.ColumnLimit && CommentPragmas == R.CommentPragmas &&
Modified: vendor/clang/dist/include/clang/Frontend/ASTUnit.h
==============================================================================
--- vendor/clang/dist/include/clang/Frontend/ASTUnit.h Mon May 29 16:25:32 2017 (r319141)
+++ vendor/clang/dist/include/clang/Frontend/ASTUnit.h Mon May 29 16:25:46 2017 (r319142)
@@ -59,6 +59,10 @@ class TargetInfo;
class FrontendAction;
class ASTDeserializationListener;
+namespace vfs {
+class FileSystem;
+}
+
/// \brief Utility class for loading a ASTContext from an AST file.
///
class ASTUnit : public ModuleLoader {
@@ -420,7 +424,8 @@ private:
explicit ASTUnit(bool MainFileIsAST);
bool Parse(std::shared_ptr<PCHContainerOperations> PCHContainerOps,
- std::unique_ptr<llvm::MemoryBuffer> OverrideMainBuffer);
+ std::unique_ptr<llvm::MemoryBuffer> OverrideMainBuffer,
+ IntrusiveRefCntPtr<vfs::FileSystem> VFS);
struct ComputedPreamble {
llvm::MemoryBuffer *Buffer;
@@ -434,11 +439,13 @@ private:
PreambleEndsAtStartOfLine(PreambleEndsAtStartOfLine) {}
};
ComputedPreamble ComputePreamble(CompilerInvocation &Invocation,
- unsigned MaxLines);
+ unsigned MaxLines,
+ IntrusiveRefCntPtr<vfs::FileSystem> VFS);
std::unique_ptr<llvm::MemoryBuffer> getMainBufferWithPrecompiledPreamble(
std::shared_ptr<PCHContainerOperations> PCHContainerOps,
- const CompilerInvocation &PreambleInvocationIn, bool AllowRebuild = true,
+ const CompilerInvocation &PreambleInvocationIn,
+ IntrusiveRefCntPtr<vfs::FileSystem> VFS, bool AllowRebuild = true,
unsigned MaxLines = 0);
void RealizeTopLevelDeclsFromPreamble();
@@ -731,11 +738,17 @@ private:
/// of this translation unit should be precompiled, to improve the performance
/// of reparsing. Set to zero to disable preambles.
///
+ /// \param VFS - A vfs::FileSystem to be used for all file accesses. Note that
+ /// preamble is saved to a temporary directory on a RealFileSystem, so in order
+ /// for it to be loaded correctly, VFS should have access to it(i.e., be an
+ /// overlay over RealFileSystem).
+ ///
/// \returns \c true if a catastrophic failure occurred (which means that the
/// \c ASTUnit itself is invalid), or \c false otherwise.
bool LoadFromCompilerInvocation(
std::shared_ptr<PCHContainerOperations> PCHContainerOps,
- unsigned PrecompilePreambleAfterNParses);
+ unsigned PrecompilePreambleAfterNParses,
+ IntrusiveRefCntPtr<vfs::FileSystem> VFS);
public:
@@ -826,6 +839,11 @@ public:
/// (e.g. because the PCH could not be loaded), this accepts the ASTUnit
/// mainly to allow the caller to see the diagnostics.
///
+ /// \param VFS - A vfs::FileSystem to be used for all file accesses. Note that
+ /// preamble is saved to a temporary directory on a RealFileSystem, so in order
+ /// for it to be loaded correctly, VFS should have access to it(i.e., be an
+ /// overlay over RealFileSystem). RealFileSystem will be used if \p VFS is nullptr.
+ ///
// FIXME: Move OnlyLocalDecls, UseBumpAllocator to setters on the ASTUnit, we
// shouldn't need to specify them at construction time.
static ASTUnit *LoadFromCommandLine(
@@ -842,15 +860,23 @@ public:
bool AllowPCHWithCompilerErrors = false, bool SkipFunctionBodies = false,
bool UserFilesAreVolatile = false, bool ForSerialization = false,
llvm::Optional<StringRef> ModuleFormat = llvm::None,
- std::unique_ptr<ASTUnit> *ErrAST = nullptr);
+ std::unique_ptr<ASTUnit> *ErrAST = nullptr,
+ IntrusiveRefCntPtr<vfs::FileSystem> VFS = nullptr);
/// \brief Reparse the source files using the same command-line options that
/// were originally used to produce this translation unit.
///
+ /// \param VFS - A vfs::FileSystem to be used for all file accesses. Note that
+ /// preamble is saved to a temporary directory on a RealFileSystem, so in order
+ /// for it to be loaded correctly, VFS should give an access to this(i.e. be an
+ /// overlay over RealFileSystem). FileMgr->getVirtualFileSystem() will be used if
+ /// \p VFS is nullptr.
+ ///
/// \returns True if a failure occurred that causes the ASTUnit not to
/// contain any translation-unit information, false otherwise.
bool Reparse(std::shared_ptr<PCHContainerOperations> PCHContainerOps,
- ArrayRef<RemappedFile> RemappedFiles = None);
+ ArrayRef<RemappedFile> RemappedFiles = None,
+ IntrusiveRefCntPtr<vfs::FileSystem> VFS = nullptr);
/// \brief Perform code completion at the given file, line, and
/// column within this translation unit.
Modified: vendor/clang/dist/include/clang/Frontend/CodeGenOptions.def
==============================================================================
--- vendor/clang/dist/include/clang/Frontend/CodeGenOptions.def Mon May 29 16:25:32 2017 (r319141)
+++ vendor/clang/dist/include/clang/Frontend/CodeGenOptions.def Mon May 29 16:25:46 2017 (r319142)
@@ -53,6 +53,7 @@ CODEGENOPT(DisableLLVMPasses , 1, 0) ///
///< the pristine IR generated by the
///< frontend.
CODEGENOPT(DisableLifetimeMarkers, 1, 0) ///< Don't emit any lifetime markers
+CODEGENOPT(DisableO0ImplyOptNone , 1, 0) ///< Don't annonate function with optnone at O0
CODEGENOPT(ExperimentalNewPassManager, 1, 0) ///< Enables the new, experimental
///< pass manager.
CODEGENOPT(DisableRedZone , 1, 0) ///< Set when -mno-red-zone is enabled.
Modified: vendor/clang/dist/include/clang/Frontend/CompilerInvocation.h
==============================================================================
--- vendor/clang/dist/include/clang/Frontend/CompilerInvocation.h Mon May 29 16:25:32 2017 (r319141)
+++ vendor/clang/dist/include/clang/Frontend/CompilerInvocation.h Mon May 29 16:25:46 2017 (r319142)
@@ -225,6 +225,11 @@ IntrusiveRefCntPtr<vfs::FileSystem>
createVFSFromCompilerInvocation(const CompilerInvocation &CI,
DiagnosticsEngine &Diags);
+IntrusiveRefCntPtr<vfs::FileSystem>
+createVFSFromCompilerInvocation(const CompilerInvocation &CI,
+ DiagnosticsEngine &Diags,
+ IntrusiveRefCntPtr<vfs::FileSystem> BaseFS);
+
} // end namespace clang
#endif
Modified: vendor/clang/dist/include/clang/Lex/ModuleMap.h
==============================================================================
--- vendor/clang/dist/include/clang/Lex/ModuleMap.h Mon May 29 16:25:32 2017 (r319141)
+++ vendor/clang/dist/include/clang/Lex/ModuleMap.h Mon May 29 16:25:46 2017 (r319142)
@@ -257,6 +257,23 @@ private:
/// resolved.
Module *resolveModuleId(const ModuleId &Id, Module *Mod, bool Complain) const;
+ /// Resolve the given header directive to an actual header file.
+ ///
+ /// \param M The module in which we're resolving the header directive.
+ /// \param Header The header directive to resolve.
+ /// \param RelativePathName Filled in with the relative path name from the
+ /// module to the resolved header.
+ /// \return The resolved file, if any.
+ const FileEntry *resolveHeader(Module *M,
+ Module::UnresolvedHeaderDirective Header,
+ SmallVectorImpl<char> &RelativePathName);
+
+ /// Attempt to resolve the specified header directive as naming a builtin
+ /// header.
+ const FileEntry *
+ resolveAsBuiltinHeader(Module *M, Module::UnresolvedHeaderDirective Header,
+ SmallVectorImpl<char> &BuiltinPathName);
+
/// \brief Looks up the modules that \p File corresponds to.
///
/// If \p File represents a builtin header within Clang's builtin include
Modified: vendor/clang/dist/include/clang/Sema/AttributeList.h
==============================================================================
--- vendor/clang/dist/include/clang/Sema/AttributeList.h Mon May 29 16:25:32 2017 (r319141)
+++ vendor/clang/dist/include/clang/Sema/AttributeList.h Mon May 29 16:25:46 2017 (r319142)
@@ -915,6 +915,7 @@ enum AttributeDeclKind {
ExpectedTypeOrNamespace,
ExpectedObjectiveCInterface,
ExpectedMethodOrProperty,
+ ExpectedFunctionOrMethodOrProperty,
ExpectedStructOrUnion,
ExpectedStructOrUnionOrClass,
ExpectedType,
Modified: vendor/clang/dist/include/clang/Sema/ParsedTemplate.h
==============================================================================
--- vendor/clang/dist/include/clang/Sema/ParsedTemplate.h Mon May 29 16:25:32 2017 (r319141)
+++ vendor/clang/dist/include/clang/Sema/ParsedTemplate.h Mon May 29 16:25:46 2017 (r319142)
@@ -145,12 +145,15 @@ namespace clang {
/// expressions, or template names, and the source locations for important
/// tokens. All of the information about template arguments is allocated
/// directly after this structure.
- struct TemplateIdAnnotation {
+ struct TemplateIdAnnotation final
+ : private llvm::TrailingObjects<TemplateIdAnnotation,
+ ParsedTemplateArgument> {
+ friend TrailingObjects;
/// \brief The nested-name-specifier that precedes the template name.
CXXScopeSpec SS;
- /// TemplateKWLoc - The location of the template keyword within the
- /// source.
+ /// TemplateKWLoc - The location of the template keyword.
+ /// For e.g. typename T::template Y<U>
SourceLocation TemplateKWLoc;
/// TemplateNameLoc - The location of the template name within the
@@ -183,34 +186,56 @@ namespace clang {
/// \brief Retrieves a pointer to the template arguments
ParsedTemplateArgument *getTemplateArgs() {
- return reinterpret_cast<ParsedTemplateArgument *>(this + 1);
+ return getTrailingObjects<ParsedTemplateArgument>();
}
/// \brief Creates a new TemplateIdAnnotation with NumArgs arguments and
/// appends it to List.
static TemplateIdAnnotation *
- Allocate(unsigned NumArgs, SmallVectorImpl<TemplateIdAnnotation*> &List) {
- TemplateIdAnnotation *TemplateId
- = (TemplateIdAnnotation *)std::malloc(sizeof(TemplateIdAnnotation) +
- sizeof(ParsedTemplateArgument) * NumArgs);
- TemplateId->NumArgs = NumArgs;
-
- // Default-construct nested-name-specifier.
- new (&TemplateId->SS) CXXScopeSpec();
-
- // Default-construct parsed template arguments.
- ParsedTemplateArgument *TemplateArgs = TemplateId->getTemplateArgs();
- for (unsigned I = 0; I != NumArgs; ++I)
- new (TemplateArgs + I) ParsedTemplateArgument();
-
- List.push_back(TemplateId);
+ Create(CXXScopeSpec SS, SourceLocation TemplateKWLoc,
+ SourceLocation TemplateNameLoc, IdentifierInfo *Name,
+ OverloadedOperatorKind OperatorKind,
+ ParsedTemplateTy OpaqueTemplateName, TemplateNameKind TemplateKind,
+ SourceLocation LAngleLoc, SourceLocation RAngleLoc,
+ ArrayRef<ParsedTemplateArgument> TemplateArgs,
+ SmallVectorImpl<TemplateIdAnnotation *> &CleanupList) {
+
+ TemplateIdAnnotation *TemplateId = new (std::malloc(
+ totalSizeToAlloc<ParsedTemplateArgument>(TemplateArgs.size())))
+ TemplateIdAnnotation(SS, TemplateKWLoc, TemplateNameLoc, Name,
+ OperatorKind, OpaqueTemplateName, TemplateKind,
+ LAngleLoc, RAngleLoc, TemplateArgs);
+ CleanupList.push_back(TemplateId);
return TemplateId;
}
-
- void Destroy() {
- SS.~CXXScopeSpec();
+
+ void Destroy() {
+ std::for_each(
+ getTemplateArgs(), getTemplateArgs() + NumArgs,
+ [](ParsedTemplateArgument &A) { A.~ParsedTemplateArgument(); });
+ this->~TemplateIdAnnotation();
free(this);
}
+ private:
+ TemplateIdAnnotation(const TemplateIdAnnotation &) = delete;
+
+ TemplateIdAnnotation(CXXScopeSpec SS, SourceLocation TemplateKWLoc,
+ SourceLocation TemplateNameLoc, IdentifierInfo *Name,
+ OverloadedOperatorKind OperatorKind,
+ ParsedTemplateTy OpaqueTemplateName,
+ TemplateNameKind TemplateKind,
+ SourceLocation LAngleLoc, SourceLocation RAngleLoc,
+ ArrayRef<ParsedTemplateArgument> TemplateArgs) noexcept
+ : SS(SS), TemplateKWLoc(TemplateKWLoc),
+ TemplateNameLoc(TemplateNameLoc), Name(Name), Operator(OperatorKind),
+ Template(OpaqueTemplateName), Kind(TemplateKind),
+ LAngleLoc(LAngleLoc), RAngleLoc(RAngleLoc),
+ NumArgs(TemplateArgs.size()) {
+
+ std::uninitialized_copy(TemplateArgs.begin(), TemplateArgs.end(),
+ getTemplateArgs());
+ }
+ ~TemplateIdAnnotation() = default;
};
/// Retrieves the range of the given template parameter lists.
Modified: vendor/clang/dist/include/clang/Sema/ScopeInfo.h
==============================================================================
--- vendor/clang/dist/include/clang/Sema/ScopeInfo.h Mon May 29 16:25:32 2017 (r319141)
+++ vendor/clang/dist/include/clang/Sema/ScopeInfo.h Mon May 29 16:25:46 2017 (r319142)
@@ -388,6 +388,8 @@ public:
(HasBranchProtectedScope && HasBranchIntoScope));
}
+ bool isCoroutine() const { return !FirstCoroutineStmtLoc.isInvalid(); }
+
void setFirstCoroutineStmt(SourceLocation Loc, StringRef Keyword) {
assert(FirstCoroutineStmtLoc.isInvalid() &&
"first coroutine statement location already set");
Modified: vendor/clang/dist/include/clang/Sema/Sema.h
==============================================================================
--- vendor/clang/dist/include/clang/Sema/Sema.h Mon May 29 16:25:32 2017 (r319141)
+++ vendor/clang/dist/include/clang/Sema/Sema.h Mon May 29 16:25:46 2017 (r319142)
@@ -689,17 +689,37 @@ public:
class SynthesizedFunctionScope {
Sema &S;
Sema::ContextRAII SavedContext;
+ bool PushedCodeSynthesisContext = false;
public:
SynthesizedFunctionScope(Sema &S, DeclContext *DC)
- : S(S), SavedContext(S, DC)
- {
+ : S(S), SavedContext(S, DC) {
S.PushFunctionScope();
S.PushExpressionEvaluationContext(
Sema::ExpressionEvaluationContext::PotentiallyEvaluated);
+ if (auto *FD = dyn_cast<FunctionDecl>(DC))
+ FD->setWillHaveBody(true);
+ else
+ assert(isa<ObjCMethodDecl>(DC));
+ }
+
+ void addContextNote(SourceLocation UseLoc) {
+ assert(!PushedCodeSynthesisContext);
+
+ Sema::CodeSynthesisContext Ctx;
+ Ctx.Kind = Sema::CodeSynthesisContext::DefiningSynthesizedFunction;
+ Ctx.PointOfInstantiation = UseLoc;
+ Ctx.Entity = cast<Decl>(S.CurContext);
+ S.pushCodeSynthesisContext(Ctx);
+
+ PushedCodeSynthesisContext = true;
}
~SynthesizedFunctionScope() {
+ if (PushedCodeSynthesisContext)
+ S.popCodeSynthesisContext();
+ if (auto *FD = dyn_cast<FunctionDecl>(S.CurContext))
+ FD->setWillHaveBody(false);
S.PopExpressionEvaluationContext();
S.PopFunctionScopeInfo();
}
@@ -2727,7 +2747,7 @@ public:
/// of a function.
///
/// Returns true if any errors were emitted.
- bool diagnoseArgIndependentDiagnoseIfAttrs(const FunctionDecl *Function,
+ bool diagnoseArgIndependentDiagnoseIfAttrs(const NamedDecl *ND,
SourceLocation Loc);
/// Returns whether the given function's address can be taken or not,
@@ -6974,6 +6994,10 @@ public:
/// We are declaring an implicit special member function.
DeclaringSpecialMember,
+
+ /// We are defining a synthesized function (such as a defaulted special
+ /// member).
+ DefiningSynthesizedFunction,
} Kind;
/// \brief Was the enclosing context a non-instantiation SFINAE context?
@@ -10121,6 +10145,7 @@ private:
bool SemaBuiltinVAStartARM(CallExpr *Call);
bool SemaBuiltinUnorderedCompare(CallExpr *TheCall);
bool SemaBuiltinFPClassification(CallExpr *TheCall, unsigned NumArgs);
+ bool SemaBuiltinVSX(CallExpr *TheCall);
bool SemaBuiltinOSLogFormat(CallExpr *TheCall);
public:
Modified: vendor/clang/dist/include/clang/Tooling/CompilationDatabase.h
==============================================================================
--- vendor/clang/dist/include/clang/Tooling/CompilationDatabase.h Mon May 29 16:25:32 2017 (r319141)
+++ vendor/clang/dist/include/clang/Tooling/CompilationDatabase.h Mon May 29 16:25:46 2017 (r319142)
@@ -60,16 +60,6 @@ struct CompileCommand {
/// The output file associated with the command.
std::string Output;
-
- /// \brief An optional mapping from each file's path to its content for all
- /// files needed for the compilation that are not available via the file
- /// system.
- ///
- /// Note that a tool implementation is required to fall back to the file
- /// system if a source file is not provided in the mapped sources, as
- /// compilation databases will usually not provide all files in mapped sources
- /// for performance reasons.
- std::vector<std::pair<std::string, std::string> > MappedSources;
};
/// \brief Interface for compilation databases.
@@ -186,10 +176,11 @@ public:
/// the number of arguments before "--", if "--" was found in the argument
/// list.
/// \param Argv Points to the command line arguments.
+ /// \param ErrorMsg Contains error text if the function returns null pointer.
/// \param Directory The base directory used in the FixedCompilationDatabase.
- static FixedCompilationDatabase *loadFromCommandLine(int &Argc,
- const char *const *Argv,
- Twine Directory = ".");
+ static std::unique_ptr<FixedCompilationDatabase> loadFromCommandLine(
+ int &Argc, const char *const *Argv, std::string &ErrorMsg,
+ Twine Directory = ".");
/// \brief Constructs a compilation data base from a specified directory
/// and command line.
Modified: vendor/clang/dist/lib/AST/DeclBase.cpp
==============================================================================
--- vendor/clang/dist/lib/AST/DeclBase.cpp Mon May 29 16:25:32 2017 (r319141)
+++ vendor/clang/dist/lib/AST/DeclBase.cpp Mon May 29 16:25:46 2017 (r319142)
@@ -274,9 +274,17 @@ void Decl::setLexicalDeclContext(DeclCon
} else {
getMultipleDC()->LexicalDC = DC;
}
- Hidden = cast<Decl>(DC)->Hidden;
- if (Hidden && !isFromASTFile() && hasLocalOwningModuleStorage())
- setLocalOwningModule(cast<Decl>(DC)->getOwningModule());
+
*** DIFF OUTPUT TRUNCATED AT 1000 LINES ***
More information about the svn-src-all
mailing list