Author: dim
Date: Fri Aug  7 23:02:44 2015
New Revision: 286427
URL: https://svnweb.freebsd.org/changeset/base/286427

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

Added:
  vendor/clang/dist/include/clang/CodeGen/ObjectFilePCHContainerOperations.h   
(contents, props changed)
  vendor/clang/dist/lib/CodeGen/ObjectFilePCHContainerOperations.cpp   
(contents, props changed)
  vendor/clang/dist/test/Analysis/analyzer-checker-config.c   (contents, props 
changed)
  vendor/clang/dist/test/CodeGen/arm-long-calls.c   (contents, props changed)
  vendor/clang/dist/test/CodeGen/asm-attrs.c   (contents, props changed)
  vendor/clang/dist/test/CodeGen/available-externally-hidden.cpp   (contents, 
props changed)
  vendor/clang/dist/test/CodeGenCXX/cfi-ms-rtti.cpp   (contents, props changed)
  vendor/clang/dist/test/CodeGenCXX/eh-aggregate-copy-destroy.cpp   (contents, 
props changed)
  vendor/clang/dist/test/CodeGenCXX/eh-aggregated-inits-unwind.cpp   (contents, 
props changed)
  vendor/clang/dist/test/CodeGenCXX/eh-aggregated-inits.cpp   (contents, props 
changed)
  vendor/clang/dist/test/CodeGenCXX/pr24097.cpp   (contents, props changed)
  vendor/clang/dist/test/CodeGenCXX/sanitize-dtor-callback.cpp   (contents, 
props changed)
  vendor/clang/dist/test/CodeGenObjC/parameterized_classes.m
  vendor/clang/dist/test/Driver/cuda-options.cu
  vendor/clang/dist/test/Driver/ppc-dependent-options.cpp   (contents, props 
changed)
  vendor/clang/dist/test/Driver/ppc-endian.c   (contents, props changed)
  vendor/clang/dist/test/Index/annotate-parameterized-classes.m
  vendor/clang/dist/test/Index/comment-objc-parameterized-classes.m
  vendor/clang/dist/test/Index/complete-parameterized-classes.m
  vendor/clang/dist/test/Index/index-file.cu
  vendor/clang/dist/test/Modules/Inputs/diagnostics-aux-2.modulemap
  vendor/clang/dist/test/Modules/Inputs/merge-template-pattern-visibility/
  vendor/clang/dist/test/Modules/Inputs/merge-template-pattern-visibility/a.h   
(contents, props changed)
  vendor/clang/dist/test/Modules/Inputs/merge-template-pattern-visibility/b.h   
(contents, props changed)
  
vendor/clang/dist/test/Modules/Inputs/merge-template-pattern-visibility/module.modulemap
  vendor/clang/dist/test/Modules/Inputs/multiple-include/
  vendor/clang/dist/test/Modules/Inputs/multiple-include/a.h   (contents, props 
changed)
  vendor/clang/dist/test/Modules/Inputs/multiple-include/b.h   (contents, props 
changed)
  vendor/clang/dist/test/Modules/Inputs/multiple-include/c.h   (contents, props 
changed)
  vendor/clang/dist/test/Modules/Inputs/multiple-include/module.modulemap
  vendor/clang/dist/test/Modules/Inputs/multiple-include/x.h   (contents, props 
changed)
  vendor/clang/dist/test/Modules/merge-template-pattern-visibility.cpp   
(contents, props changed)
  vendor/clang/dist/test/Modules/multiple-include.cpp   (contents, props 
changed)
  vendor/clang/dist/test/Modules/pch_container.m
  vendor/clang/dist/test/OpenMP/cancel_codegen.cpp   (contents, props changed)
  vendor/clang/dist/test/PCH/objc_kindof.m
  vendor/clang/dist/test/PCH/objc_parameterized_classes.m
  vendor/clang/dist/test/Profile/Inputs/gcc-flag-compatibility.proftext
  vendor/clang/dist/test/Profile/gcc-flag-compatibility.c   (contents, props 
changed)
  vendor/clang/dist/test/Sema/inline-asm-validate-tmpl.cpp   (contents, props 
changed)
  vendor/clang/dist/test/Sema/tls_alignment.cpp   (contents, props changed)
  vendor/clang/dist/test/SemaCXX/cast-lvalue-to-rvalue-reference.cpp   
(contents, props changed)
  vendor/clang/dist/test/SemaObjC/kindof.m
  vendor/clang/dist/test/SemaObjC/parameterized_classes.m
  vendor/clang/dist/test/SemaObjC/parameterized_classes_collection_literal.m
  vendor/clang/dist/test/SemaObjC/parameterized_classes_subst.m
  vendor/clang/dist/test/SemaObjCXX/Inputs/nullability-pragmas-generics-1.h   
(contents, props changed)
  vendor/clang/dist/test/SemaObjCXX/parameterized_classes.mm
  vendor/clang/dist/test/SemaObjCXX/parameterized_classes_subst.mm
Modified:
  vendor/clang/dist/docs/ClangFormatStyleOptions.rst
  vendor/clang/dist/docs/CrossCompilation.rst
  vendor/clang/dist/docs/LanguageExtensions.rst
  vendor/clang/dist/docs/PCHInternals.rst
  vendor/clang/dist/docs/UsersManual.rst
  vendor/clang/dist/include/clang-c/BuildSystem.h
  vendor/clang/dist/include/clang/AST/ASTContext.h
  vendor/clang/dist/include/clang/AST/DataRecursiveASTVisitor.h
  vendor/clang/dist/include/clang/AST/DeclObjC.h
  vendor/clang/dist/include/clang/AST/ExprObjC.h
  vendor/clang/dist/include/clang/AST/RecursiveASTVisitor.h
  vendor/clang/dist/include/clang/AST/Type.h
  vendor/clang/dist/include/clang/AST/TypeLoc.h
  vendor/clang/dist/include/clang/ASTMatchers/ASTMatchers.h
  vendor/clang/dist/include/clang/ASTMatchers/ASTMatchersInternal.h
  vendor/clang/dist/include/clang/ASTMatchers/Dynamic/VariantValue.h
  vendor/clang/dist/include/clang/Basic/Attr.td
  vendor/clang/dist/include/clang/Basic/AttrDocs.td
  vendor/clang/dist/include/clang/Basic/BuiltinsPPC.def
  vendor/clang/dist/include/clang/Basic/BuiltinsX86.def
  vendor/clang/dist/include/clang/Basic/DeclNodes.td
  vendor/clang/dist/include/clang/Basic/DiagnosticCommonKinds.td
  vendor/clang/dist/include/clang/Basic/DiagnosticDriverKinds.td
  vendor/clang/dist/include/clang/Basic/DiagnosticGroups.td
  vendor/clang/dist/include/clang/Basic/DiagnosticParseKinds.td
  vendor/clang/dist/include/clang/Basic/DiagnosticSemaKinds.td
  vendor/clang/dist/include/clang/Basic/IdentifierTable.h
  vendor/clang/dist/include/clang/Basic/LangOptions.def
  vendor/clang/dist/include/clang/Basic/Sanitizers.h
  vendor/clang/dist/include/clang/Basic/TargetInfo.h
  vendor/clang/dist/include/clang/Basic/TokenKinds.def
  vendor/clang/dist/include/clang/Driver/Action.h
  vendor/clang/dist/include/clang/Driver/CLCompatOptions.td
  vendor/clang/dist/include/clang/Driver/Driver.h
  vendor/clang/dist/include/clang/Driver/Job.h
  vendor/clang/dist/include/clang/Driver/Options.td
  vendor/clang/dist/include/clang/Driver/SanitizerArgs.h
  vendor/clang/dist/include/clang/Driver/Types.def
  vendor/clang/dist/include/clang/Driver/Types.h
  vendor/clang/dist/include/clang/Format/Format.h
  vendor/clang/dist/include/clang/Frontend/CodeGenOptions.def
  vendor/clang/dist/include/clang/Frontend/CodeGenOptions.h
  vendor/clang/dist/include/clang/Frontend/CompilerInstance.h
  vendor/clang/dist/include/clang/Lex/ModuleMap.h
  vendor/clang/dist/include/clang/Lex/Preprocessor.h
  vendor/clang/dist/include/clang/Parse/Parser.h
  vendor/clang/dist/include/clang/Sema/CodeCompleteConsumer.h
  vendor/clang/dist/include/clang/Sema/DeclSpec.h
  vendor/clang/dist/include/clang/Sema/Sema.h
  vendor/clang/dist/include/clang/Sema/Template.h
  vendor/clang/dist/include/clang/Serialization/ASTBitCodes.h
  vendor/clang/dist/include/clang/Serialization/ASTReader.h
  vendor/clang/dist/include/clang/Serialization/ASTWriter.h
  vendor/clang/dist/include/clang/StaticAnalyzer/Core/CheckerRegistry.h
  vendor/clang/dist/lib/AST/ASTContext.cpp
  vendor/clang/dist/lib/AST/ASTDiagnostic.cpp
  vendor/clang/dist/lib/AST/ASTDumper.cpp
  vendor/clang/dist/lib/AST/ASTImporter.cpp
  vendor/clang/dist/lib/AST/Decl.cpp
  vendor/clang/dist/lib/AST/DeclBase.cpp
  vendor/clang/dist/lib/AST/DeclCXX.cpp
  vendor/clang/dist/lib/AST/DeclObjC.cpp
  vendor/clang/dist/lib/AST/DeclPrinter.cpp
  vendor/clang/dist/lib/AST/Expr.cpp
  vendor/clang/dist/lib/AST/ItaniumMangle.cpp
  vendor/clang/dist/lib/AST/Type.cpp
  vendor/clang/dist/lib/AST/TypeLoc.cpp
  vendor/clang/dist/lib/AST/TypePrinter.cpp
  vendor/clang/dist/lib/ASTMatchers/ASTMatchersInternal.cpp
  vendor/clang/dist/lib/ASTMatchers/Dynamic/Parser.cpp
  vendor/clang/dist/lib/ASTMatchers/Dynamic/VariantValue.cpp
  vendor/clang/dist/lib/Basic/FileManager.cpp
  vendor/clang/dist/lib/Basic/IdentifierTable.cpp
  vendor/clang/dist/lib/Basic/Module.cpp
  vendor/clang/dist/lib/Basic/Sanitizers.cpp
  vendor/clang/dist/lib/Basic/TargetInfo.cpp
  vendor/clang/dist/lib/Basic/Targets.cpp
  vendor/clang/dist/lib/CodeGen/BackendUtil.cpp
  vendor/clang/dist/lib/CodeGen/CGAtomic.cpp
  vendor/clang/dist/lib/CodeGen/CGBuiltin.cpp
  vendor/clang/dist/lib/CodeGen/CGCall.cpp
  vendor/clang/dist/lib/CodeGen/CGClass.cpp
  vendor/clang/dist/lib/CodeGen/CGDebugInfo.cpp
  vendor/clang/dist/lib/CodeGen/CGDebugInfo.h
  vendor/clang/dist/lib/CodeGen/CGDecl.cpp
  vendor/clang/dist/lib/CodeGen/CGException.cpp
  vendor/clang/dist/lib/CodeGen/CGExpr.cpp
  vendor/clang/dist/lib/CodeGen/CGObjC.cpp
  vendor/clang/dist/lib/CodeGen/CGObjCRuntime.cpp
  vendor/clang/dist/lib/CodeGen/CGOpenMPRuntime.cpp
  vendor/clang/dist/lib/CodeGen/CGOpenMPRuntime.h
  vendor/clang/dist/lib/CodeGen/CGRecordLayout.h
  vendor/clang/dist/lib/CodeGen/CGRecordLayoutBuilder.cpp
  vendor/clang/dist/lib/CodeGen/CGStmt.cpp
  vendor/clang/dist/lib/CodeGen/CGStmtOpenMP.cpp
  vendor/clang/dist/lib/CodeGen/CGVTables.cpp
  vendor/clang/dist/lib/CodeGen/CMakeLists.txt
  vendor/clang/dist/lib/CodeGen/CodeGenFunction.cpp
  vendor/clang/dist/lib/CodeGen/CodeGenFunction.h
  vendor/clang/dist/lib/CodeGen/CodeGenModule.cpp
  vendor/clang/dist/lib/CodeGen/CodeGenModule.h
  vendor/clang/dist/lib/CodeGen/ItaniumCXXABI.cpp
  vendor/clang/dist/lib/CodeGen/MicrosoftCXXABI.cpp
  vendor/clang/dist/lib/CodeGen/TargetInfo.cpp
  vendor/clang/dist/lib/Driver/Action.cpp
  vendor/clang/dist/lib/Driver/Driver.cpp
  vendor/clang/dist/lib/Driver/Job.cpp
  vendor/clang/dist/lib/Driver/MSVCToolChain.cpp
  vendor/clang/dist/lib/Driver/MinGWToolChain.cpp
  vendor/clang/dist/lib/Driver/SanitizerArgs.cpp
  vendor/clang/dist/lib/Driver/ToolChain.cpp
  vendor/clang/dist/lib/Driver/ToolChains.cpp
  vendor/clang/dist/lib/Driver/ToolChains.h
  vendor/clang/dist/lib/Driver/Tools.cpp
  vendor/clang/dist/lib/Driver/Types.cpp
  vendor/clang/dist/lib/Format/ContinuationIndenter.cpp
  vendor/clang/dist/lib/Format/Format.cpp
  vendor/clang/dist/lib/Format/FormatToken.cpp
  vendor/clang/dist/lib/Format/FormatToken.h
  vendor/clang/dist/lib/Format/TokenAnnotator.cpp
  vendor/clang/dist/lib/Format/UnwrappedLineParser.cpp
  vendor/clang/dist/lib/Frontend/ASTUnit.cpp
  vendor/clang/dist/lib/Frontend/CompilerInstance.cpp
  vendor/clang/dist/lib/Frontend/CompilerInvocation.cpp
  vendor/clang/dist/lib/Frontend/CreateInvocationFromCommandLine.cpp
  vendor/clang/dist/lib/Frontend/PCHContainerOperations.cpp
  vendor/clang/dist/lib/Headers/Intrin.h
  vendor/clang/dist/lib/Headers/altivec.h
  vendor/clang/dist/lib/Headers/avx512vlbwintrin.h
  vendor/clang/dist/lib/Lex/HeaderSearch.cpp
  vendor/clang/dist/lib/Lex/ModuleMap.cpp
  vendor/clang/dist/lib/Lex/PPMacroExpansion.cpp
  vendor/clang/dist/lib/Parse/ParseDecl.cpp
  vendor/clang/dist/lib/Parse/ParseDeclCXX.cpp
  vendor/clang/dist/lib/Parse/ParseExprCXX.cpp
  vendor/clang/dist/lib/Parse/ParseInit.cpp
  vendor/clang/dist/lib/Parse/ParseObjc.cpp
  vendor/clang/dist/lib/Parse/ParseTemplate.cpp
  vendor/clang/dist/lib/Parse/ParseTentative.cpp
  vendor/clang/dist/lib/Parse/Parser.cpp
  vendor/clang/dist/lib/Sema/CodeCompleteConsumer.cpp
  vendor/clang/dist/lib/Sema/DeclSpec.cpp
  vendor/clang/dist/lib/Sema/SemaCast.cpp
  vendor/clang/dist/lib/Sema/SemaChecking.cpp
  vendor/clang/dist/lib/Sema/SemaCodeComplete.cpp
  vendor/clang/dist/lib/Sema/SemaDecl.cpp
  vendor/clang/dist/lib/Sema/SemaDeclAttr.cpp
  vendor/clang/dist/lib/Sema/SemaDeclObjC.cpp
  vendor/clang/dist/lib/Sema/SemaExceptionSpec.cpp
  vendor/clang/dist/lib/Sema/SemaExpr.cpp
  vendor/clang/dist/lib/Sema/SemaExprMember.cpp
  vendor/clang/dist/lib/Sema/SemaExprObjC.cpp
  vendor/clang/dist/lib/Sema/SemaObjCProperty.cpp
  vendor/clang/dist/lib/Sema/SemaOpenMP.cpp
  vendor/clang/dist/lib/Sema/SemaOverload.cpp
  vendor/clang/dist/lib/Sema/SemaPseudoObject.cpp
  vendor/clang/dist/lib/Sema/SemaStmt.cpp
  vendor/clang/dist/lib/Sema/SemaStmtAsm.cpp
  vendor/clang/dist/lib/Sema/SemaTemplate.cpp
  vendor/clang/dist/lib/Sema/SemaTemplateInstantiate.cpp
  vendor/clang/dist/lib/Sema/SemaType.cpp
  vendor/clang/dist/lib/Sema/TreeTransform.h
  vendor/clang/dist/lib/Serialization/ASTCommon.cpp
  vendor/clang/dist/lib/Serialization/ASTReader.cpp
  vendor/clang/dist/lib/Serialization/ASTReaderDecl.cpp
  vendor/clang/dist/lib/Serialization/ASTReaderInternals.h
  vendor/clang/dist/lib/Serialization/ASTWriter.cpp
  vendor/clang/dist/lib/Serialization/ASTWriterDecl.cpp
  vendor/clang/dist/lib/StaticAnalyzer/Checkers/ObjCMissingSuperCallChecker.cpp
  vendor/clang/dist/lib/StaticAnalyzer/Core/CheckerRegistry.cpp
  vendor/clang/dist/lib/StaticAnalyzer/Core/MemRegion.cpp
  vendor/clang/dist/lib/StaticAnalyzer/Frontend/CheckerRegistration.cpp
  vendor/clang/dist/test/ARCMT/check-with-pch.m
  vendor/clang/dist/test/ARCMT/migrate-on-pch-and-module.m
  vendor/clang/dist/test/ARCMT/objcmt-with-pch.m
  vendor/clang/dist/test/ARCMT/objcmt-with-pch.m.result
  vendor/clang/dist/test/Analysis/blocks.m
  vendor/clang/dist/test/CMakeLists.txt
  vendor/clang/dist/test/CXX/class/class.mem/p13.cpp
  vendor/clang/dist/test/CXX/class/class.mem/p2.cpp
  vendor/clang/dist/test/CXX/dcl.dcl/dcl.spec/dcl.typedef/p2-0x.cpp
  vendor/clang/dist/test/CXX/dcl.decl/dcl.meaning/dcl.array/p3.cpp
  vendor/clang/dist/test/CXX/drs/dr19xx.cpp
  vendor/clang/dist/test/CXX/drs/dr1xx.cpp
  vendor/clang/dist/test/CXX/drs/dr3xx.cpp
  vendor/clang/dist/test/CXX/expr/expr.const/p2-0x.cpp
  vendor/clang/dist/test/CXX/expr/expr.unary/expr.unary.noexcept/cg.cpp
  vendor/clang/dist/test/CodeGen/align-systemz.c
  vendor/clang/dist/test/CodeGen/arm64-abi-vector.c
  vendor/clang/dist/test/CodeGen/arm64-arguments.c
  vendor/clang/dist/test/CodeGen/arm64-be-bitfield.c
  vendor/clang/dist/test/CodeGen/atomic-ops.c
  vendor/clang/dist/test/CodeGen/attr-target.c
  vendor/clang/dist/test/CodeGen/available-externally-suppress.c
  vendor/clang/dist/test/CodeGen/avx512vlbw-builtins.c
  vendor/clang/dist/test/CodeGen/big-atomic-ops.c
  vendor/clang/dist/test/CodeGen/bitfield-2.c
  vendor/clang/dist/test/CodeGen/builtins-ppc-altivec.c
  vendor/clang/dist/test/CodeGen/builtins-ppc-p8vector.c
  vendor/clang/dist/test/CodeGen/builtins-ppc-vsx.c
  vendor/clang/dist/test/CodeGen/debug-info-block.c
  vendor/clang/dist/test/CodeGen/exceptions-seh-finally.c
  vendor/clang/dist/test/CodeGen/exceptions-seh-leave.c
  vendor/clang/dist/test/CodeGen/exceptions-seh.c
  vendor/clang/dist/test/CodeGen/inline.c
  vendor/clang/dist/test/CodeGen/packed-nest-unpacked.c
  vendor/clang/dist/test/CodeGen/ppc64-struct-onefloat.c
  vendor/clang/dist/test/CodeGen/ppc64le-aggregates.c
  vendor/clang/dist/test/CodeGenCXX/2012-03-16-StoreAlign.cpp
  vendor/clang/dist/test/CodeGenCXX/cfi-vcall.cpp
  vendor/clang/dist/test/CodeGenCXX/debug-info-namespace.cpp
  vendor/clang/dist/test/CodeGenCXX/exceptions-seh-filter-captures.cpp
  vendor/clang/dist/test/CodeGenCXX/exceptions-seh.cpp
  vendor/clang/dist/test/CodeGenCXX/varargs.cpp
  vendor/clang/dist/test/CodeGenCXX/x86_64-arguments-avx.cpp
  vendor/clang/dist/test/CodeGenCXX/x86_64-arguments.cpp
  vendor/clang/dist/test/CodeGenObjCXX/mangle.mm
  vendor/clang/dist/test/Driver/apple-kext-mkernel.c
  vendor/clang/dist/test/Driver/arm-long-calls.c
  vendor/clang/dist/test/Driver/cl-eh.cpp
  vendor/clang/dist/test/Driver/clang_f_opts.c
  vendor/clang/dist/test/Driver/crash-report-modules.m
  vendor/clang/dist/test/Driver/crash-report.c
  vendor/clang/dist/test/Driver/fsanitize.c
  vendor/clang/dist/test/Driver/nacl-direct.c
  vendor/clang/dist/test/Driver/ppc-abi.c
  vendor/clang/dist/test/Driver/ppc-features.cpp
  vendor/clang/dist/test/Frontend/ast-codegen.c
  vendor/clang/dist/test/Headers/xmmintrin.c
  vendor/clang/dist/test/Index/TestClassForwardDecl.m
  vendor/clang/dist/test/Index/annotate-tokens.m
  vendor/clang/dist/test/Index/attributes-cuda.cu
  vendor/clang/dist/test/Index/c-index-api-loadTU-test.m
  vendor/clang/dist/test/Index/c-index-getCursor-test.m
  vendor/clang/dist/test/Index/complete-blocks.m
  vendor/clang/dist/test/Index/complete-ctor-inits.cpp
  vendor/clang/dist/test/Index/complete-method-decls.m
  vendor/clang/dist/test/Index/pch-with-module.m
  vendor/clang/dist/test/Index/print-mangled-name.cpp
  vendor/clang/dist/test/Modules/Inputs/diagnostics-aux.modulemap
  vendor/clang/dist/test/Modules/Inputs/explicit-build-prefer-self/map
  vendor/clang/dist/test/Modules/Inputs/module.map
  vendor/clang/dist/test/Modules/Inputs/namespaces-left.h
  vendor/clang/dist/test/Modules/Inputs/namespaces-right.h
  vendor/clang/dist/test/Modules/Inputs/namespaces-top.h
  vendor/clang/dist/test/Modules/Inputs/submodules-merge-defs/defs.h
  vendor/clang/dist/test/Modules/compiler_builtins_arm.m
  vendor/clang/dist/test/Modules/dependency-gen-inferred-map.m
  vendor/clang/dist/test/Modules/dependency-gen-pch.m
  vendor/clang/dist/test/Modules/diagnostics.modulemap
  vendor/clang/dist/test/Modules/irgen.c
  vendor/clang/dist/test/Modules/linkage-merge.m
  vendor/clang/dist/test/Modules/merge-target-features.cpp
  vendor/clang/dist/test/Modules/requires.m
  vendor/clang/dist/test/Modules/self-import-header.m
  vendor/clang/dist/test/Modules/signal.m
  vendor/clang/dist/test/Modules/submodules-merge-defs.cpp
  vendor/clang/dist/test/Modules/templates-2.mm
  vendor/clang/dist/test/Modules/templates.mm
  vendor/clang/dist/test/Modules/va_list.m
  vendor/clang/dist/test/OpenMP/atomic_capture_codegen.cpp
  vendor/clang/dist/test/OpenMP/atomic_read_codegen.c
  vendor/clang/dist/test/OpenMP/atomic_update_codegen.cpp
  vendor/clang/dist/test/OpenMP/atomic_write_codegen.c
  vendor/clang/dist/test/OpenMP/barrier_codegen.cpp
  vendor/clang/dist/test/OpenMP/cancellation_point_codegen.cpp
  vendor/clang/dist/test/OpenMP/critical_codegen.cpp
  vendor/clang/dist/test/OpenMP/flush_codegen.cpp
  vendor/clang/dist/test/OpenMP/for_codegen.cpp
  vendor/clang/dist/test/OpenMP/for_firstprivate_codegen.cpp
  vendor/clang/dist/test/OpenMP/for_lastprivate_codegen.cpp
  vendor/clang/dist/test/OpenMP/for_private_codegen.cpp
  vendor/clang/dist/test/OpenMP/for_reduction_codegen.cpp
  vendor/clang/dist/test/OpenMP/for_simd_codegen.cpp
  vendor/clang/dist/test/OpenMP/master_codegen.cpp
  vendor/clang/dist/test/OpenMP/ordered_codegen.cpp
  vendor/clang/dist/test/OpenMP/parallel_codegen.cpp
  vendor/clang/dist/test/OpenMP/parallel_copyin_codegen.cpp
  vendor/clang/dist/test/OpenMP/parallel_firstprivate_codegen.cpp
  vendor/clang/dist/test/OpenMP/parallel_for_codegen.cpp
  vendor/clang/dist/test/OpenMP/parallel_for_simd_codegen.cpp
  vendor/clang/dist/test/OpenMP/parallel_private_codegen.cpp
  vendor/clang/dist/test/OpenMP/parallel_reduction_codegen.cpp
  vendor/clang/dist/test/OpenMP/parallel_sections_codegen.cpp
  vendor/clang/dist/test/OpenMP/sections_codegen.cpp
  vendor/clang/dist/test/OpenMP/sections_firstprivate_codegen.cpp
  vendor/clang/dist/test/OpenMP/sections_lastprivate_codegen.cpp
  vendor/clang/dist/test/OpenMP/sections_private_codegen.cpp
  vendor/clang/dist/test/OpenMP/sections_reduction_codegen.cpp
  vendor/clang/dist/test/OpenMP/simd_codegen.cpp
  vendor/clang/dist/test/OpenMP/single_codegen.cpp
  vendor/clang/dist/test/OpenMP/single_firstprivate_codegen.cpp
  vendor/clang/dist/test/OpenMP/single_private_codegen.cpp
  vendor/clang/dist/test/OpenMP/task_codegen.cpp
  vendor/clang/dist/test/OpenMP/task_firstprivate_codegen.cpp
  vendor/clang/dist/test/OpenMP/task_if_codegen.cpp
  vendor/clang/dist/test/OpenMP/task_private_codegen.cpp
  vendor/clang/dist/test/OpenMP/taskgroup_codegen.cpp
  vendor/clang/dist/test/OpenMP/taskwait_codegen.cpp
  vendor/clang/dist/test/OpenMP/taskyield_codegen.cpp
  vendor/clang/dist/test/OpenMP/threadprivate_ast_print.cpp
  vendor/clang/dist/test/OpenMP/threadprivate_codegen.cpp
  vendor/clang/dist/test/OpenMP/threadprivate_messages.cpp
  vendor/clang/dist/test/PCH/__va_list_tag.c
  vendor/clang/dist/test/PCH/arc.m
  vendor/clang/dist/test/PCH/asm.c
  vendor/clang/dist/test/PCH/chain-external-defs.c
  vendor/clang/dist/test/PCH/chain-openmp-threadprivate.cpp
  vendor/clang/dist/test/PCH/chain-trivial.c
  vendor/clang/dist/test/PCH/cxx-ms-function-specialization-class-scope.cpp
  vendor/clang/dist/test/PCH/cxx1y-variable-templates.cpp
  vendor/clang/dist/test/PCH/external-defs.c
  vendor/clang/dist/test/PCH/floating-literal.c
  vendor/clang/dist/test/PCH/local_static.cpp
  vendor/clang/dist/test/PCH/pchpch.c
  vendor/clang/dist/test/PCH/reloc.c
  vendor/clang/dist/test/PCH/subscripting-literals.m
  vendor/clang/dist/test/PCH/target-options.c
  vendor/clang/dist/test/PCH/tentative-defs.c
  vendor/clang/dist/test/PCH/thread-local.cpp
  vendor/clang/dist/test/PCH/va_arg.c
  vendor/clang/dist/test/PCH/va_arg.cpp
  vendor/clang/dist/test/Parser/MicrosoftExtensions.c
  vendor/clang/dist/test/Parser/MicrosoftExtensions.cpp
  vendor/clang/dist/test/Parser/cxx-default-delete.cpp
  vendor/clang/dist/test/Parser/objc-error-qualified-implementation.m
  vendor/clang/dist/test/Parser/objcxx11-protocol-in-template.mm
  vendor/clang/dist/test/Parser/placeholder-recovery.m
  vendor/clang/dist/test/Sema/array-declared-as-incorrect-type.c
  vendor/clang/dist/test/Sema/dllimport.c
  vendor/clang/dist/test/Sema/enable_if.c
  vendor/clang/dist/test/Sema/mrtd.c
  vendor/clang/dist/test/Sema/shift.c
  vendor/clang/dist/test/Sema/struct-compat.c
  vendor/clang/dist/test/Sema/types.c
  vendor/clang/dist/test/Sema/var-redecl.c
  vendor/clang/dist/test/Sema/x86_64-linux-android.c
  vendor/clang/dist/test/SemaCXX/alias-template.cpp
  vendor/clang/dist/test/SemaCXX/array-bound-merge.cpp
  vendor/clang/dist/test/SemaCXX/constructor.cpp
  vendor/clang/dist/test/SemaCXX/cxx11-thread-local.cpp
  vendor/clang/dist/test/SemaCXX/cxx1y-generic-lambdas.cpp
  vendor/clang/dist/test/SemaCXX/cxx1y-variable-templates_in_class.cpp
  vendor/clang/dist/test/SemaCXX/cxx1y-variable-templates_top_level.cpp
  vendor/clang/dist/test/SemaCXX/dllimport.cpp
  vendor/clang/dist/test/SemaCXX/extern-c.cpp
  vendor/clang/dist/test/SemaCXX/lambda-expressions.cpp
  vendor/clang/dist/test/SemaCXX/lookup-member.cpp
  vendor/clang/dist/test/SemaCXX/struct-class-redecl.cpp
  vendor/clang/dist/test/SemaCXX/using-decl-1.cpp
  vendor/clang/dist/test/SemaObjC/block-type-safety.m
  vendor/clang/dist/test/SemaObjC/conditional-expr-8.m
  vendor/clang/dist/test/SemaObjC/conditional-expr.m
  vendor/clang/dist/test/SemaObjC/interface-1.m
  vendor/clang/dist/test/SemaObjC/objc2-merge-gc-attribue-decl.m
  vendor/clang/dist/test/SemaObjC/protocol-archane.m
  vendor/clang/dist/test/SemaObjC/protocol-warn.m
  vendor/clang/dist/test/SemaObjCXX/nullability-pragmas.mm
  vendor/clang/dist/test/SemaObjCXX/objc2-merge-gc-attribue-decl.mm
  vendor/clang/dist/test/SemaTemplate/injected-class-name.cpp
  vendor/clang/dist/test/Tooling/ms-asm-no-target.cpp
  vendor/clang/dist/test/lit.cfg
  vendor/clang/dist/tools/c-arcmt-test/Makefile
  vendor/clang/dist/tools/c-index-test/Makefile
  vendor/clang/dist/tools/clang-check/CMakeLists.txt
  vendor/clang/dist/tools/clang-check/ClangCheck.cpp
  vendor/clang/dist/tools/clang-check/Makefile
  vendor/clang/dist/tools/clang-format/clang-format.py
  vendor/clang/dist/tools/driver/CMakeLists.txt
  vendor/clang/dist/tools/driver/cc1_main.cpp
  vendor/clang/dist/tools/libclang/BuildSystem.cpp
  vendor/clang/dist/tools/libclang/CIndex.cpp
  vendor/clang/dist/tools/libclang/CIndexCodeCompletion.cpp
  vendor/clang/dist/tools/libclang/CMakeLists.txt
  vendor/clang/dist/tools/libclang/CXCursor.cpp
  vendor/clang/dist/tools/libclang/CursorVisitor.h
  vendor/clang/dist/tools/libclang/Makefile
  vendor/clang/dist/tools/libclang/libclang.exports
  vendor/clang/dist/unittests/ASTMatchers/ASTMatchersTest.h
  vendor/clang/dist/unittests/ASTMatchers/Dynamic/Makefile
  vendor/clang/dist/unittests/ASTMatchers/Dynamic/ParserTest.cpp
  vendor/clang/dist/unittests/ASTMatchers/Dynamic/RegistryTest.cpp
  vendor/clang/dist/unittests/ASTMatchers/Dynamic/VariantValueTest.cpp
  vendor/clang/dist/unittests/CMakeLists.txt
  vendor/clang/dist/unittests/Format/FormatTest.cpp
  vendor/clang/dist/unittests/Format/FormatTestJS.cpp
  vendor/clang/dist/unittests/Frontend/CMakeLists.txt
  vendor/clang/dist/unittests/libclang/LibclangTest.cpp
  vendor/clang/dist/unittests/libclang/Makefile
  vendor/clang/dist/utils/TableGen/ClangAttrEmitter.cpp
  vendor/clang/dist/utils/analyzer/CmpRuns.py
  vendor/clang/dist/utils/analyzer/SATestBuild.py
  vendor/clang/dist/www/cxx_dr_status.html

Modified: vendor/clang/dist/docs/ClangFormatStyleOptions.rst
==============================================================================
--- vendor/clang/dist/docs/ClangFormatStyleOptions.rst  Fri Aug  7 23:02:14 
2015        (r286426)
+++ vendor/clang/dist/docs/ClangFormatStyleOptions.rst  Fri Aug  7 23:02:44 
2015        (r286427)
@@ -275,6 +275,9 @@ the configuration (without a prefix: ``A
   * ``BS_Linux`` (in configuration: ``Linux``)
     Like ``Attach``, but break before braces on function, namespace and
     class definitions.
+  * ``BS_Mozilla`` (in configuration: ``Mozilla``)
+    Like ``Attach``, but break before braces on enum, function, and record
+    definitions.
   * ``BS_Stroustrup`` (in configuration: ``Stroustrup``)
     Like ``Attach``, but break before function definitions, and 'else'.
   * ``BS_Allman`` (in configuration: ``Allman``)
@@ -394,6 +397,12 @@ the configuration (without a prefix: ``A
     (https://developers.google.com/protocol-buffers/).
 
 
+**MacroBlockBegin** (``std::string``)
+  A regular expression matching macros that start a block.
+
+**MacroBlockEnd** (``std::string``)
+  A regular expression matching macros that end a block.
+
 **MaxEmptyLinesToKeep** (``unsigned``)
   The maximum number of consecutive empty lines to keep.
 

Modified: vendor/clang/dist/docs/CrossCompilation.rst
==============================================================================
--- vendor/clang/dist/docs/CrossCompilation.rst Fri Aug  7 23:02:14 2015        
(r286426)
+++ vendor/clang/dist/docs/CrossCompilation.rst Fri Aug  7 23:02:44 2015        
(r286427)
@@ -92,7 +92,7 @@ will be assumed, which sets the defaults
 The system name is generally the OS (linux, darwin), but could be special
 like the bare-metal "none".
 
-When a parameter is not important, they can be omitted, or you can
+When a parameter is not important, it can be omitted, or you can
 choose ``unknown`` and the defaults will be used. If you choose a parameter
 that Clang doesn't know, like ``blerg``, it'll ignore and assume
 ``unknown``, which is not always desired, so be careful.

Modified: vendor/clang/dist/docs/LanguageExtensions.rst
==============================================================================
--- vendor/clang/dist/docs/LanguageExtensions.rst       Fri Aug  7 23:02:14 
2015        (r286426)
+++ vendor/clang/dist/docs/LanguageExtensions.rst       Fri Aug  7 23:02:44 
2015        (r286427)
@@ -1991,10 +1991,10 @@ compile time. Partial unrolling replicat
 reduces the trip count.
 
 If ``unroll(full)`` is specified the unroller will attempt to fully unroll the
-loop if the trip count is known at compile time. If the loop count is not known
-or the fully unrolled code size is greater than the limit specified by the
-`-pragma-unroll-threshold` command line option the loop will be partially
-unrolled subject to the same limit.
+loop if the trip count is known at compile time. If the fully unrolled code 
size
+is greater than an internal limit the loop will be partially unrolled up to 
this
+limit. If the loop count is not known at compile time the loop will not be
+unrolled.
 
 .. code-block:: c++
 
@@ -2006,7 +2006,7 @@ unrolled subject to the same limit.
 The unroll count can be specified explicitly with ``unroll_count(_value_)`` 
where
 _value_ is a positive integer. If this value is greater than the trip count the
 loop will be fully unrolled. Otherwise the loop is partially unrolled subject
-to the `-pragma-unroll-threshold` limit.
+to the same code size limit as with ``unroll(full)``.
 
 .. code-block:: c++
 

Modified: vendor/clang/dist/docs/PCHInternals.rst
==============================================================================
--- vendor/clang/dist/docs/PCHInternals.rst     Fri Aug  7 23:02:14 2015        
(r286426)
+++ vendor/clang/dist/docs/PCHInternals.rst     Fri Aug  7 23:02:44 2015        
(r286427)
@@ -124,20 +124,30 @@ section <pchinternals-chained>`.
 AST File Contents
 -----------------
 
-Clang's AST files are organized into several different blocks, each of which
-contains the serialized representation of a part of Clang's internal
+An AST file produced by clang is an object file container with a ``clangast``
+(COFF) or ``__clangast`` (ELF and Mach-O) section containing the serialized 
AST.
+Other target-specific sections in the object file container are used to hold
+debug information for the data types defined in the AST.  Tools built on top of
+libclang that do not need debug information may also produce raw AST files that
+only contain the serialized AST.
+
+The ``clangast`` section is organized into several different blocks, each of
+which contains the serialized representation of a part of Clang's internal
 representation.  Each of the blocks corresponds to either a block or a record
 within `LLVM's bitstream format <http://llvm.org/docs/BitCodeFormat.html>`_.
 The contents of each of these logical blocks are described below.
 
 .. image:: PCHLayout.png
 
-For a given AST file, the `llvm-bcanalyzer
-<http://llvm.org/docs/CommandGuide/llvm-bcanalyzer.html>`_ utility can be used
-to examine the actual structure of the bitstream for the AST file.  This
-information can be used both to help understand the structure of the AST file
-and to isolate areas where AST files can still be optimized, e.g., through the
-introduction of abbreviations.
+The ``llvm-objdump`` utility provides a ``-raw-clang-ast`` option to extract 
the
+binary contents of the AST section from an object file container.
+
+The `llvm-bcanalyzer <http://llvm.org/docs/CommandGuide/llvm-bcanalyzer.html>`_
+utility can be used to examine the actual structure of the bitstream for the 
AST
+section.  This information can be used both to help understand the structure of
+the AST section and to isolate areas where the AST representation can still be
+optimized, e.g., through the introduction of abbreviations.
+
 
 Metadata Block
 ^^^^^^^^^^^^^^

Modified: vendor/clang/dist/docs/UsersManual.rst
==============================================================================
--- vendor/clang/dist/docs/UsersManual.rst      Fri Aug  7 23:02:14 2015        
(r286426)
+++ vendor/clang/dist/docs/UsersManual.rst      Fri Aug  7 23:02:44 2015        
(r286427)
@@ -1488,6 +1488,45 @@ instrumentation:
    profile. As you make changes to your code, clang may no longer be able to
    use the profile data. It will warn you when this happens.
 
+Profile generation and use can also be controlled by the GCC-compatible flags
+``-fprofile-generate`` and ``-fprofile-use``. Although these flags are
+semantically equivalent to their GCC counterparts, they *do not* handle
+GCC-compatible profiles. They are only meant to implement GCC's semantics
+with respect to profile creation and use.
+
+.. option:: -fprofile-generate[=<dirname>]
+
+  Without any other arguments, ``-fprofile-generate`` behaves identically to
+  ``-fprofile-instr-generate``. When given a directory name, it generates the
+  profile file ``default.profraw`` in the directory named ``dirname``. If
+  ``dirname`` does not exist, it will be created at runtime. The environment
+  variable ``LLVM_PROFILE_FILE`` can be used to override the directory and
+  filename for the profile file at runtime. For example,
+
+  .. code-block:: console
+
+    $ clang++ -O2 -fprofile-generate=yyy/zzz code.cc -o code
+
+  When ``code`` is executed, the profile will be written to the file
+  ``yyy/zzz/default.profraw``. This can be altered at runtime via the
+  ``LLVM_PROFILE_FILE`` environment variable:
+
+  .. code-block:: console
+
+    $ LLVM_PROFILE_FILE=/tmp/myprofile/code.profraw ./code
+
+  The above invocation will produce the profile file
+  ``/tmp/myprofile/code.profraw`` instead of ``yyy/zzz/default.profraw``.
+  Notice that ``LLVM_PROFILE_FILE`` overrides the directory *and* the file
+  name for the profile file.
+
+.. option:: -fprofile-use[=<pathname>]
+
+  Without any other arguments, ``-fprofile-use`` behaves identically to
+  ``-fprofile-instr-use``. Otherwise, if ``pathname`` is the full path to a
+  profile file, it reads from that file. If ``pathname`` is a directory name,
+  it reads from ``pathname/default.profdata``.
+
 
 Controlling Size of Debug Information
 -------------------------------------

Modified: vendor/clang/dist/include/clang-c/BuildSystem.h
==============================================================================
--- vendor/clang/dist/include/clang-c/BuildSystem.h     Fri Aug  7 23:02:14 
2015        (r286426)
+++ vendor/clang/dist/include/clang-c/BuildSystem.h     Fri Aug  7 23:02:44 
2015        (r286427)
@@ -73,7 +73,7 @@ clang_VirtualFileOverlay_setCaseSensitiv
  *
  * \param options is reserved, always pass 0.
  * \param out_buffer_ptr pointer to receive the buffer pointer, which should be
- * disposed using \c free().
+ * disposed using \c clang_free().
  * \param out_buffer_size pointer to receive the buffer size.
  * \returns 0 for success, non-zero to indicate an error.
  */
@@ -83,6 +83,14 @@ clang_VirtualFileOverlay_writeToBuffer(C
                                        unsigned *out_buffer_size);
 
 /**
+ * \brief free memory allocated by libclang, such as the buffer returned by
+ * \c CXVirtualFileOverlay() or \c clang_ModuleMapDescriptor_writeToBuffer().
+ *
+ * \param buffer memory pointer to free.
+ */
+CINDEX_LINKAGE void clang_free(void *buffer);
+
+/**
  * \brief Dispose a \c CXVirtualFileOverlay object.
  */
 CINDEX_LINKAGE void clang_VirtualFileOverlay_dispose(CXVirtualFileOverlay);
@@ -122,7 +130,7 @@ clang_ModuleMapDescriptor_setUmbrellaHea
  *
  * \param options is reserved, always pass 0.
  * \param out_buffer_ptr pointer to receive the buffer pointer, which should be
- * disposed using \c free().
+ * disposed using \c clang_free().
  * \param out_buffer_size pointer to receive the buffer size.
  * \returns 0 for success, non-zero to indicate an error.
  */

Modified: vendor/clang/dist/include/clang/AST/ASTContext.h
==============================================================================
--- vendor/clang/dist/include/clang/AST/ASTContext.h    Fri Aug  7 23:02:14 
2015        (r286426)
+++ vendor/clang/dist/include/clang/AST/ASTContext.h    Fri Aug  7 23:02:44 
2015        (r286427)
@@ -236,6 +236,12 @@ class ASTContext : public RefCountedBase
   QualType ObjCClassRedefinitionType;
   QualType ObjCSelRedefinitionType;
 
+  /// The identifier 'NSObject'.
+  IdentifierInfo *NSObjectName = nullptr;
+
+  /// The identifier 'NSCopying'.
+  IdentifierInfo *NSCopyingName = nullptr;
+
   QualType ObjCConstantStringType;
   mutable RecordDecl *CFConstantStringTypeDecl;
   
@@ -1189,9 +1195,15 @@ public:
   QualType getObjCInterfaceType(const ObjCInterfaceDecl *Decl,
                                 ObjCInterfaceDecl *PrevDecl = nullptr) const;
 
+  /// Legacy interface: cannot provide type arguments or __kindof.
   QualType getObjCObjectType(QualType Base,
                              ObjCProtocolDecl * const *Protocols,
                              unsigned NumProtocols) const;
+
+  QualType getObjCObjectType(QualType Base,
+                             ArrayRef<QualType> typeArgs,
+                             ArrayRef<ObjCProtocolDecl *> protocols,
+                             bool isKindOf) const;
   
   bool ObjCObjectAdoptsQTypeProtocols(QualType QT, ObjCInterfaceDecl *Decl);
   /// QIdProtocolsAdoptObjCObjectProtocols - Checks that protocols in
@@ -1351,6 +1363,24 @@ public:
     ObjCSelRedefinitionType = RedefType;
   }
 
+  /// Retrieve the identifier 'NSObject'.
+  IdentifierInfo *getNSObjectName() {
+    if (!NSObjectName) {
+      NSObjectName = &Idents.get("NSObject");
+    }
+
+    return NSObjectName;
+  }
+
+  /// Retrieve the identifier 'NSCopying'.
+  IdentifierInfo *getNSCopyingName() {
+    if (!NSCopyingName) {
+      NSCopyingName = &Idents.get("NSCopying");
+    }
+
+    return NSCopyingName;
+  }
+
   /// \brief Retrieve the Objective-C "instancetype" type, if already known;
   /// otherwise, returns a NULL type;
   QualType getObjCInstanceType() {

Modified: vendor/clang/dist/include/clang/AST/DataRecursiveASTVisitor.h
==============================================================================
--- vendor/clang/dist/include/clang/AST/DataRecursiveASTVisitor.h       Fri Aug 
 7 23:02:14 2015        (r286426)
+++ vendor/clang/dist/include/clang/AST/DataRecursiveASTVisitor.h       Fri Aug 
 7 23:02:44 2015        (r286427)
@@ -940,6 +940,9 @@ DEF_TRAVERSE_TYPE(ObjCObjectType, {
   // type is itself.
   if (T->getBaseType().getTypePtr() != T)
     TRY_TO(TraverseType(T->getBaseType()));
+  for (auto typeArg : T->getTypeArgsAsWritten()) {
+    TRY_TO(TraverseType(typeArg));
+  }
 })
 
 DEF_TRAVERSE_TYPE(ObjCObjectPointerType,
@@ -1166,6 +1169,8 @@ DEF_TRAVERSE_TYPELOC(ObjCObjectType, {
   // type is itself.
   if (TL.getTypePtr()->getBaseType().getTypePtr() != TL.getTypePtr())
     TRY_TO(TraverseTypeLoc(TL.getBaseLoc()));
+  for (unsigned i = 0, n = TL.getNumTypeArgs(); i != n; ++i)
+    TRY_TO(TraverseTypeLoc(TL.getTypeArgTInfo(i)->getTypeLoc()));
 })
 
 DEF_TRAVERSE_TYPELOC(ObjCObjectPointerType,
@@ -1307,7 +1312,13 @@ DEF_TRAVERSE_DECL(ObjCCompatibleAliasDec
                                            })
 
 DEF_TRAVERSE_DECL(ObjCCategoryDecl, {// FIXME: implement
-                                    })
+  if (ObjCTypeParamList *typeParamList = D->getTypeParamList()) {
+    for (auto typeParam : *typeParamList) {
+      TRY_TO(TraverseObjCTypeParamDecl(typeParam));
+    }
+  }
+  return true;
+})
 
 DEF_TRAVERSE_DECL(ObjCCategoryImplDecl, {// FIXME: implement
                                         })
@@ -1316,7 +1327,16 @@ DEF_TRAVERSE_DECL(ObjCImplementationDecl
                                           })
 
 DEF_TRAVERSE_DECL(ObjCInterfaceDecl, {// FIXME: implement
-                                     })
+  if (ObjCTypeParamList *typeParamList = D->getTypeParamListAsWritten()) {
+    for (auto typeParam : *typeParamList) {
+      TRY_TO(TraverseObjCTypeParamDecl(typeParam));
+    }
+  }
+
+  if (TypeSourceInfo *superTInfo = D->getSuperClassTInfo()) {
+    TRY_TO(TraverseTypeLoc(superTInfo->getTypeLoc()));
+  }
+})
 
 DEF_TRAVERSE_DECL(ObjCProtocolDecl, {// FIXME: implement
                                     })
@@ -1335,6 +1355,15 @@ DEF_TRAVERSE_DECL(ObjCMethodDecl, {
   return true;
 })
 
+DEF_TRAVERSE_DECL(ObjCTypeParamDecl, {
+  if (D->hasExplicitBound()) {
+    TRY_TO(TraverseTypeLoc(D->getTypeSourceInfo()->getTypeLoc()));
+    // We shouldn't traverse D->getTypeForDecl(); it's a result of
+    // declaring the type alias, not something that was written in the
+    // source.
+  }
+})
+
 DEF_TRAVERSE_DECL(ObjCPropertyDecl, {
   if (D->getTypeSourceInfo())
     TRY_TO(TraverseTypeLoc(D->getTypeSourceInfo()->getTypeLoc()));

Modified: vendor/clang/dist/include/clang/AST/DeclObjC.h
==============================================================================
--- vendor/clang/dist/include/clang/AST/DeclObjC.h      Fri Aug  7 23:02:14 
2015        (r286426)
+++ vendor/clang/dist/include/clang/AST/DeclObjC.h      Fri Aug  7 23:02:44 
2015        (r286427)
@@ -332,10 +332,14 @@ public:
   SourceRange getReturnTypeSourceRange() const;
 
   /// \brief Determine the type of an expression that sends a message to this
-  /// function.
-  QualType getSendResultType() const {
-    return getReturnType().getNonLValueExprType(getASTContext());
-  }
+  /// function. This replaces the type parameters with the types they would
+  /// get if the receiver was parameterless (e.g. it may replace the type
+  /// parameter with 'id').
+  QualType getSendResultType() const;
+
+  /// Determine the type of an expression that sends a message to this
+  /// function with the given receiver type.
+  QualType getSendResultType(QualType receiverType) const;
 
   TypeSourceInfo *getReturnTypeSourceInfo() const { return ReturnTInfo; }
   void setReturnTypeSourceInfo(TypeSourceInfo *TInfo) { ReturnTInfo = TInfo; }
@@ -399,6 +403,11 @@ public:
   /// have already been created.
   void createImplicitParams(ASTContext &Context, const ObjCInterfaceDecl *ID);
 
+  /// \return the type for \c self and set \arg selfIsPseudoStrong and
+  /// \arg selfIsConsumed accordingly.
+  QualType getSelfType(ASTContext &Context, const ObjCInterfaceDecl *OID,
+                       bool &selfIsPseudoStrong, bool &selfIsConsumed);
+
   ImplicitParamDecl * getSelfDecl() const { return SelfDecl; }
   void setSelfDecl(ImplicitParamDecl *SD) { SelfDecl = SD; }
   ImplicitParamDecl * getCmdDecl() const { return CmdDecl; }
@@ -501,6 +510,183 @@ public:
   friend class ASTDeclWriter;
 };
 
+/// Describes the variance of a given generic parameter.
+enum class ObjCTypeParamVariance : uint8_t {
+  /// The parameter is invariant: must match exactly.
+  Invariant,
+  /// The parameter is covariant, e.g., X<T> is a subtype of X<U> when
+  /// the type parameter is covariant and T is a subtype of U.
+  Covariant,
+  /// The parameter is contravariant, e.g., X<T> is a subtype of X<U>
+  /// when the type parameter is covariant and U is a subtype of T.
+  Contravariant,
+};
+
+/// Represents the declaration of an Objective-C type parameter.
+///
+/// \code
+/// @interface NSDictionary<Key : id<NSCopying>, Value>
+/// @end
+/// \endcode
+///
+/// In the example above, both \c Key and \c Value are represented by
+/// \c ObjCTypeParamDecl. \c Key has an explicit bound of \c id<NSCopying>,
+/// while \c Value gets an implicit bound of \c id.
+///
+/// Objective-C type parameters are typedef-names in the grammar,
+class ObjCTypeParamDecl : public TypedefNameDecl {
+  void anchor() override;
+
+  /// Index of this type parameter in the type parameter list.
+  unsigned Index : 14;
+
+  /// The variance of the type parameter.
+  unsigned Variance : 2;
+
+  /// The location of the variance, if any.
+  SourceLocation VarianceLoc;
+
+  /// The location of the ':', which will be valid when the bound was
+  /// explicitly specified.
+  SourceLocation ColonLoc;
+
+  ObjCTypeParamDecl(ASTContext &ctx, DeclContext *dc, 
+                    ObjCTypeParamVariance variance, SourceLocation varianceLoc,
+                    unsigned index,
+                    SourceLocation nameLoc, IdentifierInfo *name,
+                    SourceLocation colonLoc, TypeSourceInfo *boundInfo)
+    : TypedefNameDecl(ObjCTypeParam, ctx, dc, nameLoc, nameLoc, name,
+                      boundInfo),
+      Index(index), Variance(static_cast<unsigned>(variance)),
+      VarianceLoc(varianceLoc), ColonLoc(colonLoc) { }
+
+public:
+  static ObjCTypeParamDecl *Create(ASTContext &ctx, DeclContext *dc,
+                                   ObjCTypeParamVariance variance,
+                                   SourceLocation varianceLoc,
+                                   unsigned index,
+                                   SourceLocation nameLoc,
+                                   IdentifierInfo *name,
+                                   SourceLocation colonLoc,
+                                   TypeSourceInfo *boundInfo);
+  static ObjCTypeParamDecl *CreateDeserialized(ASTContext &ctx, unsigned ID);
+
+  SourceRange getSourceRange() const override LLVM_READONLY;
+
+  /// Determine the variance of this type parameter.
+  ObjCTypeParamVariance getVariance() const {
+    return static_cast<ObjCTypeParamVariance>(Variance);
+  }
+
+  /// Set the variance of this type parameter.
+  void setVariance(ObjCTypeParamVariance variance) {
+    Variance = static_cast<unsigned>(variance);
+  }
+
+  /// Retrieve the location of the variance keyword.
+  SourceLocation getVarianceLoc() const { return VarianceLoc; }
+
+  /// Retrieve the index into its type parameter list.
+  unsigned getIndex() const { return Index; }
+
+  /// Whether this type parameter has an explicitly-written type bound, e.g.,
+  /// "T : NSView".
+  bool hasExplicitBound() const { return ColonLoc.isValid(); }
+
+  /// Retrieve the location of the ':' separating the type parameter name
+  /// from the explicitly-specified bound.
+  SourceLocation getColonLoc() const { return ColonLoc; }
+
+  // Implement isa/cast/dyncast/etc.
+  static bool classof(const Decl *D) { return classofKind(D->getKind()); }
+  static bool classofKind(Kind K) { return K == ObjCTypeParam; }
+
+  friend class ASTDeclReader;
+  friend class ASTDeclWriter;
+};
+
+/// Stores a list of Objective-C type parameters for a parameterized class
+/// or a category/extension thereof.
+///
+/// \code
+/// @interface NSArray<T> // stores the <T>
+/// @end
+/// \endcode
+class ObjCTypeParamList {
+  /// Stores the components of a SourceRange as a POD.
+  struct PODSourceRange {
+    unsigned Begin;
+    unsigned End;
+  };
+
+  union { 
+    /// Location of the left and right angle brackets.
+    PODSourceRange Brackets;
+
+    // Used only for alignment.
+    ObjCTypeParamDecl *AlignmentHack;
+  };
+
+  /// The number of parameters in the list, which are tail-allocated.
+  unsigned NumParams;
+
+  ObjCTypeParamList(SourceLocation lAngleLoc,
+                    ArrayRef<ObjCTypeParamDecl *> typeParams,
+                    SourceLocation rAngleLoc);
+
+public:
+  /// Create a new Objective-C type parameter list.
+  static ObjCTypeParamList *create(ASTContext &ctx,
+                                   SourceLocation lAngleLoc,
+                                   ArrayRef<ObjCTypeParamDecl *> typeParams,
+                                   SourceLocation rAngleLoc);
+
+  /// Iterate through the type parameters in the list.
+  typedef ObjCTypeParamDecl **iterator;
+
+  iterator begin() { return reinterpret_cast<ObjCTypeParamDecl **>(this + 1); }
+
+  iterator end() { return begin() + size(); }
+
+  /// Determine the number of type parameters in this list.
+  unsigned size() const { return NumParams; }
+
+  // Iterate through the type parameters in the list.
+  typedef ObjCTypeParamDecl * const *const_iterator;
+
+  const_iterator begin() const {
+    return reinterpret_cast<ObjCTypeParamDecl * const *>(this + 1);
+  }
+
+  const_iterator end() const {
+    return begin() + size();
+  }
+
+  ObjCTypeParamDecl *front() const {
+    assert(size() > 0 && "empty Objective-C type parameter list");
+    return *begin();
+  }
+
+  ObjCTypeParamDecl *back() const {
+    assert(size() > 0 && "empty Objective-C type parameter list");
+    return *(end() - 1);
+  }
+
+  SourceLocation getLAngleLoc() const {
+    return SourceLocation::getFromRawEncoding(Brackets.Begin);
+  }
+  SourceLocation getRAngleLoc() const {
+    return SourceLocation::getFromRawEncoding(Brackets.End);
+  }
+  SourceRange getSourceRange() const {
+    return SourceRange(getLAngleLoc(), getRAngleLoc());
+  }
+
+  /// Gather the default set of type arguments to be substituted for
+  /// these type parameters when dealing with an unspecialized type.
+  void gatherDefaultTypeArgs(SmallVectorImpl<QualType> &typeArgs) const;
+};
+
 /// ObjCContainerDecl - Represents a container for method declarations.
 /// Current sub-classes are ObjCInterfaceDecl, ObjCCategoryDecl,
 /// ObjCProtocolDecl, and ObjCImplDecl.
@@ -676,9 +862,9 @@ class ObjCInterfaceDecl : public ObjCCon
     /// declaration.
     ObjCInterfaceDecl *Definition;
     
-    /// Class's super class.
-    ObjCInterfaceDecl *SuperClass;
-
+    /// When non-null, this is always an ObjCObjectType.
+    TypeSourceInfo *SuperClassTInfo;
+    
     /// Protocols referenced in the \@interface  declaration
     ObjCProtocolList ReferencedProtocols;
 
@@ -719,16 +905,13 @@ class ObjCInterfaceDecl : public ObjCCon
     };
     /// One of the \c InheritedDesignatedInitializersState enumeratos.
     mutable unsigned InheritedDesignatedInitializers : 2;
-
-    /// \brief The location of the superclass, if any.
-    SourceLocation SuperClassLoc;
     
     /// \brief The location of the last location in this declaration, before
     /// the properties/methods. For example, this will be the '>', '}', or 
     /// identifier, 
     SourceLocation EndLoc; 
 
-    DefinitionData() : Definition(), SuperClass(), CategoryList(), IvarList(), 
+    DefinitionData() : Definition(), SuperClassTInfo(), CategoryList(), 
IvarList(), 
                        ExternallyCompleted(),
                        IvarListMissingImplementation(true),
                        HasDesignatedInitializers(),
@@ -736,11 +919,15 @@ class ObjCInterfaceDecl : public ObjCCon
   };
 
   ObjCInterfaceDecl(const ASTContext &C, DeclContext *DC, SourceLocation AtLoc,
-                    IdentifierInfo *Id, SourceLocation CLoc,
-                    ObjCInterfaceDecl *PrevDecl, bool IsInternal);
+                    IdentifierInfo *Id, ObjCTypeParamList *typeParamList,
+                    SourceLocation CLoc, ObjCInterfaceDecl *PrevDecl,
+                    bool IsInternal);
 
   void LoadExternalDefinition() const;
 
+  /// The type parameters associated with this class, if any.
+  ObjCTypeParamList *TypeParamList;
+
   /// \brief Contains a pointer to the data associated with this class,
   /// which will be NULL if this class has not yet been defined.
   ///
@@ -771,12 +958,33 @@ public:
   static ObjCInterfaceDecl *Create(const ASTContext &C, DeclContext *DC,
                                    SourceLocation atLoc,
                                    IdentifierInfo *Id,
+                                   ObjCTypeParamList *typeParamList,
                                    ObjCInterfaceDecl *PrevDecl,
                                    SourceLocation ClassLoc = SourceLocation(),
                                    bool isInternal = false);
 
   static ObjCInterfaceDecl *CreateDeserialized(const ASTContext &C, unsigned 
ID);
 
+  /// Retrieve the type parameters of this class.
+  ///
+  /// This function looks for a type parameter list for the given
+  /// class; if the class has been declared (with \c \@class) but not
+  /// defined (with \c \@interface), it will search for a declaration that
+  /// has type parameters, skipping any declarations that do not.
+  ObjCTypeParamList *getTypeParamList() const;
+
+  /// Set the type parameters of this class.
+  ///
+  /// This function is used by the AST importer, which must import the type
+  /// parameters after creating their DeclContext to avoid loops.
+  void setTypeParamList(ObjCTypeParamList *TPL);
+
+  /// Retrieve the type parameters written on this particular declaration of
+  /// the class.
+  ObjCTypeParamList *getTypeParamListAsWritten() const {
+    return TypeParamList;
+  }
+
   SourceRange getSourceRange() const override LLVM_READONLY {
     if (isThisDeclarationADefinition())
       return ObjCContainerDecl::getSourceRange();
@@ -1023,7 +1231,16 @@ public:
   /// a forward declaration (\@class) to a definition (\@interface).
   void startDefinition();
   
-  ObjCInterfaceDecl *getSuperClass() const {
+  /// Retrieve the superclass type.
+  const ObjCObjectType *getSuperClassType() const {
+    if (TypeSourceInfo *TInfo = getSuperClassTInfo())
+      return TInfo->getType()->castAs<ObjCObjectType>();
+
+    return nullptr;
+  }
+
+  // Retrieve the type source information for the superclass.
+  TypeSourceInfo *getSuperClassTInfo() const {
     // FIXME: Should make sure no callers ever do this.
     if (!hasDefinition())
       return nullptr;
@@ -1031,13 +1248,15 @@ public:
     if (data().ExternallyCompleted)
       LoadExternalDefinition();
 
-    return data().SuperClass;
+    return data().SuperClassTInfo;
   }
 
-  void setSuperClass(ObjCInterfaceDecl * superCls) { 
-    data().SuperClass = 
-      (superCls && superCls->hasDefinition()) ? superCls->getDefinition() 
-                                              : superCls; 
+  // Retrieve the declaration for the superclass of this class, which
+  // does not include any type arguments that apply to the superclass.
+  ObjCInterfaceDecl *getSuperClass() const;
+
+  void setSuperClass(TypeSourceInfo *superClass) { 
+    data().SuperClassTInfo = superClass;
   }
 
   /// \brief Iterator that walks over the list of categories, filtering out
@@ -1329,8 +1548,8 @@ public:
                           
   void setEndOfDefinitionLoc(SourceLocation LE) { data().EndLoc = LE; }
 
-  void setSuperClassLoc(SourceLocation Loc) { data().SuperClassLoc = Loc; }
-  SourceLocation getSuperClassLoc() const { return data().SuperClassLoc; }
+  /// Retrieve the starting location of the superclass.
+  SourceLocation getSuperClassLoc() const;
 
   /// isImplicitInterfaceDecl - check that this is an implicitly declared
   /// ObjCInterfaceDecl node. This is for legacy objective-c \@implementation
@@ -1438,6 +1657,10 @@ public:
   void setSynthesize(bool synth) { Synthesized = synth; }
   bool getSynthesize() const { return Synthesized; }
 
+  /// Retrieve the type of this instance variable when viewed as a member of a
+  /// specific object type.
+  QualType getUsageType(QualType objectType) const;
+
   // Implement isa/cast/dyncast/etc.
   static bool classof(const Decl *D) { return classofKind(D->getKind()); }
   static bool classofKind(Kind K) { return K == ObjCIvar; }
@@ -1719,6 +1942,9 @@ class ObjCCategoryDecl : public ObjCCont
   /// Interface belonging to this category
   ObjCInterfaceDecl *ClassInterface;
 
+  /// The type parameters associated with this category, if any.
+  ObjCTypeParamList *TypeParamList;
+
   /// referenced protocols in this category.
   ObjCProtocolList ReferencedProtocols;
 
@@ -1736,13 +1962,9 @@ class ObjCCategoryDecl : public ObjCCont
   ObjCCategoryDecl(DeclContext *DC, SourceLocation AtLoc,
                    SourceLocation ClassNameLoc, SourceLocation CategoryNameLoc,
                    IdentifierInfo *Id, ObjCInterfaceDecl *IDecl,
+                   ObjCTypeParamList *typeParamList,
                    SourceLocation IvarLBraceLoc=SourceLocation(),
-                   SourceLocation IvarRBraceLoc=SourceLocation())
-    : ObjCContainerDecl(ObjCCategory, DC, Id, ClassNameLoc, AtLoc),
-      ClassInterface(IDecl), NextClassCategory(nullptr),
-      CategoryNameLoc(CategoryNameLoc),
-      IvarLBraceLoc(IvarLBraceLoc), IvarRBraceLoc(IvarRBraceLoc) {
-  }
+                   SourceLocation IvarRBraceLoc=SourceLocation());
 
 public:
 
@@ -1752,6 +1974,7 @@ public:
                                   SourceLocation CategoryNameLoc,
                                   IdentifierInfo *Id,
                                   ObjCInterfaceDecl *IDecl,
+                                  ObjCTypeParamList *typeParamList,
                                   SourceLocation 
IvarLBraceLoc=SourceLocation(),
                                   SourceLocation 
IvarRBraceLoc=SourceLocation());
   static ObjCCategoryDecl *CreateDeserialized(ASTContext &C, unsigned ID);
@@ -1759,6 +1982,17 @@ public:
   ObjCInterfaceDecl *getClassInterface() { return ClassInterface; }
   const ObjCInterfaceDecl *getClassInterface() const { return ClassInterface; }
 
+  /// Retrieve the type parameter list associated with this category or
+  /// extension.
+  ObjCTypeParamList *getTypeParamList() const { return TypeParamList; }
+
+  /// Set the type parameters of this category.
+  ///
+  /// This function is used by the AST importer, which must import the type
+  /// parameters after creating their DeclContext to avoid loops.
+  void setTypeParamList(ObjCTypeParamList *TPL);
+
+
   ObjCCategoryImplDecl *getImplementation() const;
   void setImplementation(ObjCCategoryImplDecl *ImplD);
 
@@ -2275,6 +2509,10 @@ public:
     DeclTypeSourceInfo = TSI; 
   }
 
+  /// Retrieve the type when this property is used with a specific base object
+  /// type.
+  QualType getUsageType(QualType objectType) const;
+
   PropertyAttributeKind getPropertyAttributes() const {
     return PropertyAttributeKind(PropertyAttributes);
   }

Modified: vendor/clang/dist/include/clang/AST/ExprObjC.h
==============================================================================
--- vendor/clang/dist/include/clang/AST/ExprObjC.h      Fri Aug  7 23:02:14 
2015        (r286426)
+++ vendor/clang/dist/include/clang/AST/ExprObjC.h      Fri Aug  7 23:02:44 
2015        (r286427)
@@ -687,40 +687,7 @@ public:
   QualType getSuperReceiverType() const { 
     return QualType(Receiver.get<const Type*>(), 0); 
   }
-  QualType getGetterResultType() const {
-    QualType ResultType;
-    if (isExplicitProperty()) {
-      const ObjCPropertyDecl *PDecl = getExplicitProperty();
-      if (const ObjCMethodDecl *Getter = PDecl->getGetterMethodDecl())
-        ResultType = Getter->getReturnType();
-      else
-        ResultType = PDecl->getType();
-    } else {
-      const ObjCMethodDecl *Getter = getImplicitPropertyGetter();
-      if (Getter)
-        ResultType = Getter->getReturnType(); // with reference!
-    }
-    return ResultType;
-  }
 
-  QualType getSetterArgType() const {
-    QualType ArgType;
-    if (isImplicitProperty()) {
-      const ObjCMethodDecl *Setter = getImplicitPropertySetter();
-      ObjCMethodDecl::param_const_iterator P = Setter->param_begin(); 
-      ArgType = (*P)->getType();
-    } else {
-      if (ObjCPropertyDecl *PDecl = getExplicitProperty())
-        if (const ObjCMethodDecl *Setter = PDecl->getSetterMethodDecl()) {
-          ObjCMethodDecl::param_const_iterator P = Setter->param_begin(); 
-          ArgType = (*P)->getType();
-        }
-      if (ArgType.isNull())
-        ArgType = getType();
-    }
-    return ArgType;
-  }
-  
   ObjCInterfaceDecl *getClassReceiver() const {
     return Receiver.get<ObjCInterfaceDecl*>();
   }
@@ -728,6 +695,9 @@ public:
   bool isSuperReceiver() const { return Receiver.is<const Type*>(); }
   bool isClassReceiver() const { return Receiver.is<ObjCInterfaceDecl*>(); }
 
+  /// Determine the type of the base, regardless of the kind of receiver.
+  QualType getReceiverType(const ASTContext &ctx) const;
+
   SourceLocation getLocStart() const LLVM_READONLY {
     return isObjectReceiver() ? getBase()->getLocStart() 
:getReceiverLocation();
   }

Modified: vendor/clang/dist/include/clang/AST/RecursiveASTVisitor.h
==============================================================================
--- vendor/clang/dist/include/clang/AST/RecursiveASTVisitor.h   Fri Aug  7 
23:02:14 2015        (r286426)
+++ vendor/clang/dist/include/clang/AST/RecursiveASTVisitor.h   Fri Aug  7 
23:02:44 2015        (r286427)
@@ -1008,6 +1008,9 @@ DEF_TRAVERSE_TYPE(ObjCObjectType, {
   // type is itself.
   if (T->getBaseType().getTypePtr() != T)
     TRY_TO(TraverseType(T->getBaseType()));
+  for (auto typeArg : T->getTypeArgsAsWritten()) {
+    TRY_TO(TraverseType(typeArg));
+  }
 })
 
 DEF_TRAVERSE_TYPE(ObjCObjectPointerType,
@@ -1234,6 +1237,8 @@ DEF_TRAVERSE_TYPELOC(ObjCObjectType, {
   // type is itself.
   if (TL.getTypePtr()->getBaseType().getTypePtr() != TL.getTypePtr())
     TRY_TO(TraverseTypeLoc(TL.getBaseLoc()));
+  for (unsigned i = 0, n = TL.getNumTypeArgs(); i != n; ++i)
+    TRY_TO(TraverseTypeLoc(TL.getTypeArgTInfo(i)->getTypeLoc()));
 })
 
 DEF_TRAVERSE_TYPELOC(ObjCObjectPointerType,
@@ -1382,7 +1387,12 @@ DEF_TRAVERSE_DECL(ObjCCompatibleAliasDec
                                            })
 
 DEF_TRAVERSE_DECL(ObjCCategoryDecl, {// FIXME: implement
-                                    })
+  if (ObjCTypeParamList *typeParamList = D->getTypeParamList()) {
+    for (auto typeParam : *typeParamList) {
+      TRY_TO(TraverseObjCTypeParamDecl(typeParam));
+    }
+  }
+})
 
 DEF_TRAVERSE_DECL(ObjCCategoryImplDecl, {// FIXME: implement
                                         })
@@ -1391,7 +1401,16 @@ DEF_TRAVERSE_DECL(ObjCImplementationDecl
                                           })
 
 DEF_TRAVERSE_DECL(ObjCInterfaceDecl, {// FIXME: implement
-                                     })
+  if (ObjCTypeParamList *typeParamList = D->getTypeParamListAsWritten()) {
+    for (auto typeParam : *typeParamList) {
+      TRY_TO(TraverseObjCTypeParamDecl(typeParam));
+    }
+  }
+
+  if (TypeSourceInfo *superTInfo = D->getSuperClassTInfo()) {
+    TRY_TO(TraverseTypeLoc(superTInfo->getTypeLoc()));
+  }
+})
 
 DEF_TRAVERSE_DECL(ObjCProtocolDecl, {// FIXME: implement
                                     })
@@ -1410,6 +1429,15 @@ DEF_TRAVERSE_DECL(ObjCMethodDecl, {
   return true;
 })
 
+DEF_TRAVERSE_DECL(ObjCTypeParamDecl, {
+  if (D->hasExplicitBound()) {
+    TRY_TO(TraverseTypeLoc(D->getTypeSourceInfo()->getTypeLoc()));
+    // We shouldn't traverse D->getTypeForDecl(); it's a result of
+    // declaring the type alias, not something that was written in the
+    // source.
+  }
+})
+
 DEF_TRAVERSE_DECL(ObjCPropertyDecl, {
   if (D->getTypeSourceInfo())
     TRY_TO(TraverseTypeLoc(D->getTypeSourceInfo()->getTypeLoc()));

Modified: vendor/clang/dist/include/clang/AST/Type.h
==============================================================================
--- vendor/clang/dist/include/clang/AST/Type.h  Fri Aug  7 23:02:14 2015        
(r286426)
+++ vendor/clang/dist/include/clang/AST/Type.h  Fri Aug  7 23:02:44 2015        
(r286427)
@@ -533,6 +533,24 @@ struct SplitQualType {
   }
 };
 
+/// The kind of type we are substituting Objective-C type arguments into.
+///
+/// The kind of substitution affects the replacement of type parameters when
+/// no concrete type information is provided, e.g., when dealing with an
+/// unspecialized type.
+enum class ObjCSubstitutionContext {
+  /// An ordinary type.
+  Ordinary,
+  /// The result type of a method or function.
+  Result,
+  /// The parameter type of a method or function.
+  Parameter,
+  /// The type of a property.
+  Property,
+  /// The superclass of a type.
+  Superclass,
+};
+
 /// QualType - For efficiency, we don't store CV-qualified types as nodes on
 /// their own: instead each reference to a type stores the qualifiers.  This
 /// greatly reduces the number of nodes we need to allocate for types (for
@@ -994,6 +1012,51 @@ public:
   ///   type other than void.
   bool isCForbiddenLValueType() const;
 
+  /// Substitute type arguments for the Objective-C type parameters used in the
+  /// subject type.
+  ///
+  /// \param ctx ASTContext in which the type exists.
+  ///
+  /// \param typeArgs The type arguments that will be substituted for the
+  /// Objective-C type parameters in the subject type, which are generally
+  /// computed via \c Type::getObjCSubstitutions. If empty, the type
+  /// parameters will be replaced with their bounds or id/Class, as appropriate
+  /// for the context.
+  ///
+  /// \param context The context in which the subject type was written.
+  ///
+  /// \returns the resulting type.
+  QualType substObjCTypeArgs(ASTContext &ctx,
+                             ArrayRef<QualType> typeArgs,
+                             ObjCSubstitutionContext context) const;
+
+  /// Substitute type arguments from an object type for the Objective-C type
+  /// parameters used in the subject type.
+  ///
+  /// This operation combines the computation of type arguments for
+  /// substitution (\c Type::getObjCSubstitutions) with the actual process of
+  /// substitution (\c QualType::substObjCTypeArgs) for the convenience of
+  /// callers that need to perform a single substitution in isolation.
+  ///
+  /// \param objectType The type of the object whose member type we're
+  /// substituting into. For example, this might be the receiver of a message
+  /// or the base of a property access.
+  ///
+  /// \param dc The declaration context from which the subject type was
+  /// retrieved, which indicates (for example) which type parameters should
+  /// be substituted.
+  ///
+  /// \param context The context in which the subject type was written.
+  ///
+  /// \returns the subject type after replacing all of the Objective-C type
+  /// parameters with their corresponding arguments.
+  QualType substObjCMemberType(QualType objectType,
+                               const DeclContext *dc,
+                               ObjCSubstitutionContext context) const;
+
+  /// Strip Objective-C "__kindof" types from the given type.
+  QualType stripObjCKindOfType(const ASTContext &ctx) const;
+
 private:
   // These methods are implemented in a separate translation unit;
   // "static"-ize them to avoid creating temporary QualTypes in the
@@ -1288,10 +1351,17 @@ protected:
 
     unsigned : NumTypeBits;
 
+    /// The number of type arguments stored directly on this object type.
+    unsigned NumTypeArgs : 7;
+
     /// NumProtocols - The number of protocols stored directly on this
     /// object type.
-    unsigned NumProtocols : 32 - NumTypeBits;
+    unsigned NumProtocols : 6;
+
+    /// Whether this is a "kindof" type.
+    unsigned IsKindOf : 1;
   };
+  static_assert(NumTypeBits + 7 + 6 + 1 <= 32, "Does not fit in an unsigned");
 
   class ReferenceTypeBitfields {
     friend class ReferenceType;
@@ -1585,7 +1655,28 @@ public:
   bool isObjCQualifiedClassType() const;        // Class<foo>
   bool isObjCObjectOrInterfaceType() const;
   bool isObjCIdType() const;                    // id
+
+  /// Whether the type is Objective-C 'id' or a __kindof type of an
+  /// object type, e.g., __kindof NSView * or __kindof id
+  /// <NSCopying>.
+  ///
+  /// \param bound Will be set to the bound on non-id subtype types,
+  /// which will be (possibly specialized) Objective-C class type, or
+  /// null for 'id.
+  bool isObjCIdOrObjectKindOfType(const ASTContext &ctx,
+                                  const ObjCObjectType *&bound) const;
+
   bool isObjCClassType() const;                 // Class
+
+  /// Whether the type is Objective-C 'Class' or a __kindof type of an
+  /// Class type, e.g., __kindof Class <NSCopying>.
+  ///
+  /// Unlike \c isObjCIdOrObjectKindOfType, there is no relevant bound
+  /// here because Objective-C's type system cannot express "a class
+  /// object for a subclass of NSFoo".
+  bool isObjCClassOrClassKindOfType() const;
+
+  bool isBlockCompatibleObjCPointerType(ASTContext &ctx) const;
   bool isObjCSelType() const;                 // Class
   bool isObjCBuiltinType() const;               // 'id' or 'Class'
   bool isObjCARCBridgableType() const;
@@ -1697,6 +1788,7 @@ public:
   /// NOTE: getAs*ArrayType are methods on ASTContext.
   const RecordType *getAsUnionType() const;
   const ComplexType *getAsComplexIntegerType() const; // GCC complex int type.
+  const ObjCObjectType *getAsObjCInterfaceType() const;
   // The following is a convenience method that returns an 
ObjCObjectPointerType
   // for object declared using an interface.
   const ObjCObjectPointerType *getAsObjCInterfacePointerType() const;
@@ -1832,6 +1924,28 @@ public:
   /// pointer type.
   bool canHaveNullability() const;
 
+  /// Retrieve the set of substitutions required when accessing a member
+  /// of the Objective-C receiver type that is declared in the given context.
+  ///

*** DIFF OUTPUT TRUNCATED AT 1000 LINES ***
_______________________________________________
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to