From owner-svn-src-vendor@FreeBSD.ORG Tue Jun 9 19:08:28 2015 Return-Path: Delivered-To: svn-src-vendor@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E3C64152; Tue, 9 Jun 2015 19:08:28 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CE65C14C2; Tue, 9 Jun 2015 19:08:28 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t59J8SsY059497; Tue, 9 Jun 2015 19:08:28 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t59J8Kix059430; Tue, 9 Jun 2015 19:08:20 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201506091908.t59J8Kix059430@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Tue, 9 Jun 2015 19:08:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r284186 - in vendor/clang/dist: . docs include/clang/AST include/clang/ASTMatchers include/clang/Analysis include/clang/Basic include/clang/Config include/clang/Driver include/clang/Lex... X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the vendor work area tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 Jun 2015 19:08:29 -0000 Author: dim Date: Tue Jun 9 19:08:19 2015 New Revision: 284186 URL: https://svnweb.freebsd.org/changeset/base/284186 Log: Vendor import of clang trunk r239412: https://llvm.org/svn/llvm-project/cfe/trunk@239412 Added: vendor/clang/dist/test/CodeGen/neon-immediate-ubsan.c (contents, props changed) vendor/clang/dist/test/CodeGenCXX/pragma-loop.cpp (contents, props changed) vendor/clang/dist/test/CodeGenCXX/pragma-unroll.cpp (contents, props changed) vendor/clang/dist/test/CodeGenCXX/stack-reuse-miscompile.cpp (contents, props changed) vendor/clang/dist/test/CodeGenCXX/stack-reuse.cpp (contents, props changed) vendor/clang/dist/test/Driver/Inputs/debian_8_sparc64_tree/ vendor/clang/dist/test/Driver/Inputs/debian_8_sparc64_tree/lib/ vendor/clang/dist/test/Driver/Inputs/debian_8_sparc64_tree/lib/sparc64-linux-gnu/ vendor/clang/dist/test/Driver/Inputs/debian_8_sparc64_tree/lib/sparc64-linux-gnu/.keep vendor/clang/dist/test/Driver/Inputs/debian_8_sparc64_tree/lib64/ vendor/clang/dist/test/Driver/Inputs/debian_8_sparc64_tree/lib64/.keep vendor/clang/dist/test/Driver/Inputs/debian_8_sparc64_tree/usr/ vendor/clang/dist/test/Driver/Inputs/debian_8_sparc64_tree/usr/include/ vendor/clang/dist/test/Driver/Inputs/debian_8_sparc64_tree/usr/include/c++/ vendor/clang/dist/test/Driver/Inputs/debian_8_sparc64_tree/usr/include/c++/4.9/ vendor/clang/dist/test/Driver/Inputs/debian_8_sparc64_tree/usr/include/c++/4.9/.keep vendor/clang/dist/test/Driver/Inputs/debian_8_sparc64_tree/usr/include/sparc64-linux-gnu/ vendor/clang/dist/test/Driver/Inputs/debian_8_sparc64_tree/usr/include/sparc64-linux-gnu/c++/ vendor/clang/dist/test/Driver/Inputs/debian_8_sparc64_tree/usr/include/sparc64-linux-gnu/c++/4.9/ vendor/clang/dist/test/Driver/Inputs/debian_8_sparc64_tree/usr/include/sparc64-linux-gnu/c++/4.9/.keep vendor/clang/dist/test/Driver/Inputs/debian_8_sparc64_tree/usr/lib/ vendor/clang/dist/test/Driver/Inputs/debian_8_sparc64_tree/usr/lib/gcc/ vendor/clang/dist/test/Driver/Inputs/debian_8_sparc64_tree/usr/lib/gcc/sparc64-linux-gnu/ vendor/clang/dist/test/Driver/Inputs/debian_8_sparc64_tree/usr/lib/gcc/sparc64-linux-gnu/4.9/ vendor/clang/dist/test/Driver/Inputs/debian_8_sparc64_tree/usr/lib/gcc/sparc64-linux-gnu/4.9/crtbegin.o (contents, props changed) vendor/clang/dist/test/Driver/Inputs/debian_8_sparc64_tree/usr/lib/gcc/sparc64-linux-gnu/4.9/crtend.o (contents, props changed) vendor/clang/dist/test/Driver/Inputs/debian_8_sparc64_tree/usr/lib/sparc64-linux-gnu/ vendor/clang/dist/test/Driver/Inputs/debian_8_sparc64_tree/usr/lib/sparc64-linux-gnu/crt1.o (contents, props changed) vendor/clang/dist/test/Driver/Inputs/debian_8_sparc64_tree/usr/lib/sparc64-linux-gnu/crti.o (contents, props changed) vendor/clang/dist/test/Driver/Inputs/debian_8_sparc64_tree/usr/lib/sparc64-linux-gnu/crtn.o (contents, props changed) vendor/clang/dist/test/Driver/Inputs/debian_8_sparc_multilib_tree/ vendor/clang/dist/test/Driver/Inputs/debian_8_sparc_multilib_tree/lib/ vendor/clang/dist/test/Driver/Inputs/debian_8_sparc_multilib_tree/lib/sparc-linux-gnu/ vendor/clang/dist/test/Driver/Inputs/debian_8_sparc_multilib_tree/lib/sparc-linux-gnu/.keep vendor/clang/dist/test/Driver/Inputs/debian_8_sparc_multilib_tree/lib64/ vendor/clang/dist/test/Driver/Inputs/debian_8_sparc_multilib_tree/lib64/.keep vendor/clang/dist/test/Driver/Inputs/debian_8_sparc_multilib_tree/usr/ vendor/clang/dist/test/Driver/Inputs/debian_8_sparc_multilib_tree/usr/include/ vendor/clang/dist/test/Driver/Inputs/debian_8_sparc_multilib_tree/usr/include/c++/ vendor/clang/dist/test/Driver/Inputs/debian_8_sparc_multilib_tree/usr/include/c++/4.9/ vendor/clang/dist/test/Driver/Inputs/debian_8_sparc_multilib_tree/usr/include/c++/4.9/backward/ vendor/clang/dist/test/Driver/Inputs/debian_8_sparc_multilib_tree/usr/include/c++/4.9/backward/.keep vendor/clang/dist/test/Driver/Inputs/debian_8_sparc_multilib_tree/usr/include/sparc-linux-gnu/ vendor/clang/dist/test/Driver/Inputs/debian_8_sparc_multilib_tree/usr/include/sparc-linux-gnu/c++/ vendor/clang/dist/test/Driver/Inputs/debian_8_sparc_multilib_tree/usr/include/sparc-linux-gnu/c++/4.9/ vendor/clang/dist/test/Driver/Inputs/debian_8_sparc_multilib_tree/usr/include/sparc-linux-gnu/c++/4.9/64/ vendor/clang/dist/test/Driver/Inputs/debian_8_sparc_multilib_tree/usr/include/sparc-linux-gnu/c++/4.9/64/.keep vendor/clang/dist/test/Driver/Inputs/debian_8_sparc_multilib_tree/usr/lib/ vendor/clang/dist/test/Driver/Inputs/debian_8_sparc_multilib_tree/usr/lib/gcc/ vendor/clang/dist/test/Driver/Inputs/debian_8_sparc_multilib_tree/usr/lib/gcc/sparc-linux-gnu/ vendor/clang/dist/test/Driver/Inputs/debian_8_sparc_multilib_tree/usr/lib/gcc/sparc-linux-gnu/4.9/ vendor/clang/dist/test/Driver/Inputs/debian_8_sparc_multilib_tree/usr/lib/gcc/sparc-linux-gnu/4.9/64/ vendor/clang/dist/test/Driver/Inputs/debian_8_sparc_multilib_tree/usr/lib/gcc/sparc-linux-gnu/4.9/64/crtbegin.o (contents, props changed) vendor/clang/dist/test/Driver/Inputs/debian_8_sparc_multilib_tree/usr/lib/gcc/sparc-linux-gnu/4.9/64/crtend.o (contents, props changed) vendor/clang/dist/test/Driver/Inputs/debian_8_sparc_multilib_tree/usr/lib/gcc/sparc-linux-gnu/4.9/crtbegin.o (contents, props changed) vendor/clang/dist/test/Driver/Inputs/debian_8_sparc_multilib_tree/usr/lib/gcc/sparc-linux-gnu/4.9/crtend.o (contents, props changed) vendor/clang/dist/test/Driver/Inputs/debian_8_sparc_multilib_tree/usr/lib/sparc-linux-gnu/ vendor/clang/dist/test/Driver/Inputs/debian_8_sparc_multilib_tree/usr/lib/sparc-linux-gnu/crt1.o (contents, props changed) vendor/clang/dist/test/Driver/Inputs/debian_8_sparc_multilib_tree/usr/lib/sparc-linux-gnu/crti.o (contents, props changed) vendor/clang/dist/test/Driver/Inputs/debian_8_sparc_multilib_tree/usr/lib/sparc-linux-gnu/crtn.o (contents, props changed) vendor/clang/dist/test/Driver/Inputs/debian_8_sparc_multilib_tree/usr/lib64/ vendor/clang/dist/test/Driver/Inputs/debian_8_sparc_multilib_tree/usr/lib64/crt1.o (contents, props changed) vendor/clang/dist/test/Driver/Inputs/debian_8_sparc_multilib_tree/usr/lib64/crti.o (contents, props changed) vendor/clang/dist/test/Driver/Inputs/debian_8_sparc_multilib_tree/usr/lib64/crtn.o (contents, props changed) vendor/clang/dist/test/Driver/crash-report-header.h (contents, props changed) vendor/clang/dist/test/Driver/fopenmp.c (contents, props changed) vendor/clang/dist/test/Driver/msvc-triple.c (contents, props changed) vendor/clang/dist/test/Modules/Inputs/template-default-args/ vendor/clang/dist/test/Modules/Inputs/template-default-args/a.h (contents, props changed) vendor/clang/dist/test/Modules/Inputs/template-default-args/b.h (contents, props changed) vendor/clang/dist/test/Modules/Inputs/template-default-args/module.modulemap vendor/clang/dist/test/Modules/template-default-args.cpp (contents, props changed) vendor/clang/dist/test/Profile/Inputs/func-entry.proftext vendor/clang/dist/test/Profile/func-entry.c (contents, props changed) vendor/clang/dist/test/Sema/PR16678.c (contents, props changed) vendor/clang/dist/test/Sema/ast-print-x86.c (contents, props changed) Deleted: vendor/clang/dist/test/CodeGen/pragma-loop.cpp vendor/clang/dist/test/CodeGen/pragma-unroll.cpp Modified: vendor/clang/dist/CMakeLists.txt vendor/clang/dist/docs/CrossCompilation.rst vendor/clang/dist/docs/DriverInternals.rst vendor/clang/dist/docs/LibASTMatchersTutorial.rst vendor/clang/dist/docs/UsersManual.rst vendor/clang/dist/include/clang/AST/Decl.h vendor/clang/dist/include/clang/AST/DeclBase.h vendor/clang/dist/include/clang/AST/DeclCXX.h vendor/clang/dist/include/clang/ASTMatchers/ASTMatchers.h vendor/clang/dist/include/clang/Analysis/CFG.h vendor/clang/dist/include/clang/Basic/DiagnosticCommonKinds.td vendor/clang/dist/include/clang/Basic/DiagnosticGroups.td vendor/clang/dist/include/clang/Basic/DiagnosticSemaKinds.td vendor/clang/dist/include/clang/Basic/TokenKinds.def vendor/clang/dist/include/clang/Config/config.h.cmake vendor/clang/dist/include/clang/Config/config.h.in vendor/clang/dist/include/clang/Driver/CLCompatOptions.td vendor/clang/dist/include/clang/Driver/Options.td vendor/clang/dist/include/clang/Driver/Types.def vendor/clang/dist/include/clang/Lex/HeaderSearchOptions.h vendor/clang/dist/include/clang/Lex/Lexer.h vendor/clang/dist/include/clang/Lex/MacroInfo.h vendor/clang/dist/include/clang/Lex/ModuleMap.h vendor/clang/dist/include/clang/Lex/PPCallbacks.h vendor/clang/dist/include/clang/Lex/PTHManager.h vendor/clang/dist/include/clang/Lex/Preprocessor.h vendor/clang/dist/include/clang/Lex/PreprocessorOptions.h vendor/clang/dist/include/clang/Sema/Lookup.h vendor/clang/dist/include/clang/Sema/Sema.h vendor/clang/dist/include/clang/Tooling/Core/Replacement.h vendor/clang/dist/lib/ARCMigrate/ObjCMT.cpp vendor/clang/dist/lib/AST/DeclBase.cpp vendor/clang/dist/lib/AST/DeclCXX.cpp vendor/clang/dist/lib/AST/DeclPrinter.cpp vendor/clang/dist/lib/AST/ExprConstant.cpp vendor/clang/dist/lib/AST/MicrosoftMangle.cpp vendor/clang/dist/lib/AST/Stmt.cpp vendor/clang/dist/lib/AST/StmtPrinter.cpp vendor/clang/dist/lib/ASTMatchers/ASTMatchFinder.cpp vendor/clang/dist/lib/ASTMatchers/Dynamic/Diagnostics.cpp vendor/clang/dist/lib/ASTMatchers/Dynamic/Registry.cpp vendor/clang/dist/lib/Analysis/CFG.cpp vendor/clang/dist/lib/Basic/Diagnostic.cpp vendor/clang/dist/lib/Basic/IdentifierTable.cpp vendor/clang/dist/lib/Basic/SourceLocation.cpp vendor/clang/dist/lib/Basic/Targets.cpp vendor/clang/dist/lib/CodeGen/BackendUtil.cpp vendor/clang/dist/lib/CodeGen/CGBuiltin.cpp vendor/clang/dist/lib/CodeGen/CGCXX.cpp vendor/clang/dist/lib/CodeGen/CGCall.cpp vendor/clang/dist/lib/CodeGen/CGCall.h vendor/clang/dist/lib/CodeGen/CGExprAgg.cpp vendor/clang/dist/lib/CodeGen/CGExprConstant.cpp vendor/clang/dist/lib/CodeGen/CGLoopInfo.cpp vendor/clang/dist/lib/CodeGen/CGObjCGNU.cpp vendor/clang/dist/lib/CodeGen/CGRecordLayoutBuilder.cpp vendor/clang/dist/lib/CodeGen/CMakeLists.txt 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/CodeGenPGO.cpp vendor/clang/dist/lib/CodeGen/TargetInfo.cpp vendor/clang/dist/lib/CodeGen/TargetInfo.h vendor/clang/dist/lib/Driver/Driver.cpp vendor/clang/dist/lib/Driver/MSVCToolChain.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/Tools.h vendor/clang/dist/lib/Driver/Types.cpp vendor/clang/dist/lib/Format/BreakableToken.cpp vendor/clang/dist/lib/Format/ContinuationIndenter.cpp vendor/clang/dist/lib/Format/ContinuationIndenter.h vendor/clang/dist/lib/Format/Format.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/Format/UnwrappedLineParser.h vendor/clang/dist/lib/Format/WhitespaceManager.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/InitHeaderSearch.cpp vendor/clang/dist/lib/Frontend/PrintPreprocessedOutput.cpp vendor/clang/dist/lib/Frontend/TextDiagnosticBuffer.cpp vendor/clang/dist/lib/Headers/altivec.h vendor/clang/dist/lib/Headers/ammintrin.h vendor/clang/dist/lib/Headers/module.modulemap vendor/clang/dist/lib/Lex/Lexer.cpp vendor/clang/dist/lib/Lex/ModuleMap.cpp vendor/clang/dist/lib/Lex/PPMacroExpansion.cpp vendor/clang/dist/lib/Lex/PTHLexer.cpp vendor/clang/dist/lib/Parse/ParsePragma.cpp vendor/clang/dist/lib/Sema/AnalysisBasedWarnings.cpp vendor/clang/dist/lib/Sema/JumpDiagnostics.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/SemaDeclAttr.cpp vendor/clang/dist/lib/Sema/SemaDeclCXX.cpp vendor/clang/dist/lib/Sema/SemaExpr.cpp vendor/clang/dist/lib/Sema/SemaLookup.cpp vendor/clang/dist/lib/Sema/SemaStmtAsm.cpp vendor/clang/dist/lib/Sema/SemaTemplate.cpp vendor/clang/dist/lib/Sema/SemaType.cpp vendor/clang/dist/lib/Serialization/ASTReader.cpp vendor/clang/dist/lib/Serialization/ASTWriter.cpp vendor/clang/dist/lib/StaticAnalyzer/Checkers/GenericTaintChecker.cpp vendor/clang/dist/lib/StaticAnalyzer/Checkers/ObjCContainersChecker.cpp vendor/clang/dist/lib/StaticAnalyzer/Frontend/ModelInjector.cpp vendor/clang/dist/lib/Tooling/CompilationDatabase.cpp vendor/clang/dist/lib/Tooling/Core/Replacement.cpp vendor/clang/dist/lib/Tooling/JSONCompilationDatabase.cpp vendor/clang/dist/test/ASTMerge/codegen-body.c vendor/clang/dist/test/CodeGen/atomic-ops.c vendor/clang/dist/test/CodeGen/avx512f-builtins.c vendor/clang/dist/test/CodeGen/builtins-ppc-p8vector.c vendor/clang/dist/test/CodeGen/builtins-ppc-vsx.c vendor/clang/dist/test/CodeGen/catch-undef-behavior.c vendor/clang/dist/test/CodeGen/fp16-ops.c vendor/clang/dist/test/CodeGen/mips-varargs.c vendor/clang/dist/test/CodeGenCXX/dllexport.cpp vendor/clang/dist/test/CodeGenCXX/dllimport.cpp vendor/clang/dist/test/CodeGenCXX/pointers-to-data-members.cpp vendor/clang/dist/test/CodeGenCXX/x86_64-arguments-avx.cpp vendor/clang/dist/test/Driver/arm-cortex-cpus.c vendor/clang/dist/test/Driver/arm-mfpu.c vendor/clang/dist/test/Driver/cl-outputs.c vendor/clang/dist/test/Driver/krait-cpu.c vendor/clang/dist/test/Driver/linux-header-search.cpp vendor/clang/dist/test/Driver/linux-ld.c vendor/clang/dist/test/Driver/pic.c vendor/clang/dist/test/Driver/windows-arm-minimal-arch.c vendor/clang/dist/test/Format/style-on-command-line.cpp vendor/clang/dist/test/Frontend/source-col-map.c vendor/clang/dist/test/Headers/altivec-intrin.c vendor/clang/dist/test/Lexer/keywords_test.cpp vendor/clang/dist/test/Parser/pragma-loop.cpp vendor/clang/dist/test/Preprocessor/arm-target-features.c vendor/clang/dist/test/Preprocessor/init.c vendor/clang/dist/test/Sema/asm.c vendor/clang/dist/test/Sema/ast-print.c vendor/clang/dist/test/Sema/const-eval.c vendor/clang/dist/test/SemaCXX/MicrosoftCompatibility-cxx98.cpp vendor/clang/dist/test/SemaCXX/attr-noreturn.cpp vendor/clang/dist/test/SemaCXX/cxx11-gnu-attrs.cpp vendor/clang/dist/test/SemaCXX/dllexport.cpp vendor/clang/dist/test/SemaCXX/dllimport.cpp vendor/clang/dist/tools/clang-format/clang-format.py vendor/clang/dist/tools/driver/cc1as_main.cpp vendor/clang/dist/tools/libclang/CXType.cpp vendor/clang/dist/unittests/AST/DeclPrinterTest.cpp vendor/clang/dist/unittests/Format/FormatTest.cpp vendor/clang/dist/unittests/Format/FormatTestJS.cpp vendor/clang/dist/unittests/Tooling/RefactoringTest.cpp vendor/clang/dist/utils/TableGen/ClangAttrEmitter.cpp vendor/clang/dist/utils/TableGen/ClangCommentCommandInfoEmitter.cpp vendor/clang/dist/utils/TableGen/ClangCommentHTMLTagsEmitter.cpp vendor/clang/dist/utils/TableGen/NeonEmitter.cpp vendor/clang/dist/utils/check_cfc/check_cfc.py vendor/clang/dist/utils/check_cfc/obj_diff.py vendor/clang/dist/utils/check_cfc/test_check_cfc.py Modified: vendor/clang/dist/CMakeLists.txt ============================================================================== --- vendor/clang/dist/CMakeLists.txt Tue Jun 9 19:07:29 2015 (r284185) +++ vendor/clang/dist/CMakeLists.txt Tue Jun 9 19:08:19 2015 (r284186) @@ -182,6 +182,9 @@ set(GCC_INSTALL_PREFIX "" CACHE PATH "Di set(DEFAULT_SYSROOT "" CACHE PATH "Default to all compiler invocations for --sysroot=." ) +set(CLANG_DEFAULT_OPENMP_RUNTIME "libgomp" CACHE STRING + "Default OpenMP runtime used by -fopenmp.") + set(CLANG_VENDOR "" CACHE STRING "Vendor-specific text for showing with version information.") @@ -362,6 +365,7 @@ macro(add_clang_library name) if (NOT LLVM_INSTALL_TOOLCHAIN_ONLY OR ${name} STREQUAL "libclang") install(TARGETS ${name} + EXPORT ClangTargets LIBRARY DESTINATION lib${LLVM_LIBDIR_SUFFIX} ARCHIVE DESTINATION lib${LLVM_LIBDIR_SUFFIX} RUNTIME DESTINATION bin) @@ -441,11 +445,6 @@ if(CLANG_ENABLE_STATIC_ANALYZER) add_definitions(-DCLANG_ENABLE_STATIC_ANALYZER) endif() -set(OPENMP_DEFAULT_LIB "" CACHE STRING "OpenMP library used by default for -fopenmp.") -if(OPENMP_DEFAULT_LIB) - add_definitions(-DOPENMP_DEFAULT_LIB=${OPENMP_DEFAULT_LIB}) -endif() - # Clang version information set(CLANG_EXECUTABLE_VERSION "${CLANG_VERSION_MAJOR}.${CLANG_VERSION_MINOR}" CACHE STRING @@ -526,9 +525,10 @@ if (CLANG_BUILT_STANDALONE) # Install a /share/clang/cmake/ClangConfig.cmake file so that # find_package(Clang) works. Install the target list with it. + install(EXPORT ClangTargets DESTINATION ${CLANG_INSTALL_PACKAGE_DIR}) + install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules/ClangConfig.cmake - ${CLANG_BINARY_DIR}/share/clang/cmake/ClangTargets.cmake DESTINATION share/clang/cmake) # Also copy ClangConfig.cmake to the build directory so that dependent projects Modified: vendor/clang/dist/docs/CrossCompilation.rst ============================================================================== --- vendor/clang/dist/docs/CrossCompilation.rst Tue Jun 9 19:07:29 2015 (r284185) +++ vendor/clang/dist/docs/CrossCompilation.rst Tue Jun 9 19:08:19 2015 (r284186) @@ -110,7 +110,7 @@ will be chosen, so you'll almost always Typical flags include: * ``-mcpu=``, like x86-64, swift, cortex-a15 - * ``-fpu=``, like SSE3, NEON, controlling the FP unit available + * ``-mfpu=``, like SSE3, NEON, controlling the FP unit available * ``-mfloat-abi=``, like soft, hard, controlling which registers to use for floating-point Modified: vendor/clang/dist/docs/DriverInternals.rst ============================================================================== --- vendor/clang/dist/docs/DriverInternals.rst Tue Jun 9 19:07:29 2015 (r284185) +++ vendor/clang/dist/docs/DriverInternals.rst Tue Jun 9 19:08:19 2015 (r284186) @@ -138,12 +138,12 @@ The driver functionality is conceptually this vector instead of storing its values directly. The clang driver can dump the results of this stage using the - ``-ccc-print-options`` flag (which must precede any actual command + ``-###`` flag (which must precede any actual command line arguments). For example: .. code-block:: console - $ clang -ccc-print-options -Xarch_i386 -fomit-frame-pointer -Wa,-fast -Ifoo -I foo t.c + $ clang -### -Xarch_i386 -fomit-frame-pointer -Wa,-fast -Ifoo -I foo t.c Option 0 - Name: "-Xarch_", Values: {"i386", "-fomit-frame-pointer"} Option 1 - Name: "-Wa,", Values: {"-fast"} Option 2 - Name: "-I", Values: {"foo"} Modified: vendor/clang/dist/docs/LibASTMatchersTutorial.rst ============================================================================== --- vendor/clang/dist/docs/LibASTMatchersTutorial.rst Tue Jun 9 19:07:29 2015 (r284185) +++ vendor/clang/dist/docs/LibASTMatchersTutorial.rst Tue Jun 9 19:08:19 2015 (r284186) @@ -169,7 +169,7 @@ You should now be able to run the syntax .. code-block:: console - cat "int main() { return 0; }" > test.cpp + echo "int main() { return 0; }" > test.cpp bin/loop-convert test.cpp -- Note the two dashes after we specify the source file. The additional Modified: vendor/clang/dist/docs/UsersManual.rst ============================================================================== --- vendor/clang/dist/docs/UsersManual.rst Tue Jun 9 19:07:29 2015 (r284185) +++ vendor/clang/dist/docs/UsersManual.rst Tue Jun 9 19:08:19 2015 (r284186) @@ -1216,6 +1216,32 @@ behavior. Code that is not exercised in is unimportant, and the compiler may make poor optimization choices for code that is disproportionately used while profiling. +Differences Between Sampling and Instrumentation +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +Although both techniques are used for similar purposes, there are important +differences between the two: + +1. Profile data generated with one cannot be used by the other, and there is no + conversion tool that can convert one to the other. So, a profile generated + via ``-fprofile-instr-generate`` must be used with ``-fprofile-instr-use``. + Similarly, sampling profiles generated by external profilers must be + converted and used with ``-fprofile-sample-use``. + +2. Instrumentation profile data can be used for code coverage analysis and + optimization. + +3. Sampling profiles can only be used for optimization. They cannot be used for + code coverage analysis. Although it would be technically possible to use + sampling profiles for code coverage, sample-based profiles are too + coarse-grained for code coverage purposes; it would yield poor results. + +4. Sampling profiles must be generated by an external tool. The profile + generated by that tool must then be converted into a format that can be read + by LLVM. The section on sampling profilers describes one of the supported + sampling profile formats. + + Using Sampling Profilers ^^^^^^^^^^^^^^^^^^^^^^^^ @@ -1283,21 +1309,38 @@ usual build cycle when using sample prof $ clang++ -O2 -gline-tables-only -fprofile-sample-use=code.prof code.cc -o code -Sample Profile Format -""""""""""""""""""""" +Sample Profile Formats +"""""""""""""""""""""" -If you are not using Linux Perf to collect profiles, you will need to -write a conversion tool from your profiler to LLVM's format. This section -explains the file format expected by the backend. - -NOTE: This format is not intended to be used for code coverage. For that, -you need to use Clang's instrumentation based profiling -(``-fprofile-instr-generate``). - -Sample profiles are written as ASCII text. The file is divided into sections, -which correspond to each of the functions executed at runtime. Each -section has the following format (taken from -https://github.com/google/autofdo/blob/master/profile_writer.h): +Since external profilers generate profile data in a variety of custom formats, +the data generated by the profiler must be converted into a format that can be +read by the backend. LLVM supports three different sample profile formats: + +1. ASCII text. This is the easiest one to generate. The file is divided into + sections, which correspond to each of the functions with profile + information. The format is described below. + +2. Binary encoding. This uses a more efficient encoding that yields smaller + profile files, which may be useful when generating large profiles. It can be + generated from the text format using the ``llvm-profdata`` tool. + +3. GCC encoding. This is based on the gcov format, which is accepted by GCC. It + is only interesting in environments where GCC and Clang co-exist. Similarly + to the binary encoding, it can be generated using the ``llvm-profdata`` tool. + +If you are using Linux Perf to generate sampling profiles, you can use the +conversion tool ``create_llvm_prof`` described in the previous section. +Otherwise, you will need to write a conversion tool that converts your +profiler's native format into one of these three. + + +Sample Profile Text Format +"""""""""""""""""""""""""" + +This section describes the ASCII text format for sampling profiles. It is, +arguably, the easiest one to generate. If you are interested in generating any +of the other two, consult the ``ProfileData`` library in in LLVM's source tree +(specifically, ``llvm/lib/ProfileData/SampleProfWriter.cpp``). .. code-block:: console @@ -1404,8 +1447,8 @@ instrumentation: $ LLVM_PROFILE_FILE="code-%p.profraw" ./code 3. Combine profiles from multiple runs and convert the "raw" profile format to - the input expected by clang. Use the ``merge`` command of the llvm-profdata - tool to do this. + the input expected by clang. Use the ``merge`` command of the + ``llvm-profdata`` tool to do this. .. code-block:: console Modified: vendor/clang/dist/include/clang/AST/Decl.h ============================================================================== --- vendor/clang/dist/include/clang/AST/Decl.h Tue Jun 9 19:07:29 2015 (r284185) +++ vendor/clang/dist/include/clang/AST/Decl.h Tue Jun 9 19:08:19 2015 (r284186) @@ -236,7 +236,11 @@ public: bool isHidden() const { return Hidden; } /// \brief Set whether this declaration is hidden from name lookup. - void setHidden(bool Hide) { Hidden = Hide; } + void setHidden(bool Hide) { + assert((!Hide || isFromASTFile() || hasLocalOwningModuleStorage()) && + "declaration with no owning module can't be hidden"); + Hidden = Hide; + } /// \brief Determine whether this declaration is a C++ class member. bool isCXXClassMember() const { Modified: vendor/clang/dist/include/clang/AST/DeclBase.h ============================================================================== --- vendor/clang/dist/include/clang/AST/DeclBase.h Tue Jun 9 19:07:29 2015 (r284185) +++ vendor/clang/dist/include/clang/AST/DeclBase.h Tue Jun 9 19:08:19 2015 (r284186) @@ -637,6 +637,8 @@ public: private: Module *getOwningModuleSlow() const; +protected: + bool hasLocalOwningModuleStorage() const; public: /// \brief Get the imported owning module, if this decl is from an imported @@ -656,7 +658,7 @@ public: return reinterpret_cast(this)[-1]; } void setLocalOwningModule(Module *M) { - assert(!isFromASTFile() && Hidden && + assert(!isFromASTFile() && Hidden && hasLocalOwningModuleStorage() && "should not have a cached owning module"); reinterpret_cast(this)[-1] = M; } Modified: vendor/clang/dist/include/clang/AST/DeclCXX.h ============================================================================== --- vendor/clang/dist/include/clang/AST/DeclCXX.h Tue Jun 9 19:07:29 2015 (r284185) +++ vendor/clang/dist/include/clang/AST/DeclCXX.h Tue Jun 9 19:08:19 2015 (r284186) @@ -1392,6 +1392,10 @@ public: /// \brief Returns the destructor decl for this class. CXXDestructorDecl *getDestructor() const; + /// \brief Returns true if the class destructor, or any implicitly invoked + /// destructors are marked noreturn. + bool isAnyDestructorNoReturn() const; + /// \brief If the class is a local class [class.local], returns /// the enclosing function declaration. const FunctionDecl *isLocalClass() const { Modified: vendor/clang/dist/include/clang/ASTMatchers/ASTMatchers.h ============================================================================== --- vendor/clang/dist/include/clang/ASTMatchers/ASTMatchers.h Tue Jun 9 19:07:29 2015 (r284185) +++ vendor/clang/dist/include/clang/ASTMatchers/ASTMatchers.h Tue Jun 9 19:08:19 2015 (r284186) @@ -1476,6 +1476,23 @@ const internal::VariadicDynCastAllOfMatc Stmt, ConditionalOperator> conditionalOperator; +/// \brief Matches a C++ static_assert declaration. +/// +/// Example: +/// staticAssertExpr() +/// matches +/// static_assert(sizeof(S) == sizeof(int)) +/// in +/// \code +/// struct S { +/// int x; +/// }; +/// static_assert(sizeof(S) == sizeof(int)); +/// \endcode +const internal::VariadicDynCastAllOfMatcher< + Decl, + StaticAssertDecl> staticAssertDecl; + /// \brief Matches a reinterpret_cast expression. /// /// Either the source expression or the destination type can be matched Modified: vendor/clang/dist/include/clang/Analysis/CFG.h ============================================================================== --- vendor/clang/dist/include/clang/Analysis/CFG.h Tue Jun 9 19:07:29 2015 (r284185) +++ vendor/clang/dist/include/clang/Analysis/CFG.h Tue Jun 9 19:08:19 2015 (r284186) @@ -738,6 +738,7 @@ public: bool AddTemporaryDtors; bool AddStaticInitBranches; bool AddCXXNewAllocator; + bool AddCXXDefaultInitExprInCtors; bool alwaysAdd(const Stmt *stmt) const { return alwaysAddMask[stmt->getStmtClass()]; @@ -758,7 +759,7 @@ public: PruneTriviallyFalseEdges(true), AddEHEdges(false), AddInitializers(false), AddImplicitDtors(false), AddTemporaryDtors(false), AddStaticInitBranches(false), - AddCXXNewAllocator(false) {} + AddCXXNewAllocator(false), AddCXXDefaultInitExprInCtors(false) {} }; /// \brief Provides a custom implementation of the iterator class to have the Modified: vendor/clang/dist/include/clang/Basic/DiagnosticCommonKinds.td ============================================================================== --- vendor/clang/dist/include/clang/Basic/DiagnosticCommonKinds.td Tue Jun 9 19:07:29 2015 (r284185) +++ vendor/clang/dist/include/clang/Basic/DiagnosticCommonKinds.td Tue Jun 9 19:08:19 2015 (r284186) @@ -115,7 +115,23 @@ def err_integer_literal_too_large : Erro def ext_integer_literal_too_large_for_signed : ExtWarn< "integer literal is too large to be represented in a signed integer type, " "interpreting as unsigned">, - InGroup>; + InGroup; +def warn_old_implicitly_unsigned_long : Warning< + "integer literal is too large to be represented in type 'long', " + "interpreting as 'unsigned long' per C89; this literal will " + "%select{have type 'long long'|be ill-formed}0 in C99 onwards">, + InGroup; +def warn_old_implicitly_unsigned_long_cxx : Warning< + "integer literal is too large to be represented in type 'long', " + "interpreting as 'unsigned long' per C++98; this literal will " + "%select{have type 'long long'|be ill-formed}0 in C++11 onwards">, + InGroup; +def ext_old_implicitly_unsigned_long_cxx : ExtWarn< + "integer literal is too large to be represented in type 'long' and is " + "subject to undefined behavior under C++98, interpreting as 'unsigned long'; " + "this literal will %select{have type 'long long'|be ill-formed}0 " + "in C++11 onwards">, + InGroup; // SEH def err_seh_expected_handler : Error< Modified: vendor/clang/dist/include/clang/Basic/DiagnosticGroups.td ============================================================================== --- vendor/clang/dist/include/clang/Basic/DiagnosticGroups.td Tue Jun 9 19:07:29 2015 (r284185) +++ vendor/clang/dist/include/clang/Basic/DiagnosticGroups.td Tue Jun 9 19:08:19 2015 (r284186) @@ -239,6 +239,7 @@ def MultiChar : DiagGroup<"multichar">; def : DiagGroup<"nested-externs">; def CXX11LongLong : DiagGroup<"c++11-long-long">; def LongLong : DiagGroup<"long-long", [CXX11LongLong]>; +def ImplicitlyUnsignedLiteral : DiagGroup<"implicitly-unsigned-literal">; def MethodSignatures : DiagGroup<"method-signatures">; def MismatchedParameterTypes : DiagGroup<"mismatched-parameter-types">; def MismatchedReturnTypes : DiagGroup<"mismatched-return-types">; @@ -264,6 +265,8 @@ def : DiagGroup<"overflow">; def ForwardClassReceiver : DiagGroup<"receiver-forward-class">; def MethodAccess : DiagGroup<"objc-method-access">; def ObjCReceiver : DiagGroup<"receiver-expr">; +// FIXME: Remove this when Xcode removes the warning setting. +def : DiagGroup<"receiver-is-weak">; def OperatorNewReturnsNull : DiagGroup<"new-returns-null">; def OverlengthStrings : DiagGroup<"overlength-strings">; def OverloadedVirtual : DiagGroup<"overloaded-virtual">; Modified: vendor/clang/dist/include/clang/Basic/DiagnosticSemaKinds.td ============================================================================== --- vendor/clang/dist/include/clang/Basic/DiagnosticSemaKinds.td Tue Jun 9 19:07:29 2015 (r284185) +++ vendor/clang/dist/include/clang/Basic/DiagnosticSemaKinds.td Tue Jun 9 19:08:19 2015 (r284186) @@ -908,10 +908,6 @@ def warn_dealloc_in_category : Warning< InGroup; def err_gc_weak_property_strong_type : Error< "weak attribute declared on a __strong type property in GC mode">; -def warn_receiver_is_weak : Warning < - "weak %select{receiver|property|implicit property}0 may be " - "unpredictably set to nil">, - InGroup>, DefaultIgnore; def warn_arc_repeated_use_of_weak : Warning < "weak %select{variable|property|implicit property|instance variable}0 %1 is " "accessed multiple times in this %select{function|method|block|lambda}2 " @@ -2262,8 +2258,7 @@ def err_attribute_dll_member_of_dll_clas "attribute %q0 cannot be applied to member of %q1 class">; def warn_attribute_dll_instantiated_base_class : Warning< "propagating dll attribute to %select{already instantiated|explicitly specialized}0 " - "base class template " - "%select{without dll attribute|with different dll attribute}1 is not supported">, + "base class template without dll attribute is not supported">, InGroup>, DefaultIgnore; def err_attribute_weakref_not_static : Error< "weakref declaration must have internal linkage">; @@ -5390,6 +5385,10 @@ def err_bad_const_cast_dest : Error< "which is not a reference, pointer-to-object, or pointer-to-data-member">; def ext_cast_fn_obj : Extension< "cast between pointer-to-function and pointer-to-object is an extension">; +def ext_ms_cast_fn_obj : ExtWarn< + "static_cast between pointer-to-function and pointer-to-object is a " + "Microsoft extension">, + InGroup; def warn_cxx98_compat_cast_fn_obj : Warning< "cast between pointer-to-function and pointer-to-object is incompatible with C++98">, InGroup, DefaultIgnore; @@ -6334,6 +6333,9 @@ let CategoryName = "Inline Assembly Issu "remove the cast or build with -fheinous-gnu-extensions">; def err_invalid_asm_value_for_constraint : Error <"value '%0' out of range for constraint '%1'">; + def err_asm_bitfield_in_memory_constraint + : Error <"reference to a bit-field in asm " + "%select{input|output}0 with a memory constraint '%1'">; def warn_asm_label_on_auto_decl : Warning< "ignored asm label '%0' on automatic variable">; @@ -7404,8 +7406,6 @@ def err_omp_unexpected_clause_value : Er "expected %0 in OpenMP clause '%1'">; def err_omp_expected_var_name : Error< "expected variable name">; -def err_omp_required_method : Error< - "%0 variable must have an accessible, unambiguous %select{default constructor|copy constructor|copy assignment operator|'%2'|destructor}1">; def note_omp_task_predetermined_firstprivate_here : Note< "predetermined as a firstprivate in a task construct here">; def err_omp_clause_ref_type_arg : Error< Modified: vendor/clang/dist/include/clang/Basic/TokenKinds.def ============================================================================== --- vendor/clang/dist/include/clang/Basic/TokenKinds.def Tue Jun 9 19:07:29 2015 (r284185) +++ vendor/clang/dist/include/clang/Basic/TokenKinds.def Tue Jun 9 19:08:19 2015 (r284186) @@ -10,7 +10,8 @@ // This file defines the TokenKind database. This includes normal tokens like // tok::ampamp (corresponding to the && token) as well as keywords for various // languages. Users of this file must optionally #define the TOK, KEYWORD, -// CXX11_KEYWORD, ALIAS, or PPKEYWORD macros to make use of this file. +// CXX11_KEYWORD, CONCEPTS_KEYWORD, ALIAS, or PPKEYWORD macros to make use of +// this file. // //===----------------------------------------------------------------------===// @@ -26,6 +27,9 @@ #ifndef CXX11_KEYWORD #define CXX11_KEYWORD(X,Y) KEYWORD(X,KEYCXX11|(Y)) #endif +#ifndef CONCEPTS_KEYWORD +#define CONCEPTS_KEYWORD(X) KEYWORD(X,KEYCONCEPTS) +#endif #ifndef TYPE_TRAIT #define TYPE_TRAIT(N,I,K) KEYWORD(I,K) #endif @@ -226,6 +230,8 @@ PUNCTUATOR(greatergreatergreater, ">>>") // implementation namespace // KEYNOCXX - This is a keyword in every non-C++ dialect. // KEYCXX11 - This is a C++ keyword introduced to C++ in C++11 +// KEYCONCEPTS - This is a keyword if the C++ extensions for concepts +// are enabled. // KEYGNU - This is a keyword if GNU extensions are enabled // KEYMS - This is a keyword if Microsoft extensions are enabled // KEYNOMS18 - This is a keyword that must never be enabled under @@ -344,6 +350,10 @@ CXX11_KEYWORD(nullptr , 0) CXX11_KEYWORD(static_assert , 0) CXX11_KEYWORD(thread_local , 0) +// C++ concepts TS keywords +CONCEPTS_KEYWORD(concept) +CONCEPTS_KEYWORD(requires) + // GNU Extensions (in impl-reserved namespace) KEYWORD(_Decimal32 , KEYALL) KEYWORD(_Decimal64 , KEYALL) @@ -738,6 +748,7 @@ ANNOTATION(module_end) #undef TYPE_TRAIT_2 #undef TYPE_TRAIT_1 #undef TYPE_TRAIT +#undef CONCEPTS_KEYWORD #undef CXX11_KEYWORD #undef KEYWORD #undef PUNCTUATOR Modified: vendor/clang/dist/include/clang/Config/config.h.cmake ============================================================================== --- vendor/clang/dist/include/clang/Config/config.h.cmake Tue Jun 9 19:07:29 2015 (r284185) +++ vendor/clang/dist/include/clang/Config/config.h.cmake Tue Jun 9 19:08:19 2015 (r284186) @@ -8,6 +8,9 @@ /* Bug report URL. */ #define BUG_REPORT_URL "${BUG_REPORT_URL}" +/* Default OpenMP runtime used by -fopenmp. */ +#define CLANG_DEFAULT_OPENMP_RUNTIME "${CLANG_DEFAULT_OPENMP_RUNTIME}" + /* Multilib suffix for libdir. */ #define CLANG_LIBDIR_SUFFIX "${CLANG_LIBDIR_SUFFIX}" Modified: vendor/clang/dist/include/clang/Config/config.h.in ============================================================================== --- vendor/clang/dist/include/clang/Config/config.h.in Tue Jun 9 19:07:29 2015 (r284185) +++ vendor/clang/dist/include/clang/Config/config.h.in Tue Jun 9 19:08:19 2015 (r284186) @@ -8,6 +8,9 @@ /* Bug report URL. */ #undef BUG_REPORT_URL +/* Default OpenMP runtime used by -fopenmp. */ +#undef CLANG_DEFAULT_OPENMP_RUNTIME + /* Multilib suffix for libdir. */ #undef CLANG_LIBDIR_SUFFIX Modified: vendor/clang/dist/include/clang/Driver/CLCompatOptions.td ============================================================================== --- vendor/clang/dist/include/clang/Driver/CLCompatOptions.td Tue Jun 9 19:07:29 2015 (r284185) +++ vendor/clang/dist/include/clang/Driver/CLCompatOptions.td Tue Jun 9 19:08:19 2015 (r284186) @@ -202,6 +202,7 @@ def _SLASH_Fi : CLCompileJoined<"Fi">, def _SLASH_Fo : CLCompileJoined<"Fo">, HelpText<"Set output object file, or directory (ends in / or \\)">, MetaVarName<"">; +def _SLASH_GL : CLFlag<"GL">, Alias; def _SLASH_LD : CLFlag<"LD">, HelpText<"Create DLL">; def _SLASH_LDd : CLFlag<"LDd">, HelpText<"Create debug DLL">; def _SLASH_link : CLRemainingArgs<"link">, @@ -286,7 +287,6 @@ def _SLASH_G2 : CLFlag<"G2">; def _SLASH_Ge : CLFlag<"Ge">; def _SLASH_Gh : CLFlag<"Gh">; def _SLASH_GH : CLFlag<"GH">; -def _SLASH_GL : CLFlag<"GL">; def _SLASH_GL_ : CLFlag<"GL-">; def _SLASH_Gm : CLFlag<"Gm">; def _SLASH_Gm_ : CLFlag<"Gm-">; Modified: vendor/clang/dist/include/clang/Driver/Options.td ============================================================================== --- vendor/clang/dist/include/clang/Driver/Options.td Tue Jun 9 19:07:29 2015 (r284185) +++ vendor/clang/dist/include/clang/Driver/Options.td Tue Jun 9 19:08:19 2015 (r284186) @@ -876,6 +876,7 @@ def fno_objc_nonfragile_abi : Flag<["-"] def fobjc_sender_dependent_dispatch : Flag<["-"], "fobjc-sender-dependent-dispatch">, Group; def fomit_frame_pointer : Flag<["-"], "fomit-frame-pointer">, Group; def fopenmp : Flag<["-"], "fopenmp">, Group, Flags<[CC1Option, NoArgumentUnused]>; +def fno_openmp : Flag<["-"], "fno-openmp">, Group, Flags<[NoArgumentUnused]>; def fopenmp_EQ : Joined<["-"], "fopenmp=">, Group; def fno_optimize_sibling_calls : Flag<["-"], "fno-optimize-sibling-calls">, Group; def foptimize_sibling_calls : Flag<["-"], "foptimize-sibling-calls">, Group; Modified: vendor/clang/dist/include/clang/Driver/Types.def ============================================================================== --- vendor/clang/dist/include/clang/Driver/Types.def Tue Jun 9 19:07:29 2015 (r284185) +++ vendor/clang/dist/include/clang/Driver/Types.def Tue Jun 9 19:08:19 2015 (r284186) @@ -55,14 +55,14 @@ TYPE("objective-c++", ObjCXX, // C family input files to precompile. TYPE("c-header-cpp-output", PP_CHeader, INVALID, "i", "p") -TYPE("c-header", CHeader, PP_CHeader, nullptr, "pu") -TYPE("cl-header", CLHeader, PP_CHeader, nullptr, "pu") +TYPE("c-header", CHeader, PP_CHeader, "h", "pu") +TYPE("cl-header", CLHeader, PP_CHeader, "h", "pu") TYPE("objective-c-header-cpp-output", PP_ObjCHeader, INVALID, "mi", "p") -TYPE("objective-c-header", ObjCHeader, PP_ObjCHeader, nullptr, "pu") +TYPE("objective-c-header", ObjCHeader, PP_ObjCHeader, "h", "pu") TYPE("c++-header-cpp-output", PP_CXXHeader, INVALID, "ii", "p") -TYPE("c++-header", CXXHeader, PP_CXXHeader, nullptr, "pu") +TYPE("c++-header", CXXHeader, PP_CXXHeader, "hh", "pu") TYPE("objective-c++-header-cpp-output", PP_ObjCXXHeader, INVALID, "mii", "p") -TYPE("objective-c++-header", ObjCXXHeader, PP_ObjCXXHeader, nullptr, "pu") +TYPE("objective-c++-header", ObjCXXHeader, PP_ObjCXXHeader, "h", "pu") // Other languages. TYPE("ada", Ada, INVALID, nullptr, "u") Modified: vendor/clang/dist/include/clang/Lex/HeaderSearchOptions.h ============================================================================== --- vendor/clang/dist/include/clang/Lex/HeaderSearchOptions.h Tue Jun 9 19:07:29 2015 (r284185) +++ vendor/clang/dist/include/clang/Lex/HeaderSearchOptions.h Tue Jun 9 19:08:19 2015 (r284186) @@ -180,14 +180,14 @@ public: /// AddPath - Add the \p Path path to the specified \p Group list. void AddPath(StringRef Path, frontend::IncludeDirGroup Group, bool IsFramework, bool IgnoreSysRoot) { - UserEntries.push_back(Entry(Path, Group, IsFramework, IgnoreSysRoot)); + UserEntries.emplace_back(Path, Group, IsFramework, IgnoreSysRoot); } /// AddSystemHeaderPrefix - Override whether \#include directives naming a /// path starting with \p Prefix should be considered as naming a system /// header. void AddSystemHeaderPrefix(StringRef Prefix, bool IsSystemHeader) { - SystemHeaderPrefixes.push_back(SystemHeaderPrefix(Prefix, IsSystemHeader)); + SystemHeaderPrefixes.emplace_back(Prefix, IsSystemHeader); } void AddVFSOverlayFile(StringRef Name) { Modified: vendor/clang/dist/include/clang/Lex/Lexer.h ============================================================================== --- vendor/clang/dist/include/clang/Lex/Lexer.h Tue Jun 9 19:07:29 2015 (r284185) +++ vendor/clang/dist/include/clang/Lex/Lexer.h Tue Jun 9 19:08:19 2015 (r284186) @@ -228,7 +228,7 @@ public: /// Stringify - Convert the specified string into a C string by escaping '\' /// and " characters. This does not add surrounding ""'s to the string. /// If Charify is true, this escapes the ' character instead of ". - static std::string Stringify(const std::string &Str, bool Charify = false); + static std::string Stringify(StringRef Str, bool Charify = false); /// Stringify - Convert the specified string into a C string by escaping '\' /// and " characters. This does not add surrounding ""'s to the string. Modified: vendor/clang/dist/include/clang/Lex/MacroInfo.h ============================================================================== --- vendor/clang/dist/include/clang/Lex/MacroInfo.h Tue Jun 9 19:07:29 2015 (r284185) +++ vendor/clang/dist/include/clang/Lex/MacroInfo.h Tue Jun 9 19:08:19 2015 (r284186) @@ -44,8 +44,8 @@ class MacroInfo { /// /// ArgumentList points to the first of NumArguments pointers. /// - /// This can be empty, for, e.g. "#define X()". In a C99-style variadic macro, this - /// includes the \c __VA_ARGS__ identifier on the list. + /// This can be empty, for, e.g. "#define X()". In a C99-style variadic + /// macro, this includes the \c __VA_ARGS__ identifier on the list. IdentifierInfo **ArgumentList; /// \see ArgumentList @@ -70,15 +70,15 @@ class MacroInfo { /// \brief True if this macro is of the form "#define X(a...)". /// - /// The "a" identifier in the replacement list will be replaced with all arguments - /// of the macro starting with the specified one. + /// The "a" identifier in the replacement list will be replaced with all + /// arguments of the macro starting with the specified one. bool IsGNUVarargs : 1; /// \brief True if this macro requires processing before expansion. /// /// This is the case for builtin macros such as __LINE__, so long as they have - /// not been redefined, but not for regular predefined macros from the "" - /// memory buffer (see Preprocessing::getPredefinesFileID). + /// not been redefined, but not for regular predefined macros from the + /// "" memory buffer (see Preprocessing::getPredefinesFileID). bool IsBuiltinMacro : 1; /// \brief Whether this macro contains the sequence ", ## __VA_ARGS__" @@ -143,14 +143,10 @@ public: bool Syntactically) const; /// \brief Set or clear the isBuiltinMacro flag. - void setIsBuiltinMacro(bool Val = true) { - IsBuiltinMacro = Val; - } + void setIsBuiltinMacro(bool Val = true) { IsBuiltinMacro = Val; } /// \brief Set the value of the IsUsed flag. - void setIsUsed(bool Val) { - IsUsed = Val; - } + void setIsUsed(bool Val) { IsUsed = Val; } /// \brief Set the value of the IsAllowRedefinitionsWithoutWarning flag. void setIsAllowRedefinitionsWithoutWarning(bool Val) { @@ -158,37 +154,40 @@ public: } /// \brief Set the value of the IsWarnIfUnused flag. - void setIsWarnIfUnused(bool val) { - IsWarnIfUnused = val; - } + void setIsWarnIfUnused(bool val) { IsWarnIfUnused = val; } /// \brief Set the specified list of identifiers as the argument list for /// this macro. - void setArgumentList(IdentifierInfo* const *List, unsigned NumArgs, + void setArgumentList(IdentifierInfo *const *List, unsigned NumArgs, llvm::BumpPtrAllocator &PPAllocator) { assert(ArgumentList == nullptr && NumArguments == 0 && "Argument list already set!"); - if (NumArgs == 0) return; + if (NumArgs == 0) + return; NumArguments = NumArgs; - ArgumentList = PPAllocator.Allocate(NumArgs); + ArgumentList = PPAllocator.Allocate(NumArgs); for (unsigned i = 0; i != NumArgs; ++i) ArgumentList[i] = List[i]; } /// Arguments - The list of arguments for a function-like macro. This can be /// empty, for, e.g. "#define X()". - typedef IdentifierInfo* const *arg_iterator; + typedef IdentifierInfo *const *arg_iterator; bool arg_empty() const { return NumArguments == 0; } arg_iterator arg_begin() const { return ArgumentList; } - arg_iterator arg_end() const { return ArgumentList+NumArguments; } + arg_iterator arg_end() const { return ArgumentList + NumArguments; } unsigned getNumArgs() const { return NumArguments; } + ArrayRef args() const { + return ArrayRef(ArgumentList, NumArguments); + } /// \brief Return the argument number of the specified identifier, /// or -1 if the identifier is not a formal argument identifier. - int getArgumentNum(IdentifierInfo *Arg) const { + int getArgumentNum(const IdentifierInfo *Arg) const { for (arg_iterator I = arg_begin(), E = arg_end(); I != E; ++I) - if (*I == Arg) return I-arg_begin(); + if (*I == Arg) + return I - arg_begin(); return -1; } @@ -226,15 +225,11 @@ public: } /// \brief Return true if we should emit a warning if the macro is unused. - bool isWarnIfUnused() const { - return IsWarnIfUnused; - } + bool isWarnIfUnused() const { return IsWarnIfUnused; } /// \brief Return the number of tokens that this macro expands to. /// - unsigned getNumTokens() const { - return ReplacementTokens.size(); - } + unsigned getNumTokens() const { return ReplacementTokens.size(); } const Token &getReplacementToken(unsigned Tok) const { assert(Tok < ReplacementTokens.size() && "Invalid token #"); @@ -249,8 +244,9 @@ public: /// \brief Add the specified token to the replacement text for the macro. void AddTokenToBody(const Token &Tok) { - assert(!IsDefinitionLengthCached && - "Changing replacement tokens after definition length got calculated"); + assert( + !IsDefinitionLengthCached && + "Changing replacement tokens after definition length got calculated"); ReplacementTokens.push_back(Tok); } @@ -282,7 +278,7 @@ public: /// macro info. unsigned getOwningModuleID() const { if (isFromASTFile()) - return *(const unsigned*)(this+1); + return *(const unsigned *)(this + 1); return 0; } @@ -294,7 +290,7 @@ private: void setOwningModuleID(unsigned ID) { assert(isFromASTFile()); - *(unsigned*)(this+1) = ID; + *(unsigned *)(this + 1) = ID; } friend class Preprocessor; @@ -311,11 +307,7 @@ class DefMacroDirective; /// create additional DefMacroDirectives for the same MacroInfo. class MacroDirective { public: - enum Kind { - MD_Define, - MD_Undefine, - MD_Visibility - }; + enum Kind { MD_Define, MD_Undefine, MD_Visibility }; protected: /// \brief Previous macro directive for the same identifier, or NULL. @@ -345,9 +337,7 @@ public: SourceLocation getLocation() const { return Loc; } /// \brief Set previous definition of the macro with the same name. - void setPrevious(MacroDirective *Prev) { - Previous = Prev; - } + void setPrevious(MacroDirective *Prev) { Previous = Prev; } /// \brief Get previous definition of the macro with the same name. const MacroDirective *getPrevious() const { return Previous; } @@ -366,19 +356,19 @@ public: bool IsPublic; public: - DefInfo() : DefDirective(nullptr), IsPublic(true) { } + DefInfo() : DefDirective(nullptr), IsPublic(true) {} DefInfo(DefMacroDirective *DefDirective, SourceLocation UndefLoc, bool isPublic) - : DefDirective(DefDirective), UndefLoc(UndefLoc), IsPublic(isPublic) { } + : DefDirective(DefDirective), UndefLoc(UndefLoc), IsPublic(isPublic) {} const DefMacroDirective *getDirective() const { return DefDirective; } - DefMacroDirective *getDirective() { return DefDirective; } + DefMacroDirective *getDirective() { return DefDirective; } inline SourceLocation getLocation() const; inline MacroInfo *getMacroInfo(); const MacroInfo *getMacroInfo() const { - return const_cast(this)->getMacroInfo(); + return const_cast(this)->getMacroInfo(); } SourceLocation getUndefLocation() const { return UndefLoc; } @@ -393,7 +383,7 @@ public: inline DefInfo getPreviousDefinition(); const DefInfo getPreviousDefinition() const { - return const_cast(this)->getPreviousDefinition(); + return const_cast(this)->getPreviousDefinition(); } }; @@ -402,7 +392,7 @@ public: /// (if there is one) and if it is public or private. DefInfo getDefinition(); const DefInfo getDefinition() const { - return const_cast(this)->getDefinition(); + return const_cast(this)->getDefinition(); } bool isDefined() const { @@ -414,9 +404,7 @@ public: const MacroInfo *getMacroInfo() const { return getDefinition().getMacroInfo(); } - MacroInfo *getMacroInfo() { - return getDefinition().getMacroInfo(); - } + MacroInfo *getMacroInfo() { return getDefinition().getMacroInfo(); } /// \brief Find macro definition active in the specified source location. If /// this macro was not defined there, return NULL. @@ -450,7 +438,7 @@ public: }; /// \brief A directive for an undefined macro. -class UndefMacroDirective : public MacroDirective { +class UndefMacroDirective : public MacroDirective { public: explicit UndefMacroDirective(SourceLocation UndefLoc) : MacroDirective(MD_Undefine, UndefLoc) { @@ -464,7 +452,7 @@ public: }; /// \brief A directive for setting the module visibility of a macro. -class VisibilityMacroDirective : public MacroDirective { +class VisibilityMacroDirective : public MacroDirective { public: explicit VisibilityMacroDirective(SourceLocation Loc, bool Public) : MacroDirective(MD_Visibility, Loc) { @@ -518,14 +506,14 @@ class ModuleMacro : public llvm::Folding unsigned NumOverriddenBy; /// The number of modules whose macros are directly overridden by this one. unsigned NumOverrides; - //ModuleMacro *OverriddenMacros[NumOverrides]; + // ModuleMacro *OverriddenMacros[NumOverrides]; friend class Preprocessor; ModuleMacro(Module *OwningModule, IdentifierInfo *II, MacroInfo *Macro, ArrayRef Overrides) - : II(II), Macro(Macro), OwningModule(OwningModule), - NumOverriddenBy(0), NumOverrides(Overrides.size()) { + : II(II), Macro(Macro), OwningModule(OwningModule), NumOverriddenBy(0), + NumOverrides(Overrides.size()) { std::copy(Overrides.begin(), Overrides.end(), reinterpret_cast(this + 1)); } Modified: vendor/clang/dist/include/clang/Lex/ModuleMap.h ============================================================================== --- vendor/clang/dist/include/clang/Lex/ModuleMap.h Tue Jun 9 19:07:29 2015 (r284185) +++ vendor/clang/dist/include/clang/Lex/ModuleMap.h Tue Jun 9 19:08:19 2015 (r284186) @@ -272,16 +272,11 @@ public: /// used from. Used to disambiguate if a header is present in multiple /// modules. /// - /// \param IncludeTextualHeaders If \c true, also find textual headers. By - /// default, these are treated like excluded headers and result in no known - /// header being found. - /// /// \returns The module KnownHeader, which provides the module that owns the /// given header file. The KnownHeader is default constructed to indicate /// that no module owns this header file. KnownHeader findModuleForHeader(const FileEntry *File, - Module *RequestingModule = nullptr, - bool IncludeTextualHeaders = false); + Module *RequestingModule = nullptr); /// \brief Reports errors if a module must not include a specific file. /// Modified: vendor/clang/dist/include/clang/Lex/PPCallbacks.h ============================================================================== --- vendor/clang/dist/include/clang/Lex/PPCallbacks.h Tue Jun 9 19:07:29 2015 (r284185) +++ vendor/clang/dist/include/clang/Lex/PPCallbacks.h Tue Jun 9 19:08:19 2015 (r284186) @@ -155,7 +155,7 @@ public: /// \param Loc The location of the directive. /// \param str The text of the directive. /// - virtual void Ident(SourceLocation Loc, const std::string &str) { + virtual void Ident(SourceLocation Loc, StringRef str) { } /// \brief Callback invoked when start reading any pragma directive. @@ -165,14 +165,13 @@ public: /// \brief Callback invoked when a \#pragma comment directive is read. virtual void PragmaComment(SourceLocation Loc, const IdentifierInfo *Kind, - const std::string &Str) { + StringRef Str) { } /// \brief Callback invoked when a \#pragma detect_mismatch directive is /// read. - virtual void PragmaDetectMismatch(SourceLocation Loc, - const std::string &Name, - const std::string &Value) { + virtual void PragmaDetectMismatch(SourceLocation Loc, StringRef Name, + StringRef Value) { } /// \brief Callback invoked when a \#pragma clang __debug directive is read. @@ -375,19 +374,19 @@ public: Second->EndOfMainFile(); } - void Ident(SourceLocation Loc, const std::string &str) override { + void Ident(SourceLocation Loc, StringRef str) override { First->Ident(Loc, str); Second->Ident(Loc, str); } void PragmaComment(SourceLocation Loc, const IdentifierInfo *Kind, - const std::string &Str) override { + StringRef Str) override { First->PragmaComment(Loc, Kind, Str); Second->PragmaComment(Loc, Kind, Str); } - void PragmaDetectMismatch(SourceLocation Loc, const std::string &Name, - const std::string &Value) override { + void PragmaDetectMismatch(SourceLocation Loc, StringRef Name, + StringRef Value) override { First->PragmaDetectMismatch(Loc, Name, Value); Second->PragmaDetectMismatch(Loc, Name, Value); } Modified: vendor/clang/dist/include/clang/Lex/PTHManager.h ============================================================================== --- vendor/clang/dist/include/clang/Lex/PTHManager.h Tue Jun 9 19:07:29 2015 (r284185) +++ vendor/clang/dist/include/clang/Lex/PTHManager.h Tue Jun 9 19:08:19 2015 (r284186) @@ -129,7 +129,7 @@ public: /// Create - This method creates PTHManager objects. The 'file' argument /// is the name of the PTH file. This method returns NULL upon failure. - static PTHManager *Create(const std::string& file, DiagnosticsEngine &Diags); + static PTHManager *Create(StringRef file, DiagnosticsEngine &Diags); void setPreprocessor(Preprocessor *pp) { PP = pp; } Modified: vendor/clang/dist/include/clang/Lex/Preprocessor.h ============================================================================== --- vendor/clang/dist/include/clang/Lex/Preprocessor.h Tue Jun 9 19:07:29 2015 (r284185) +++ vendor/clang/dist/include/clang/Lex/Preprocessor.h Tue Jun 9 19:08:19 2015 (r284186) @@ -890,7 +890,7 @@ public: /// /// These predefines are automatically injected when parsing the main file. void setPredefines(const char *P) { Predefines = P; } - void setPredefines(const std::string &P) { Predefines = P; } + void setPredefines(StringRef P) { Predefines = P; } /// Return information about the specified preprocessor /// identifier token. @@ -1617,9 +1617,9 @@ private: void PushIncludeMacroStack() { assert(CurLexerKind != CLK_CachingLexer && "cannot push a caching lexer"); - IncludeMacroStack.push_back(IncludeStackInfo( + IncludeMacroStack.emplace_back( CurLexerKind, CurSubmodule, std::move(CurLexer), std::move(CurPTHLexer), - CurPPLexer, std::move(CurTokenLexer), CurDirLookup)); + CurPPLexer, std::move(CurTokenLexer), CurDirLookup); CurPPLexer = nullptr; } Modified: vendor/clang/dist/include/clang/Lex/PreprocessorOptions.h ============================================================================== --- vendor/clang/dist/include/clang/Lex/PreprocessorOptions.h Tue Jun 9 19:07:29 2015 (r284185) +++ vendor/clang/dist/include/clang/Lex/PreprocessorOptions.h Tue Jun 9 19:08:19 2015 (r284186) @@ -149,18 +149,14 @@ public: RetainRemappedFileBuffers(false), ObjCXXARCStandardLibrary(ARCXX_nolib) { } - void addMacroDef(StringRef Name) { - Macros.push_back(std::make_pair(Name, false)); - } - void addMacroUndef(StringRef Name) { - Macros.push_back(std::make_pair(Name, true)); - } + void addMacroDef(StringRef Name) { Macros.emplace_back(Name, false); } + void addMacroUndef(StringRef Name) { Macros.emplace_back(Name, true); } void addRemappedFile(StringRef From, StringRef To) { - RemappedFiles.push_back(std::make_pair(From, To)); + RemappedFiles.emplace_back(From, To); } void addRemappedFile(StringRef From, llvm::MemoryBuffer *To) { - RemappedFileBuffers.push_back(std::make_pair(From, To)); + RemappedFileBuffers.emplace_back(From, To); } void clearRemappedFiles() { Modified: vendor/clang/dist/include/clang/Sema/Lookup.h ============================================================================== --- vendor/clang/dist/include/clang/Sema/Lookup.h Tue Jun 9 19:07:29 2015 (r284185) +++ vendor/clang/dist/include/clang/Sema/Lookup.h Tue Jun 9 19:08:19 2015 (r284186) @@ -302,10 +302,14 @@ public: if (!D->isInIdentifierNamespace(IDNS)) return nullptr; - if (isHiddenDeclarationVisible() || isVisible(getSema(), D)) + if (isVisible(getSema(), D)) return D; - return getAcceptableDeclSlow(D); + if (auto *Visible = getAcceptableDeclSlow(D)) + return Visible; + + // Even if hidden declarations are visible, prefer a visible declaration. + return isHiddenDeclarationVisible() ? D : nullptr; } private: Modified: vendor/clang/dist/include/clang/Sema/Sema.h ============================================================================== --- vendor/clang/dist/include/clang/Sema/Sema.h Tue Jun 9 19:07:29 2015 (r284185) +++ vendor/clang/dist/include/clang/Sema/Sema.h Tue Jun 9 19:08:19 2015 (r284186) @@ -5110,6 +5110,10 @@ public: bool AnyErrors); void checkClassLevelDLLAttribute(CXXRecordDecl *Class); + void propagateDLLAttrToBaseClassTemplate( + CXXRecordDecl *Class, Attr *ClassAttr, + ClassTemplateSpecializationDecl *BaseTemplateSpec, + SourceLocation BaseLoc); void CheckCompletedCXXClass(CXXRecordDecl *Record); void ActOnFinishCXXMemberSpecification(Scope* S, SourceLocation RLoc, Decl *TagDecl, Modified: vendor/clang/dist/include/clang/Tooling/Core/Replacement.h ============================================================================== --- vendor/clang/dist/include/clang/Tooling/Core/Replacement.h Tue Jun 9 19:07:29 2015 (r284185) +++ vendor/clang/dist/include/clang/Tooling/Core/Replacement.h Tue Jun 9 19:08:19 2015 (r284186) @@ -19,6 +19,7 @@ #ifndef LLVM_CLANG_TOOLING_CORE_REPLACEMENT_H #define LLVM_CLANG_TOOLING_CORE_REPLACEMENT_H +#include "clang/Basic/LangOptions.h" #include "clang/Basic/SourceLocation.h" #include "llvm/ADT/StringRef.h" #include @@ -77,22 +78,24 @@ public: /// \param FilePath A source file accessible via a SourceManager. /// \param Offset The byte offset of the start of the range in the file. /// \param Length The length of the range in bytes. - Replacement(StringRef FilePath, unsigned Offset, - unsigned Length, StringRef ReplacementText); + Replacement(StringRef FilePath, unsigned Offset, unsigned Length, + StringRef ReplacementText); /// \brief Creates a Replacement of the range [Start, Start+Length) with /// ReplacementText. - Replacement(const SourceManager &Sources, SourceLocation Start, unsigned Length, - StringRef ReplacementText); + Replacement(const SourceManager &Sources, SourceLocation Start, + unsigned Length, StringRef ReplacementText); /// \brief Creates a Replacement of the given range with ReplacementText. Replacement(const SourceManager &Sources, const CharSourceRange &Range, - StringRef ReplacementText); + StringRef ReplacementText, + const LangOptions &LangOpts = LangOptions()); /// \brief Creates a Replacement of the node with ReplacementText. template Replacement(const SourceManager &Sources, const Node &NodeToReplace, - StringRef ReplacementText); + StringRef ReplacementText, + const LangOptions &LangOpts = LangOptions()); /// \brief Returns whether this replacement can be applied to a file. /// @@ -114,11 +117,13 @@ public: std::string toString() const; private: - void setFromSourceLocation(const SourceManager &Sources, SourceLocation Start, *** DIFF OUTPUT TRUNCATED AT 1000 LINES ***