Author: dim Date: Thu Feb 27 18:58:42 2020 New Revision: 358397 URL: https://svnweb.freebsd.org/changeset/base/358397
Log: Vendor import of llvm-project branch release/10.x llvmorg-10.0.0-rc2-70-ge5cb70267e7. Modified: vendor/llvm-project/release-10.x/clang/include/clang/Basic/DiagnosticASTKinds.td vendor/llvm-project/release-10.x/clang/include/clang/Basic/DiagnosticCommonKinds.td vendor/llvm-project/release-10.x/clang/include/clang/Basic/DiagnosticDriverKinds.td vendor/llvm-project/release-10.x/clang/include/clang/Basic/DiagnosticFrontendKinds.td vendor/llvm-project/release-10.x/clang/include/clang/Basic/DiagnosticGroups.td vendor/llvm-project/release-10.x/clang/include/clang/Basic/DiagnosticLexKinds.td vendor/llvm-project/release-10.x/clang/include/clang/Basic/DiagnosticParseKinds.td vendor/llvm-project/release-10.x/clang/include/clang/Basic/DiagnosticSemaKinds.td vendor/llvm-project/release-10.x/clang/include/clang/Basic/LangStandards.def vendor/llvm-project/release-10.x/clang/include/clang/Basic/StmtNodes.td vendor/llvm-project/release-10.x/clang/include/clang/Sema/TemplateDeduction.h vendor/llvm-project/release-10.x/clang/lib/ASTMatchers/ASTMatchersInternal.cpp vendor/llvm-project/release-10.x/clang/lib/CodeGen/CodeGenAction.cpp vendor/llvm-project/release-10.x/clang/lib/Driver/ToolChains/Clang.cpp vendor/llvm-project/release-10.x/clang/lib/Driver/ToolChains/Darwin.cpp vendor/llvm-project/release-10.x/clang/lib/Driver/ToolChains/FreeBSD.cpp vendor/llvm-project/release-10.x/clang/lib/Driver/ToolChains/FreeBSD.h vendor/llvm-project/release-10.x/clang/lib/Frontend/InitPreprocessor.cpp vendor/llvm-project/release-10.x/clang/lib/Sema/SemaTemplateDeduction.cpp vendor/llvm-project/release-10.x/clang/lib/Serialization/ASTReader.cpp vendor/llvm-project/release-10.x/clang/lib/Serialization/ASTReaderDecl.cpp vendor/llvm-project/release-10.x/clang/lib/Serialization/ASTWriter.cpp vendor/llvm-project/release-10.x/clang/lib/Serialization/ASTWriterDecl.cpp vendor/llvm-project/release-10.x/clang/lib/Tooling/ArgumentsAdjusters.cpp vendor/llvm-project/release-10.x/compiler-rt/lib/profile/GCDAProfiling.c vendor/llvm-project/release-10.x/libcxx/include/__bit_reference vendor/llvm-project/release-10.x/libunwind/src/UnwindCursor.hpp vendor/llvm-project/release-10.x/lld/docs/ReleaseNotes.rst vendor/llvm-project/release-10.x/lldb/source/Expression/DWARFExpression.cpp vendor/llvm-project/release-10.x/llvm/include/llvm/MC/MCFixupKindInfo.h vendor/llvm-project/release-10.x/llvm/lib/Analysis/MemorySSA.cpp vendor/llvm-project/release-10.x/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp vendor/llvm-project/release-10.x/llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp vendor/llvm-project/release-10.x/llvm/lib/MC/MCAssembler.cpp vendor/llvm-project/release-10.x/llvm/lib/Target/AArch64/AArch64ISelLowering.cpp vendor/llvm-project/release-10.x/llvm/lib/Target/AArch64/AArch64ISelLowering.h vendor/llvm-project/release-10.x/llvm/lib/Target/AArch64/AArch64InstrFormats.td vendor/llvm-project/release-10.x/llvm/lib/Target/AArch64/AArch64InstrInfo.td vendor/llvm-project/release-10.x/llvm/lib/Target/AMDGPU/SIPeepholeSDWA.cpp vendor/llvm-project/release-10.x/llvm/lib/Target/ARM/ARMISelLowering.cpp vendor/llvm-project/release-10.x/llvm/lib/Target/ARM/ARMISelLowering.h vendor/llvm-project/release-10.x/llvm/lib/Target/ARM/ARMInstrVFP.td vendor/llvm-project/release-10.x/llvm/lib/Target/ARM/MCTargetDesc/ARMAsmBackend.cpp vendor/llvm-project/release-10.x/llvm/lib/Target/RISCV/RISCVRegisterInfo.cpp vendor/llvm-project/release-10.x/llvm/lib/Target/X86/X86CmovConversion.cpp vendor/llvm-project/release-10.x/llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp vendor/llvm-project/release-10.x/llvm/lib/Transforms/InstCombine/InstCombineShifts.cpp vendor/llvm-project/release-10.x/llvm/lib/Transforms/Scalar/LICM.cpp vendor/llvm-project/release-10.x/llvm/lib/Transforms/Scalar/LoopRotation.cpp vendor/llvm-project/release-10.x/llvm/lib/Transforms/Utils/BasicBlockUtils.cpp vendor/llvm-project/release-10.x/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp vendor/llvm-project/release-10.x/llvm/utils/TableGen/DFAEmitter.cpp vendor/llvm-project/release-10.x/llvm/utils/TableGen/DFAEmitter.h Modified: vendor/llvm-project/release-10.x/clang/include/clang/Basic/DiagnosticASTKinds.td ============================================================================== --- vendor/llvm-project/release-10.x/clang/include/clang/Basic/DiagnosticASTKinds.td Thu Feb 27 18:49:49 2020 (r358396) +++ vendor/llvm-project/release-10.x/clang/include/clang/Basic/DiagnosticASTKinds.td Thu Feb 27 18:58:42 2020 (r358397) @@ -13,7 +13,7 @@ def note_expr_divide_by_zero : Note<"division by zero" def note_constexpr_invalid_cast : Note< "%select{reinterpret_cast|dynamic_cast|cast that performs the conversions of" " a reinterpret_cast|cast from %1}0 is not allowed in a constant expression" - "%select{| in C++ standards before C++2a||}0">; + "%select{| in C++ standards before C++20||}0">; def note_constexpr_invalid_downcast : Note< "cannot cast object of dynamic type %0 to type %1">; def note_constexpr_overflow : Note< @@ -33,7 +33,7 @@ def note_constexpr_no_return : Note< "control reached end of constexpr function">; def note_constexpr_virtual_call : Note< "cannot evaluate call to virtual function in a constant expression " - "in C++ standards before C++2a">; + "in C++ standards before C++20">; def note_constexpr_pure_virtual_call : Note< "pure virtual function %q0 called">; def note_constexpr_polymorphic_unknown_dynamic_type : Note< @@ -102,7 +102,7 @@ def note_constexpr_var_init_non_constant : Note< "initializer of %0 is not a constant expression">; def note_constexpr_typeid_polymorphic : Note< "typeid applied to expression of polymorphic type %0 is " - "not allowed in a constant expression in C++ standards before C++2a">; + "not allowed in a constant expression in C++ standards before C++20">; def note_constexpr_void_comparison : Note< "comparison between unequal pointers to void has unspecified result">; def note_constexpr_temporary_here : Note<"temporary created here">; Modified: vendor/llvm-project/release-10.x/clang/include/clang/Basic/DiagnosticCommonKinds.td ============================================================================== --- vendor/llvm-project/release-10.x/clang/include/clang/Basic/DiagnosticCommonKinds.td Thu Feb 27 18:49:49 2020 (r358396) +++ vendor/llvm-project/release-10.x/clang/include/clang/Basic/DiagnosticCommonKinds.td Thu Feb 27 18:58:42 2020 (r358397) @@ -120,7 +120,7 @@ def err_enum_template : Error<"enumeration cannot be a def warn_cxx20_compat_consteval : Warning< "'consteval' specifier is incompatible with C++ standards before C++20">, - InGroup<CXX2aCompat>, DefaultIgnore; + InGroup<CXX20Compat>, DefaultIgnore; } Modified: vendor/llvm-project/release-10.x/clang/include/clang/Basic/DiagnosticDriverKinds.td ============================================================================== --- vendor/llvm-project/release-10.x/clang/include/clang/Basic/DiagnosticDriverKinds.td Thu Feb 27 18:49:49 2020 (r358396) +++ vendor/llvm-project/release-10.x/clang/include/clang/Basic/DiagnosticDriverKinds.td Thu Feb 27 18:58:42 2020 (r358397) @@ -271,6 +271,9 @@ def warn_drv_unsupported_debug_info_opt_for_target : W InGroup<UnsupportedTargetOpt>; def warn_c_kext : Warning< "ignoring -fapple-kext which is valid for C++ and Objective-C++ only">; +def warn_ignoring_fdiscard_for_bitcode : Warning< + "ignoring -fdiscard-value-names for LLVM Bitcode">, + InGroup<UnusedCommandLineArgument>; def warn_drv_input_file_unused : Warning< "%0: '%1' input unused%select{ when '%3' is present|}2">, InGroup<UnusedCommandLineArgument>; Modified: vendor/llvm-project/release-10.x/clang/include/clang/Basic/DiagnosticFrontendKinds.td ============================================================================== --- vendor/llvm-project/release-10.x/clang/include/clang/Basic/DiagnosticFrontendKinds.td Thu Feb 27 18:49:49 2020 (r358396) +++ vendor/llvm-project/release-10.x/clang/include/clang/Basic/DiagnosticFrontendKinds.td Thu Feb 27 18:58:42 2020 (r358397) @@ -106,7 +106,7 @@ def err_fe_invalid_wchar_type def err_fe_invalid_exception_model : Error<"invalid exception model '%0' for target '%1'">; def warn_fe_concepts_ts_flag : Warning< - "-fconcepts-ts is deprecated - use '-std=c++2a' for Concepts support">, + "-fconcepts-ts is deprecated - use '-std=c++20' for Concepts support">, InGroup<Deprecated>; def warn_fe_serialized_diag_merge_failure : Warning< @@ -175,9 +175,9 @@ def note_incompatible_analyzer_plugin_api : Note< def err_module_build_requires_fmodules : Error< "module compilation requires '-fmodules'">; def err_module_interface_requires_cpp_modules : Error< - "module interface compilation requires '-std=c++2a' or '-fmodules-ts'">; + "module interface compilation requires '-std=c++20' or '-fmodules-ts'">; def err_header_module_requires_modules : Error< - "header module compilation requires '-fmodules', '-std=c++2a', or " + "header module compilation requires '-fmodules', '-std=c++20', or " "'-fmodules-ts'">; def warn_module_config_mismatch : Warning< "module file %0 cannot be loaded due to a configuration mismatch with the current " Modified: vendor/llvm-project/release-10.x/clang/include/clang/Basic/DiagnosticGroups.td ============================================================================== --- vendor/llvm-project/release-10.x/clang/include/clang/Basic/DiagnosticGroups.td Thu Feb 27 18:49:49 2020 (r358396) +++ vendor/llvm-project/release-10.x/clang/include/clang/Basic/DiagnosticGroups.td Thu Feb 27 18:58:42 2020 (r358397) @@ -187,10 +187,10 @@ def Deprecated : DiagGroup<"deprecated", [DeprecatedAn DeprecatedWritableStr]>, DiagCategory<"Deprecations">; -def CXX2aDesignator : DiagGroup<"c++2a-designator">; +def CXX20Designator : DiagGroup<"c++20-designator">; // Allow -Wno-c99-designator to be used to turn off all warnings on valid C99 -// designators (including the warning controlled by -Wc++2a-designator). -def C99Designator : DiagGroup<"c99-designator", [CXX2aDesignator]>; +// designators (including the warning controlled by -Wc++20-designator). +def C99Designator : DiagGroup<"c99-designator", [CXX20Designator]>; def GNUDesignator : DiagGroup<"gnu-designator">; def DynamicExceptionSpec @@ -246,9 +246,9 @@ def CXXPre14CompatPedantic : DiagGroup<"c++98-c++11-co def CXXPre17Compat : DiagGroup<"c++98-c++11-c++14-compat">; def CXXPre17CompatPedantic : DiagGroup<"c++98-c++11-c++14-compat-pedantic", [CXXPre17Compat]>; -def CXXPre2aCompat : DiagGroup<"c++98-c++11-c++14-c++17-compat">; -def CXXPre2aCompatPedantic : DiagGroup<"c++98-c++11-c++14-c++17-compat-pedantic", - [CXXPre2aCompat]>; +def CXXPre20Compat : DiagGroup<"c++98-c++11-c++14-c++17-compat">; +def CXXPre20CompatPedantic : DiagGroup<"c++98-c++11-c++14-c++17-compat-pedantic", + [CXXPre20Compat]>; def CXX98CompatBindToTemporaryCopy : DiagGroup<"c++98-compat-bind-to-temporary-copy">; @@ -262,7 +262,7 @@ def CXX98Compat : DiagGroup<"c++98-compat", CXX98CompatUnnamedTypeTemplateArgs, CXXPre14Compat, CXXPre17Compat, - CXXPre2aCompat]>; + CXXPre20Compat]>; // Warnings for C++11 features which are Extensions in C++98 mode. def CXX98CompatPedantic : DiagGroup<"c++98-compat-pedantic", [CXX98Compat, @@ -270,7 +270,7 @@ def CXX98CompatPedantic : DiagGroup<"c++98-compat-peda CXX98CompatExtraSemi, CXXPre14CompatPedantic, CXXPre17CompatPedantic, - CXXPre2aCompatPedantic]>; + CXXPre20CompatPedantic]>; def CXX11Narrowing : DiagGroup<"c++11-narrowing">; @@ -296,33 +296,35 @@ def CXX11Compat : DiagGroup<"c++11-compat", CXX11CompatDeprecatedWritableStr, CXXPre14Compat, CXXPre17Compat, - CXXPre2aCompat]>; + CXXPre20Compat]>; def : DiagGroup<"c++0x-compat", [CXX11Compat]>; def CXX11CompatPedantic : DiagGroup<"c++11-compat-pedantic", [CXX11Compat, CXXPre14CompatPedantic, CXXPre17CompatPedantic, - CXXPre2aCompatPedantic]>; + CXXPre20CompatPedantic]>; def CXX14Compat : DiagGroup<"c++14-compat", [CXXPre17Compat, - CXXPre2aCompat]>; + CXXPre20Compat]>; def CXX14CompatPedantic : DiagGroup<"c++14-compat-pedantic", [CXX14Compat, CXXPre17CompatPedantic, - CXXPre2aCompatPedantic]>; + CXXPre20CompatPedantic]>; def CXX17Compat : DiagGroup<"c++17-compat", [DeprecatedRegister, DeprecatedIncrementBool, CXX17CompatMangling, - CXXPre2aCompat]>; + CXXPre20Compat]>; def CXX17CompatPedantic : DiagGroup<"c++17-compat-pedantic", [CXX17Compat, - CXXPre2aCompatPedantic]>; + CXXPre20CompatPedantic]>; def : DiagGroup<"c++1z-compat", [CXX17Compat]>; -def CXX2aCompat : DiagGroup<"c++2a-compat">; -def CXX2aCompatPedantic : DiagGroup<"c++2a-compat-pedantic", - [CXX2aCompat]>; +def CXX20Compat : DiagGroup<"c++20-compat">; +def CXX20CompatPedantic : DiagGroup<"c++20-compat-pedantic", + [CXX20Compat]>; +def : DiagGroup<"c++2a-compat", [CXX20Compat]>; +def : DiagGroup<"c++2a-compat-pedantic", [CXX20CompatPedantic]>; def ExitTimeDestructors : DiagGroup<"exit-time-destructors">; def FlexibleArrayExtensions : DiagGroup<"flexible-array-extensions">; @@ -955,13 +957,14 @@ def CXX14 : DiagGroup<"c++14-extensions", [CXX14Binary // earlier C++ versions. def CXX17 : DiagGroup<"c++17-extensions">; -// A warning group for warnings about using C++2a features as extensions in +// A warning group for warnings about using C++20 features as extensions in // earlier C++ versions. -def CXX2a : DiagGroup<"c++2a-extensions", [CXX2aDesignator]>; +def CXX20 : DiagGroup<"c++20-extensions", [CXX20Designator]>; def : DiagGroup<"c++0x-extensions", [CXX11]>; def : DiagGroup<"c++1y-extensions", [CXX14]>; def : DiagGroup<"c++1z-extensions", [CXX17]>; +def : DiagGroup<"c++2a-extensions", [CXX20]>; def DelegatingCtorCycles : DiagGroup<"delegating-ctor-cycles">; @@ -1011,7 +1014,8 @@ def MicrosoftExplicitConstructorCall : DiagGroup< def MicrosoftEnumValue : DiagGroup<"microsoft-enum-value">; def MicrosoftDefaultArgRedefinition : DiagGroup<"microsoft-default-arg-redefinition">; -def MicrosoftTemplate : DiagGroup<"microsoft-template">; +def MicrosoftTemplateShadow : DiagGroup<"microsoft-template-shadow">; +def MicrosoftTemplate : DiagGroup<"microsoft-template", [MicrosoftTemplateShadow]>; def MicrosoftInconsistentDllImport : DiagGroup<"inconsistent-dllimport">; def MicrosoftRedeclareStatic : DiagGroup<"microsoft-redeclare-static">; def MicrosoftEnumForwardReference : Modified: vendor/llvm-project/release-10.x/clang/include/clang/Basic/DiagnosticLexKinds.td ============================================================================== --- vendor/llvm-project/release-10.x/clang/include/clang/Basic/DiagnosticLexKinds.td Thu Feb 27 18:49:49 2020 (r358396) +++ vendor/llvm-project/release-10.x/clang/include/clang/Basic/DiagnosticLexKinds.td Thu Feb 27 18:58:42 2020 (r358397) @@ -31,12 +31,12 @@ def warn_cxx98_compat_less_colon_colon : Warning< InGroup<CXX98Compat>, DefaultIgnore; def warn_cxx17_compat_spaceship : Warning< - "'<=>' operator is incompatible with C++ standards before C++2a">, - InGroup<CXXPre2aCompat>, DefaultIgnore; + "'<=>' operator is incompatible with C++ standards before C++20">, + InGroup<CXXPre20Compat>, DefaultIgnore; def warn_cxx2a_compat_spaceship : Warning< - "'<=>' is a single token in C++2a; " + "'<=>' is a single token in C++20; " "add a space to avoid a change in behavior">, - InGroup<CXX2aCompat>; + InGroup<CXX20Compat>; // Trigraphs. def trigraph_ignored : Warning<"trigraph ignored">, InGroup<Trigraphs>; @@ -78,8 +78,8 @@ def ext_token_used : Extension<"extension used">, def warn_cxx11_keyword : Warning<"'%0' is a keyword in C++11">, InGroup<CXX11Compat>, DefaultIgnore; -def warn_cxx2a_keyword : Warning<"'%0' is a keyword in C++2a">, - InGroup<CXX2aCompat>, DefaultIgnore; +def warn_cxx2a_keyword : Warning<"'%0' is a keyword in C++20">, + InGroup<CXX20Compat>, DefaultIgnore; def ext_unterminated_char_or_string : ExtWarn< "missing terminating %select{'|'\"'}0 character">, InGroup<InvalidPPToken>; Modified: vendor/llvm-project/release-10.x/clang/include/clang/Basic/DiagnosticParseKinds.td ============================================================================== --- vendor/llvm-project/release-10.x/clang/include/clang/Basic/DiagnosticParseKinds.td Thu Feb 27 18:49:49 2020 (r358396) +++ vendor/llvm-project/release-10.x/clang/include/clang/Basic/DiagnosticParseKinds.td Thu Feb 27 18:58:42 2020 (r358397) @@ -241,10 +241,10 @@ def warn_cxx14_compat_nested_namespace_definition : Wa "nested namespace definition is incompatible with C++ standards before C++17">, InGroup<CXXPre17Compat>, DefaultIgnore; def ext_inline_nested_namespace_definition : ExtWarn< - "inline nested namespace definition is a C++2a extension">, InGroup<CXX2a>; + "inline nested namespace definition is a C++20 extension">, InGroup<CXX20>; def warn_cxx17_compat_inline_nested_namespace_definition : Warning< "inline nested namespace definition is incompatible with C++ standards before" - " C++2a">, InGroup<CXXPre2aCompat>, DefaultIgnore; + " C++20">, InGroup<CXXPre20Compat>, DefaultIgnore; def err_inline_nested_namespace_definition : Error< "nested namespace definition cannot be 'inline'">; def err_expected_semi_after_attribute_list : Error< @@ -589,11 +589,11 @@ def warn_cxx14_compat_init_statement : Warning< "%select{if|switch}0 initialization statements are incompatible with " "C++ standards before C++17">, DefaultIgnore, InGroup<CXXPre17Compat>; def ext_for_range_init_stmt : ExtWarn< - "range-based for loop initialization statements are a C++2a extension">, - InGroup<CXX2a>; + "range-based for loop initialization statements are a C++20 extension">, + InGroup<CXX20>; def warn_cxx17_compat_for_range_init_stmt : Warning< "range-based for loop initialization statements are incompatible with " - "C++ standards before C++2a">, DefaultIgnore, InGroup<CXXPre2aCompat>; + "C++ standards before C++20">, DefaultIgnore, InGroup<CXXPre20Compat>; def warn_empty_init_statement : Warning< "empty initialization statement of '%select{if|switch|range-based for}0' " "has no effect">, InGroup<EmptyInitStatement>, DefaultIgnore; @@ -681,13 +681,13 @@ def err_ms_property_initializer : Error< "property declaration cannot have an in-class initializer">; def warn_cxx2a_compat_explicit_bool : Warning< - "this expression will be parsed as explicit(bool) in C++2a">, - InGroup<CXX2aCompat>, DefaultIgnore; + "this expression will be parsed as explicit(bool) in C++20">, + InGroup<CXX20Compat>, DefaultIgnore; def warn_cxx17_compat_explicit_bool : Warning< - "explicit(bool) is incompatible with C++ standards before C++2a">, - InGroup<CXXPre2aCompat>, DefaultIgnore; -def ext_explicit_bool : ExtWarn<"explicit(bool) is a C++2a extension">, - InGroup<CXX2a>; + "explicit(bool) is incompatible with C++ standards before C++20">, + InGroup<CXXPre20Compat>, DefaultIgnore; +def ext_explicit_bool : ExtWarn<"explicit(bool) is a C++20 extension">, + InGroup<CXX20>; /// C++ Templates def err_expected_template : Error<"expected template">; @@ -844,11 +844,11 @@ def warn_cxx98_compat_nonstatic_member_init : Warning< "in-class initialization of non-static data members is incompatible with C++98">, InGroup<CXX98Compat>, DefaultIgnore; def ext_bitfield_member_init: ExtWarn< - "default member initializer for bit-field is a C++2a extension">, - InGroup<CXX2a>; + "default member initializer for bit-field is a C++20 extension">, + InGroup<CXX20>; def warn_cxx17_compat_bitfield_member_init: Warning< "default member initializer for bit-field is incompatible with " - "C++ standards before C++2a">, InGroup<CXXPre2aCompat>, DefaultIgnore; + "C++ standards before C++20">, InGroup<CXXPre20Compat>, DefaultIgnore; def err_incomplete_array_member_init: Error< "array bound cannot be deduced from an in-class initializer">; @@ -944,13 +944,13 @@ def warn_cxx14_compat_constexpr_on_lambda : Warning< def ext_constexpr_on_lambda_cxx17 : ExtWarn< "'constexpr' on lambda expressions is a C++17 extension">, InGroup<CXX17>; -// C++2a template lambdas +// C++20 template lambdas def ext_lambda_template_parameter_list: ExtWarn< - "explicit template parameter list for lambdas is a C++2a extension">, - InGroup<CXX2a>; + "explicit template parameter list for lambdas is a C++20 extension">, + InGroup<CXX20>; def warn_cxx17_compat_lambda_template_parameter_list: Warning< "explicit template parameter list for lambdas is incompatible with " - "C++ standards before C++2a">, InGroup<CXXPre2aCompat>, DefaultIgnore; + "C++ standards before C++20">, InGroup<CXXPre20Compat>, DefaultIgnore; def err_lambda_template_parameter_list_empty : Error< "lambda template parameter list cannot be empty">; @@ -1369,7 +1369,7 @@ let CategoryName = "Concepts Issue" in { def err_concept_definition_not_identifier : Error< "name defined in concept definition must be an identifier">; def ext_concept_legacy_bool_keyword : ExtWarn< - "ISO C++2a does not permit the 'bool' keyword after 'concept'">, + "ISO C++20 does not permit the 'bool' keyword after 'concept'">, InGroup<DiagGroup<"concepts-ts-compat">>; def err_placeholder_expected_auto_or_decltype_auto : Error< "expected 'auto' or 'decltype(auto)' after concept name">; Modified: vendor/llvm-project/release-10.x/clang/include/clang/Basic/DiagnosticSemaKinds.td ============================================================================== --- vendor/llvm-project/release-10.x/clang/include/clang/Basic/DiagnosticSemaKinds.td Thu Feb 27 18:49:49 2020 (r358396) +++ vendor/llvm-project/release-10.x/clang/include/clang/Basic/DiagnosticSemaKinds.td Thu Feb 27 18:58:42 2020 (r358397) @@ -193,10 +193,10 @@ def ext_flexible_array_init : Extension< // C++20 designated initializers def ext_cxx_designated_init : Extension< - "designated initializers are a C++20 extension">, InGroup<CXX2aDesignator>; + "designated initializers are a C++20 extension">, InGroup<CXX20Designator>; def warn_cxx17_compat_designated_init : Warning< "designated initializers are incompatible with C++ standards before C++20">, - InGroup<CXXPre2aCompatPedantic>, DefaultIgnore; + InGroup<CXXPre20CompatPedantic>, DefaultIgnore; def ext_designated_init_mixed : ExtWarn< "mixture of designated and non-designated initializers in the same " "initializer list is a C99 extension">, InGroup<C99Designator>; @@ -444,13 +444,13 @@ def err_decomp_decl_spec : Error< "%plural{1:'%1'|:with '%1' specifiers}0">; def ext_decomp_decl_spec : ExtWarn< "decomposition declaration declared " - "%plural{1:'%1'|:with '%1' specifiers}0 is a C++2a extension">, - InGroup<CXX2a>; + "%plural{1:'%1'|:with '%1' specifiers}0 is a C++20 extension">, + InGroup<CXX20>; def warn_cxx17_compat_decomp_decl_spec : Warning< "decomposition declaration declared " "%plural{1:'%1'|:with '%1' specifiers}0 " - "is incompatible with C++ standards before C++2a">, - InGroup<CXXPre2aCompat>, DefaultIgnore; + "is incompatible with C++ standards before C++20">, + InGroup<CXXPre20Compat>, DefaultIgnore; def err_decomp_decl_type : Error< "decomposition declaration cannot be declared with type %0; " "declared type must be 'auto' or reference to 'auto'">; @@ -1949,7 +1949,7 @@ def err_init_list_bad_dest_type : Error< "list">; def warn_cxx2a_compat_aggregate_init_with_ctors : Warning< "aggregate initialization of type %0 with user-declared constructors " - "is incompatible with C++2a">, DefaultIgnore, InGroup<CXX2aCompat>; + "is incompatible with C++20">, DefaultIgnore, InGroup<CXX20Compat>; def err_reference_bind_to_bitfield : Error< "%select{non-const|volatile}0 reference cannot bind to " @@ -2438,7 +2438,7 @@ def err_constexpr_redecl_mismatch : Error< def err_constexpr_virtual : Error<"virtual function cannot be constexpr">; def warn_cxx17_compat_constexpr_virtual : Warning< "virtual constexpr functions are incompatible with " - "C++ standards before C++2a">, InGroup<CXXPre2aCompat>, DefaultIgnore; + "C++ standards before C++20">, InGroup<CXXPre20Compat>, DefaultIgnore; def err_constexpr_virtual_base : Error< "constexpr %select{member function|constructor}0 not allowed in " "%select{struct|interface|class}1 with virtual base " @@ -2464,11 +2464,11 @@ def warn_cxx11_compat_constexpr_body_invalid_stmt : Wa InGroup<CXXPre14Compat>, DefaultIgnore; def ext_constexpr_body_invalid_stmt_cxx2a : ExtWarn< "use of this statement in a constexpr %select{function|constructor}0 " - "is a C++2a extension">, InGroup<CXX2a>; + "is a C++20 extension">, InGroup<CXX20>; def warn_cxx17_compat_constexpr_body_invalid_stmt : Warning< "use of this statement in a constexpr %select{function|constructor}0 " - "is incompatible with C++ standards before C++2a">, - InGroup<CXXPre2aCompat>, DefaultIgnore; + "is incompatible with C++ standards before C++20">, + InGroup<CXXPre20Compat>, DefaultIgnore; def ext_constexpr_type_definition : ExtWarn< "type definition in a constexpr %select{function|constructor}0 " "is a C++14 extension">, InGroup<CXX14>; @@ -2494,11 +2494,11 @@ def err_constexpr_local_var_non_literal_type : Error< "%select{function|constructor}0">; def ext_constexpr_local_var_no_init : ExtWarn< "uninitialized variable in a constexpr %select{function|constructor}0 " - "is a C++20 extension">, InGroup<CXX2a>; + "is a C++20 extension">, InGroup<CXX20>; def warn_cxx17_compat_constexpr_local_var_no_init : Warning< "uninitialized variable in a constexpr %select{function|constructor}0 " "is incompatible with C++ standards before C++20">, - InGroup<CXXPre2aCompat>, DefaultIgnore; + InGroup<CXXPre20Compat>, DefaultIgnore; def ext_constexpr_function_never_constant_expr : ExtWarn< "constexpr %select{function|constructor}0 never produces a " "constant expression">, InGroup<DiagGroup<"invalid-constexpr">>, DefaultError; @@ -2524,29 +2524,29 @@ def warn_cxx11_compat_constexpr_body_multiple_return : def note_constexpr_body_previous_return : Note< "previous return statement is here">; -// C++2a function try blocks in constexpr +// C++20 function try blocks in constexpr def ext_constexpr_function_try_block_cxx2a : ExtWarn< "function try block in constexpr %select{function|constructor}0 is " - "a C++2a extension">, InGroup<CXX2a>; + "a C++20 extension">, InGroup<CXX20>; def warn_cxx17_compat_constexpr_function_try_block : Warning< "function try block in constexpr %select{function|constructor}0 is " - "incompatible with C++ standards before C++2a">, - InGroup<CXXPre2aCompat>, DefaultIgnore; + "incompatible with C++ standards before C++20">, + InGroup<CXXPre20Compat>, DefaultIgnore; def ext_constexpr_union_ctor_no_init : ExtWarn< "constexpr union constructor that does not initialize any member " - "is a C++20 extension">, InGroup<CXX2a>; + "is a C++20 extension">, InGroup<CXX20>; def warn_cxx17_compat_constexpr_union_ctor_no_init : Warning< "constexpr union constructor that does not initialize any member " "is incompatible with C++ standards before C++20">, - InGroup<CXXPre2aCompat>, DefaultIgnore; + InGroup<CXXPre20Compat>, DefaultIgnore; def ext_constexpr_ctor_missing_init : ExtWarn< "constexpr constructor that does not initialize all members " - "is a C++20 extension">, InGroup<CXX2a>; + "is a C++20 extension">, InGroup<CXX20>; def warn_cxx17_compat_constexpr_ctor_missing_init : Warning< "constexpr constructor that does not initialize all members " "is incompatible with C++ standards before C++20">, - InGroup<CXXPre2aCompat>, DefaultIgnore; + InGroup<CXXPre20Compat>, DefaultIgnore; def note_constexpr_ctor_missing_init : Note< "member not initialized by constructor">; def note_non_literal_no_constexpr_ctors : Note< @@ -2678,7 +2678,7 @@ def warn_cxx98_compat_unicode_type : Warning< InGroup<CXX98Compat>, DefaultIgnore; def warn_cxx17_compat_unicode_type : Warning< "'char8_t' type specifier is incompatible with C++ standards before C++20">, - InGroup<CXXPre2aCompat>, DefaultIgnore; + InGroup<CXXPre20Compat>, DefaultIgnore; // __make_integer_seq def err_integer_sequence_negative_length : Error< @@ -4210,7 +4210,7 @@ def err_ovl_no_viable_literal_operator : Error< def err_template_param_shadow : Error< "declaration of %0 shadows template parameter">; def ext_template_param_shadow : ExtWarn< - err_template_param_shadow.Text>, InGroup<MicrosoftTemplate>; + err_template_param_shadow.Text>, InGroup<MicrosoftTemplateShadow>; def note_template_param_here : Note<"template parameter is declared here">; def warn_template_export_unsupported : Warning< "exported templates are unsupported">; @@ -4289,11 +4289,11 @@ def err_template_tag_noparams : Error< def warn_cxx17_compat_adl_only_template_id : Warning< "use of function template name with no prior function template " "declaration in function call with explicit template arguments " - "is incompatible with C++ standards before C++2a">, - InGroup<CXXPre2aCompat>, DefaultIgnore; + "is incompatible with C++ standards before C++20">, + InGroup<CXXPre20Compat>, DefaultIgnore; def ext_adl_only_template_id : ExtWarn< "use of function template name with no prior declaration in function call " - "with explicit template arguments is a C++2a extension">, InGroup<CXX2a>; + "with explicit template arguments is a C++20 extension">, InGroup<CXX20>; // C++ Template Argument Lists def err_template_missing_args : Error< @@ -4435,12 +4435,12 @@ def err_pointer_to_member_oper_value_classify: Error< "pointer-to-member function type %0 can only be called on an " "%select{rvalue|lvalue}1">; def ext_pointer_to_const_ref_member_on_rvalue : Extension< - "invoking a pointer to a 'const &' member function on an rvalue is a C++2a extension">, - InGroup<CXX2a>, SFINAEFailure; + "invoking a pointer to a 'const &' member function on an rvalue is a C++20 extension">, + InGroup<CXX20>, SFINAEFailure; def warn_cxx17_compat_pointer_to_const_ref_member_on_rvalue : Warning< "invoking a pointer to a 'const &' member function on an rvalue is " - "incompatible with C++ standards before C++2a">, - InGroup<CXXPre2aCompatPedantic>, DefaultIgnore; + "incompatible with C++ standards before C++20">, + InGroup<CXXPre20CompatPedantic>, DefaultIgnore; def ext_ms_deref_template_argument: ExtWarn< "non-type template argument containing a dereference operation is a " "Microsoft extension">, InGroup<MicrosoftTemplate>; @@ -6189,7 +6189,7 @@ def err_array_init_utf8_string_into_char : Error< "UTF-8 string literal%select{ is not permitted by '-fchar8_t'|}0">; def warn_cxx2a_compat_utf8_string : Warning< "type of UTF-8 string literal will change from array of const char to " - "array of const char8_t in C++2a">, InGroup<CXX2aCompat>, DefaultIgnore; + "array of const char8_t in C++20">, InGroup<CXX20Compat>, DefaultIgnore; def note_cxx2a_compat_utf8_string_remove_u8 : Note< "remove 'u8' prefix to avoid a change of behavior; " "Clang encodes unprefixed narrow string literals as UTF-8">; @@ -7116,9 +7116,9 @@ let CategoryName = "Lambda Issue" in { "cannot deduce type for lambda capture %0 from initializer list">; def warn_cxx17_compat_init_capture_pack : Warning< "initialized lambda capture packs are incompatible with C++ standards " - "before C++2a">, InGroup<CXXPre2aCompat>, DefaultIgnore; + "before C++20">, InGroup<CXXPre20Compat>, DefaultIgnore; def ext_init_capture_pack : ExtWarn< - "initialized lambda pack captures are a C++2a extension">, InGroup<CXX2a>; + "initialized lambda pack captures are a C++20 extension">, InGroup<CXX20>; // C++14 generic lambdas. def warn_cxx11_compat_generic_lambda : Warning< @@ -7136,23 +7136,23 @@ let CategoryName = "Lambda Issue" in { def err_parameter_shadow_capture : Error< "a lambda parameter cannot shadow an explicitly captured entity">; - // C++2a [=, this] captures. + // C++20 [=, this] captures. def warn_cxx17_compat_equals_this_lambda_capture : Warning< "explicit capture of 'this' with a capture default of '=' is incompatible " - "with C++ standards before C++2a">, InGroup<CXXPre2aCompat>, DefaultIgnore; + "with C++ standards before C++20">, InGroup<CXXPre20Compat>, DefaultIgnore; def ext_equals_this_lambda_capture_cxx2a : ExtWarn< "explicit capture of 'this' with a capture default of '=' " - "is a C++2a extension">, InGroup<CXX2a>; + "is a C++20 extension">, InGroup<CXX20>; def warn_deprecated_this_capture : Warning< "implicit capture of 'this' with a capture default of '=' is deprecated">, InGroup<DeprecatedThisCapture>, DefaultIgnore; def note_deprecated_this_capture : Note< "add an explicit capture of 'this' to capture '*this' by reference">; - // C++2a default constructible / assignable lambdas. + // C++20 default constructible / assignable lambdas. def warn_cxx17_compat_lambda_def_ctor_assign : Warning< "%select{default construction|assignment}0 of lambda is incompatible with " - "C++ standards before C++2a">, InGroup<CXXPre2aCompat>, DefaultIgnore; + "C++ standards before C++20">, InGroup<CXXPre20Compat>, DefaultIgnore; } def err_return_in_captured_stmt : Error< @@ -7853,7 +7853,7 @@ def ext_cxx14_attr : Extension< def ext_cxx17_attr : Extension< "use of the %0 attribute is a C++17 extension">, InGroup<CXX17>; def ext_cxx2a_attr : Extension< - "use of the %0 attribute is a C++2a extension">, InGroup<CXX2a>; + "use of the %0 attribute is a C++20 extension">, InGroup<CXX20>; def warn_unused_comparison : Warning< "%select{equality|inequality|relational|three-way}0 comparison result unused">, @@ -7867,7 +7867,7 @@ def err_incomplete_type_used_in_type_trait_expr : Erro // C++20 constinit and require_constant_initialization attribute def warn_cxx20_compat_constinit : Warning< "'constinit' specifier is incompatible with C++ standards before C++20">, - InGroup<CXX2aCompat>, DefaultIgnore; + InGroup<CXX20Compat>, DefaultIgnore; def err_constinit_local_variable : Error< "local variable cannot be declared 'constinit'">; def err_require_constant_init_failed : Error< @@ -8322,7 +8322,7 @@ def note_deleted_type_mismatch : Note< def warn_cxx17_compat_defaulted_method_type_mismatch : Warning< "explicitly defaulting this %sub{select_special_member_kind}0 with a type " "different from the implicit type is incompatible with C++ standards before " - "C++2a">, InGroup<CXXPre2aCompat>, DefaultIgnore; + "C++20">, InGroup<CXXPre20Compat>, DefaultIgnore; def warn_vbase_moved_multiple_times : Warning< "defaulted move assignment operator of %0 will move assign virtual base " "class %1 multiple times">, InGroup<DiagGroup<"multiple-move-vbase">>; @@ -8336,10 +8336,10 @@ def select_defaulted_comparison_kind : TextSubstitutio "%select{<ERROR>|equality|three-way|equality|relational}0 comparison " "operator">; def ext_defaulted_comparison : ExtWarn< - "defaulted comparison operators are a C++20 extension">, InGroup<CXX2a>; + "defaulted comparison operators are a C++20 extension">, InGroup<CXX20>; def warn_cxx17_compat_defaulted_comparison : Warning< "defaulted comparison operators are incompatible with C++ standards " - "before C++20">, InGroup<CXXPre2aCompat>, DefaultIgnore; + "before C++20">, InGroup<CXXPre20Compat>, DefaultIgnore; def err_defaulted_comparison_template : Error< "comparison operator template cannot be defaulted">; def err_defaulted_comparison_out_of_class : Error< Modified: vendor/llvm-project/release-10.x/clang/include/clang/Basic/LangStandards.def ============================================================================== --- vendor/llvm-project/release-10.x/clang/include/clang/Basic/LangStandards.def Thu Feb 27 18:49:49 2020 (r358396) +++ vendor/llvm-project/release-10.x/clang/include/clang/Basic/LangStandards.def Thu Feb 27 18:58:42 2020 (r358397) @@ -140,15 +140,17 @@ LANGSTANDARD(gnucxx17, "gnu++17", Digraphs | HexFloat | GNUMode) LANGSTANDARD_ALIAS_DEPR(gnucxx17, "gnu++1z") -LANGSTANDARD(cxx2a, "c++2a", - CXX, "Working draft for ISO C++ 2020", +LANGSTANDARD(cxx20, "c++20", + CXX, "ISO C++ 2020 DIS", LineComment | CPlusPlus | CPlusPlus11 | CPlusPlus14 | CPlusPlus17 | CPlusPlus2a | Digraphs | HexFloat) +LANGSTANDARD_ALIAS_DEPR(cxx20, "c++2a") -LANGSTANDARD(gnucxx2a, "gnu++2a", - CXX, "Working draft for ISO C++ 2020 with GNU extensions", +LANGSTANDARD(gnucxx20, "gnu++20", + CXX, "ISO C++ 2020 DIS with GNU extensions", LineComment | CPlusPlus | CPlusPlus11 | CPlusPlus14 | CPlusPlus17 | CPlusPlus2a | Digraphs | HexFloat | GNUMode) +LANGSTANDARD_ALIAS_DEPR(gnucxx20, "gnu++2a") // OpenCL LANGSTANDARD(opencl10, "cl1.0", Modified: vendor/llvm-project/release-10.x/clang/include/clang/Basic/StmtNodes.td ============================================================================== --- vendor/llvm-project/release-10.x/clang/include/clang/Basic/StmtNodes.td Thu Feb 27 18:49:49 2020 (r358396) +++ vendor/llvm-project/release-10.x/clang/include/clang/Basic/StmtNodes.td Thu Feb 27 18:58:42 2020 (r358397) @@ -162,7 +162,7 @@ def CoawaitExpr : StmtNode<CoroutineSuspendExpr>; def DependentCoawaitExpr : StmtNode<Expr>; def CoyieldExpr : StmtNode<CoroutineSuspendExpr>; -// C++2a Concepts expressions +// C++20 Concepts expressions def ConceptSpecializationExpr : StmtNode<Expr>; def RequiresExpr : StmtNode<Expr>; Modified: vendor/llvm-project/release-10.x/clang/include/clang/Sema/TemplateDeduction.h ============================================================================== --- vendor/llvm-project/release-10.x/clang/include/clang/Sema/TemplateDeduction.h Thu Feb 27 18:49:49 2020 (r358396) +++ vendor/llvm-project/release-10.x/clang/include/clang/Sema/TemplateDeduction.h Thu Feb 27 18:58:42 2020 (r358397) @@ -67,6 +67,13 @@ class TemplateDeductionInfo { (public) TemplateDeductionInfo(const TemplateDeductionInfo &) = delete; TemplateDeductionInfo &operator=(const TemplateDeductionInfo &) = delete; + enum ForBaseTag { ForBase }; + /// Create temporary template deduction info for speculatively deducing + /// against a base class of an argument's type. + TemplateDeductionInfo(ForBaseTag, const TemplateDeductionInfo &Info) + : Deduced(Info.Deduced), Loc(Info.Loc), DeducedDepth(Info.DeducedDepth), + ExplicitArgs(Info.ExplicitArgs) {} + /// Returns the location at which template argument is /// occurring. SourceLocation getLocation() const { Modified: vendor/llvm-project/release-10.x/clang/lib/ASTMatchers/ASTMatchersInternal.cpp ============================================================================== --- vendor/llvm-project/release-10.x/clang/lib/ASTMatchers/ASTMatchersInternal.cpp Thu Feb 27 18:49:49 2020 (r358396) +++ vendor/llvm-project/release-10.x/clang/lib/ASTMatchers/ASTMatchersInternal.cpp Thu Feb 27 18:58:42 2020 (r358397) @@ -523,7 +523,13 @@ bool HasNameMatcher::matchesNodeFullFast(const NamedDe if (Ctx->isFunctionOrMethod()) return Patterns.foundMatch(/*AllowFullyQualified=*/false); - for (; Ctx && isa<NamedDecl>(Ctx); Ctx = Ctx->getParent()) { + for (; Ctx; Ctx = Ctx->getParent()) { + // Linkage Spec can just be ignored + // FIXME: Any other DeclContext kinds that can be safely disregarded + if (isa<LinkageSpecDecl>(Ctx)) + continue; + if (!isa<NamedDecl>(Ctx)) + break; if (Patterns.foundMatch(/*AllowFullyQualified=*/false)) return true; Modified: vendor/llvm-project/release-10.x/clang/lib/CodeGen/CodeGenAction.cpp ============================================================================== --- vendor/llvm-project/release-10.x/clang/lib/CodeGen/CodeGenAction.cpp Thu Feb 27 18:49:49 2020 (r358396) +++ vendor/llvm-project/release-10.x/clang/lib/CodeGen/CodeGenAction.cpp Thu Feb 27 18:58:42 2020 (r358397) @@ -1146,6 +1146,9 @@ void CodeGenAction::ExecuteAction() { CI.getTargetOpts(), CI.getLangOpts(), CI.getFrontendOpts().ShowTimers, std::move(LinkModules), *VMContext, nullptr); + // PR44896: Force DiscardValueNames as false. DiscardValueNames cannot be + // true here because the valued names are needed for reading textual IR. + Ctx.setDiscardValueNames(false); Ctx.setDiagnosticHandler( std::make_unique<ClangDiagnosticHandler>(CodeGenOpts, &Result)); Modified: vendor/llvm-project/release-10.x/clang/lib/Driver/ToolChains/Clang.cpp ============================================================================== --- vendor/llvm-project/release-10.x/clang/lib/Driver/ToolChains/Clang.cpp Thu Feb 27 18:49:49 2020 (r358396) +++ vendor/llvm-project/release-10.x/clang/lib/Driver/ToolChains/Clang.cpp Thu Feb 27 18:58:42 2020 (r358397) @@ -4266,8 +4266,16 @@ void Clang::ConstructJob(Compilation &C, const JobActi // Discard value names in assert builds unless otherwise specified. if (Args.hasFlag(options::OPT_fdiscard_value_names, - options::OPT_fno_discard_value_names, !IsAssertBuild)) + options::OPT_fno_discard_value_names, !IsAssertBuild)) { + if (Args.hasArg(options::OPT_fdiscard_value_names) && + (std::any_of(Inputs.begin(), Inputs.end(), + [](const clang::driver::InputInfo &II) { + return types::isLLVMIR(II.getType()); + }))) { + D.Diag(diag::warn_ignoring_fdiscard_for_bitcode); + } CmdArgs.push_back("-discard-value-names"); + } // Set the main file name, so that debug info works even with // -save-temps. Modified: vendor/llvm-project/release-10.x/clang/lib/Driver/ToolChains/Darwin.cpp ============================================================================== --- vendor/llvm-project/release-10.x/clang/lib/Driver/ToolChains/Darwin.cpp Thu Feb 27 18:49:49 2020 (r358396) +++ vendor/llvm-project/release-10.x/clang/lib/Driver/ToolChains/Darwin.cpp Thu Feb 27 18:58:42 2020 (r358397) @@ -335,7 +335,7 @@ void darwin::Linker::AddLinkArgs(Compilation &C, const Args.AddAllArgs(CmdArgs, options::OPT_init); // Add the deployment target. - if (!Version[0] || Version[0] >= 520) + if (Version[0] >= 520) MachOTC.addPlatformVersionArgs(Args, CmdArgs); else MachOTC.addMinVersionArgs(Args, CmdArgs); Modified: vendor/llvm-project/release-10.x/clang/lib/Driver/ToolChains/FreeBSD.cpp ============================================================================== --- vendor/llvm-project/release-10.x/clang/lib/Driver/ToolChains/FreeBSD.cpp Thu Feb 27 18:49:49 2020 (r358396) +++ vendor/llvm-project/release-10.x/clang/lib/Driver/ToolChains/FreeBSD.cpp Thu Feb 27 18:58:42 2020 (r358397) @@ -99,7 +99,8 @@ void freebsd::Assembler::ConstructJob(Compilation &C, case llvm::Triple::sparcel: case llvm::Triple::sparcv9: { std::string CPU = getCPUName(Args, getToolChain().getTriple()); - CmdArgs.push_back(sparc::getSparcAsmModeForCPU(CPU, getToolChain().getTriple())); + CmdArgs.push_back( + sparc::getSparcAsmModeForCPU(CPU, getToolChain().getTriple())); AddAssemblerKPIC(getToolChain(), Args, CmdArgs); break; } @@ -386,6 +387,12 @@ unsigned FreeBSD::GetDefaultDwarfVersion() const { if (getTriple().getOSMajorVersion() < 12) return 2; return 4; +} + +void FreeBSD::addLibCxxIncludePaths(const llvm::opt::ArgList &DriverArgs, + llvm::opt::ArgStringList &CC1Args) const { + addSystemInclude(DriverArgs, CC1Args, + getDriver().SysRoot + "/usr/include/c++/v1"); } void FreeBSD::addLibStdCxxIncludePaths( Modified: vendor/llvm-project/release-10.x/clang/lib/Driver/ToolChains/FreeBSD.h ============================================================================== --- vendor/llvm-project/release-10.x/clang/lib/Driver/ToolChains/FreeBSD.h Thu Feb 27 18:49:49 2020 (r358396) +++ vendor/llvm-project/release-10.x/clang/lib/Driver/ToolChains/FreeBSD.h Thu Feb 27 18:58:42 2020 (r358397) @@ -59,16 +59,18 @@ class LLVM_LIBRARY_VISIBILITY FreeBSD : public Generic bool IsObjCNonFragileABIDefault() const override { return true; } CXXStdlibType GetDefaultCXXStdlibType() const override; - void addLibStdCxxIncludePaths( - const llvm::opt::ArgList &DriverArgs, - llvm::opt::ArgStringList &CC1Args) const override; + void addLibCxxIncludePaths(const llvm::opt::ArgList &DriverArgs, + llvm::opt::ArgStringList &CC1Args) const override; + void + addLibStdCxxIncludePaths(const llvm::opt::ArgList &DriverArgs, + llvm::opt::ArgStringList &CC1Args) const override; void AddCXXStdlibLibArgs(const llvm::opt::ArgList &Args, llvm::opt::ArgStringList &CmdArgs) const override; void AddCudaIncludeArgs(const llvm::opt::ArgList &DriverArgs, llvm::opt::ArgStringList &CC1Args) const override; - llvm::ExceptionHandling GetExceptionModel( - const llvm::opt::ArgList &Args) const override; + llvm::ExceptionHandling + GetExceptionModel(const llvm::opt::ArgList &Args) const override; bool IsUnwindTablesDefault(const llvm::opt::ArgList &Args) const override; bool isPIEDefault() const override; SanitizerMask getSupportedSanitizers() const override; Modified: vendor/llvm-project/release-10.x/clang/lib/Frontend/InitPreprocessor.cpp ============================================================================== --- vendor/llvm-project/release-10.x/clang/lib/Frontend/InitPreprocessor.cpp Thu Feb 27 18:49:49 2020 (r358396) +++ vendor/llvm-project/release-10.x/clang/lib/Frontend/InitPreprocessor.cpp Thu Feb 27 18:58:42 2020 (r358397) @@ -344,13 +344,27 @@ static void InitializeStandardPredefinedMacros(const T const LangOptions &LangOpts, const FrontendOptions &FEOpts, MacroBuilder &Builder) { + // C++ [cpp.predefined]p1: + // The following macro names shall be defined by the implementation: + + // -- __STDC__ + // [C++] Whether __STDC__ is predefined and if so, what its value is, + // are implementation-defined. + // (Removed in C++20.) if (!LangOpts.MSVCCompat && !LangOpts.TraditionalCPP) Builder.defineMacro("__STDC__"); + // -- __STDC_HOSTED__ + // The integer literal 1 if the implementation is a hosted + // implementation or the integer literal 0 if it is not. if (LangOpts.Freestanding) Builder.defineMacro("__STDC_HOSTED__", "0"); else Builder.defineMacro("__STDC_HOSTED__"); + // -- __STDC_VERSION__ + // [C++] Whether __STDC_VERSION__ is predefined and if so, what its + // value is, are implementation-defined. + // (Removed in C++20.) if (!LangOpts.CPlusPlus) { if (LangOpts.C17) Builder.defineMacro("__STDC_VERSION__", "201710L"); @@ -361,33 +375,29 @@ static void InitializeStandardPredefinedMacros(const T else if (!LangOpts.GNUMode && LangOpts.Digraphs) Builder.defineMacro("__STDC_VERSION__", "199409L"); } else { - // FIXME: Use correct value for C++20. + // -- __cplusplus + // [C++20] The integer literal 202002L. if (LangOpts.CPlusPlus2a) - Builder.defineMacro("__cplusplus", "201707L"); - // C++17 [cpp.predefined]p1: - // The name __cplusplus is defined to the value 201703L when compiling a - // C++ translation unit. + Builder.defineMacro("__cplusplus", "202002L"); + // [C++17] The integer literal 201703L. else if (LangOpts.CPlusPlus17) Builder.defineMacro("__cplusplus", "201703L"); - // C++1y [cpp.predefined]p1: - // The name __cplusplus is defined to the value 201402L when compiling a - // C++ translation unit. + // [C++14] The name __cplusplus is defined to the value 201402L when + // compiling a C++ translation unit. else if (LangOpts.CPlusPlus14) Builder.defineMacro("__cplusplus", "201402L"); - // C++11 [cpp.predefined]p1: - // The name __cplusplus is defined to the value 201103L when compiling a - // C++ translation unit. + // [C++11] The name __cplusplus is defined to the value 201103L when + // compiling a C++ translation unit. else if (LangOpts.CPlusPlus11) Builder.defineMacro("__cplusplus", "201103L"); - // C++03 [cpp.predefined]p1: - // The name __cplusplus is defined to the value 199711L when compiling a - // C++ translation unit. + // [C++03] The name __cplusplus is defined to the value 199711L when + // compiling a C++ translation unit. else Builder.defineMacro("__cplusplus", "199711L"); - // C++1z [cpp.predefined]p1: - // An integer literal of type std::size_t whose value is the alignment - // guaranteed by a call to operator new(std::size_t) + // -- __STDCPP_DEFAULT_NEW_ALIGNMENT__ + // [C++17] An integer literal of type std::size_t whose value is the + // alignment guaranteed by a call to operator new(std::size_t) // // We provide this in all language modes, since it seems generally useful. Builder.defineMacro("__STDCPP_DEFAULT_NEW_ALIGNMENT__", Modified: vendor/llvm-project/release-10.x/clang/lib/Sema/SemaTemplateDeduction.cpp ============================================================================== --- vendor/llvm-project/release-10.x/clang/lib/Sema/SemaTemplateDeduction.cpp Thu Feb 27 18:49:49 2020 (r358396) +++ vendor/llvm-project/release-10.x/clang/lib/Sema/SemaTemplateDeduction.cpp Thu Feb 27 18:58:42 2020 (r358397) @@ -1818,7 +1818,7 @@ DeduceTemplateArgumentsByTypeMatch(Sema &S, // If this is a base class, try to perform template argument // deduction from it. if (NextT != RecordT) { - TemplateDeductionInfo BaseInfo(Info.getLocation()); + TemplateDeductionInfo BaseInfo(TemplateDeductionInfo::ForBase, Info); Sema::TemplateDeductionResult BaseResult = DeduceTemplateArguments(S, TemplateParams, SpecParam, QualType(NextT, 0), BaseInfo, Deduced); Modified: vendor/llvm-project/release-10.x/clang/lib/Serialization/ASTReader.cpp ============================================================================== --- vendor/llvm-project/release-10.x/clang/lib/Serialization/ASTReader.cpp Thu Feb 27 18:49:49 2020 (r358396) +++ vendor/llvm-project/release-10.x/clang/lib/Serialization/ASTReader.cpp Thu Feb 27 18:58:42 2020 (r358397) @@ -3224,8 +3224,7 @@ ASTReader::ReadASTBlock(ModuleFile &F, unsigned Client case MODULAR_CODEGEN_DECLS: // FIXME: Skip reading this record if our ASTConsumer doesn't care about // them (ie: if we're not codegenerating this module). - if (F.Kind == MK_MainFile || - getContext().getLangOpts().BuildingPCHWithObjectFile) + if (F.Kind == MK_MainFile) for (unsigned I = 0, N = Record.size(); I != N; ++I) EagerlyDeserializedDecls.push_back(getGlobalDeclID(F, Record[I])); break; Modified: vendor/llvm-project/release-10.x/clang/lib/Serialization/ASTReaderDecl.cpp ============================================================================== --- vendor/llvm-project/release-10.x/clang/lib/Serialization/ASTReaderDecl.cpp Thu Feb 27 18:49:49 2020 (r358396) +++ vendor/llvm-project/release-10.x/clang/lib/Serialization/ASTReaderDecl.cpp Thu Feb 27 18:58:42 2020 (r358397) @@ -502,12 +502,8 @@ uint64_t ASTDeclReader::GetCurrentCursorOffset() { } void ASTDeclReader::ReadFunctionDefinition(FunctionDecl *FD) { - if (Record.readInt()) { + if (Record.readInt()) Reader.DefinitionSource[FD] = Loc.F->Kind == ModuleKind::MK_MainFile; - if (Reader.getContext().getLangOpts().BuildingPCHWithObjectFile && - Reader.DeclIsFromPCHWithObjectFile(FD)) - Reader.DefinitionSource[FD] = true; - } if (auto *CD = dyn_cast<CXXConstructorDecl>(FD)) { CD->setNumCtorInitializers(Record.readInt()); if (CD->getNumCtorInitializers()) @@ -1422,12 +1418,8 @@ ASTDeclReader::RedeclarableResult ASTDeclReader::Visit Reader.getContext().setBlockVarCopyInit(VD, CopyExpr, Record.readInt()); } - if (VD->getStorageDuration() == SD_Static && Record.readInt()) { + if (VD->getStorageDuration() == SD_Static && Record.readInt()) Reader.DefinitionSource[VD] = Loc.F->Kind == ModuleKind::MK_MainFile; - if (Reader.getContext().getLangOpts().BuildingPCHWithObjectFile && - Reader.DeclIsFromPCHWithObjectFile(VD)) - Reader.DefinitionSource[VD] = true; - } enum VarKind { VarNotTemplate = 0, VarTemplate, StaticDataMemberSpecialization @@ -1686,12 +1678,8 @@ void ASTDeclReader::ReadCXXDefinitionData( Data.ODRHash = Record.readInt(); Data.HasODRHash = true; - if (Record.readInt()) { + if (Record.readInt()) Reader.DefinitionSource[D] = Loc.F->Kind == ModuleKind::MK_MainFile; - if (Reader.getContext().getLangOpts().BuildingPCHWithObjectFile && - Reader.DeclIsFromPCHWithObjectFile(D)) - Reader.DefinitionSource[D] = true; - } Data.NumBases = Record.readInt(); if (Data.NumBases) Modified: vendor/llvm-project/release-10.x/clang/lib/Serialization/ASTWriter.cpp ============================================================================== --- vendor/llvm-project/release-10.x/clang/lib/Serialization/ASTWriter.cpp Thu Feb 27 18:49:49 2020 (r358396) +++ vendor/llvm-project/release-10.x/clang/lib/Serialization/ASTWriter.cpp Thu Feb 27 18:58:42 2020 (r358397) @@ -5596,8 +5596,8 @@ void ASTRecordWriter::AddCXXDefinitionData(const CXXRe // getODRHash will compute the ODRHash if it has not been previously computed. Record->push_back(D->getODRHash()); - bool ModulesDebugInfo = - Writer->Context->getLangOpts().ModulesDebugInfo && !D->isDependentType(); + bool ModulesDebugInfo = Writer->Context->getLangOpts().ModulesDebugInfo && + Writer->WritingModule && !D->isDependentType(); Record->push_back(ModulesDebugInfo); if (ModulesDebugInfo) Writer->ModularCodegenDecls.push_back(Writer->GetDeclRef(D)); Modified: vendor/llvm-project/release-10.x/clang/lib/Serialization/ASTWriterDecl.cpp ============================================================================== --- vendor/llvm-project/release-10.x/clang/lib/Serialization/ASTWriterDecl.cpp Thu Feb 27 18:49:49 2020 (r358396) +++ vendor/llvm-project/release-10.x/clang/lib/Serialization/ASTWriterDecl.cpp Thu Feb 27 18:58:42 2020 (r358397) @@ -1011,16 +1011,15 @@ void ASTDeclWriter::VisitVarDecl(VarDecl *D) { if (D->getStorageDuration() == SD_Static) { bool ModulesCodegen = false; - if (!D->getDescribedVarTemplate() && !D->getMemberSpecializationInfo() && + if (Writer.WritingModule && + !D->getDescribedVarTemplate() && !D->getMemberSpecializationInfo() && !isa<VarTemplateSpecializationDecl>(D)) { // When building a C++ Modules TS module interface unit, a strong // definition in the module interface is provided by the compilation of // that module interface unit, not by its users. (Inline variables are // still emitted in module users.) ModulesCodegen = - (((Writer.WritingModule && - Writer.WritingModule->Kind == Module::ModuleInterfaceUnit) || - Writer.Context->getLangOpts().BuildingPCHWithObjectFile) && + (Writer.WritingModule->Kind == Module::ModuleInterfaceUnit && Writer.Context->GetGVALinkageForVariable(D) == GVA_StrongExternal); } Record.push_back(ModulesCodegen); @@ -2449,11 +2448,9 @@ void ASTRecordWriter::AddFunctionDefinition(const Func assert(FD->doesThisDeclarationHaveABody()); bool ModulesCodegen = false; - if (!FD->isDependentContext()) { + if (Writer->WritingModule && !FD->isDependentContext()) { Optional<GVALinkage> Linkage; - if ((Writer->WritingModule && - Writer->WritingModule->Kind == Module::ModuleInterfaceUnit) || - Writer->Context->getLangOpts().BuildingPCHWithObjectFile) { + if (Writer->WritingModule->Kind == Module::ModuleInterfaceUnit) { // When building a C++ Modules TS module interface unit, a strong // definition in the module interface is provided by the compilation of // that module interface unit, not by its users. (Inline functions are Modified: vendor/llvm-project/release-10.x/clang/lib/Tooling/ArgumentsAdjusters.cpp ============================================================================== --- vendor/llvm-project/release-10.x/clang/lib/Tooling/ArgumentsAdjusters.cpp Thu Feb 27 18:49:49 2020 (r358396) +++ vendor/llvm-project/release-10.x/clang/lib/Tooling/ArgumentsAdjusters.cpp Thu Feb 27 18:58:42 2020 (r358397) @@ -42,6 +42,12 @@ ArgumentsAdjuster getClangSyntaxOnlyAdjuster() { if (!Arg.startswith("-fcolor-diagnostics") && !Arg.startswith("-fdiagnostics-color")) AdjustedArgs.push_back(Args[i]); + // If we strip a color option, make sure we strip any preceeding `-Xclang` + // option as well. + // FIXME: This should be added to most argument adjusters! + else if (!AdjustedArgs.empty() && AdjustedArgs.back() == "-Xclang") + AdjustedArgs.pop_back(); + if (Arg == "-fsyntax-only") HasSyntaxOnly = true; } Modified: vendor/llvm-project/release-10.x/compiler-rt/lib/profile/GCDAProfiling.c ============================================================================== --- vendor/llvm-project/release-10.x/compiler-rt/lib/profile/GCDAProfiling.c Thu Feb 27 18:49:49 2020 (r358396) +++ vendor/llvm-project/release-10.x/compiler-rt/lib/profile/GCDAProfiling.c Thu Feb 27 18:58:42 2020 (r358397) @@ -62,27 +62,8 @@ typedef unsigned long long uint64_t; #include "InstrProfiling.h" #include "InstrProfilingUtil.h" -#ifndef _WIN32 -#include <pthread.h> -static pthread_mutex_t gcov_flush_mutex = PTHREAD_MUTEX_INITIALIZER; -static __inline void gcov_flush_lock() { - pthread_mutex_lock(&gcov_flush_mutex); -} -static __inline void gcov_flush_unlock() { - pthread_mutex_unlock(&gcov_flush_mutex); -} -#else -#include <windows.h> -static SRWLOCK gcov_flush_mutex = SRWLOCK_INIT; -static __inline void gcov_flush_lock() { - AcquireSRWLockExclusive(&gcov_flush_mutex); -} -static __inline void gcov_flush_unlock() { - ReleaseSRWLockExclusive(&gcov_flush_mutex); -} -#endif - /* #define DEBUG_GCDAPROFILING */ + /* * --- GCOV file format I/O primitives --- */ @@ -639,16 +620,12 @@ void llvm_register_flush_function(fn_ptr fn) { } void __gcov_flush() { - gcov_flush_lock(); - struct fn_node* curr = flush_fn_list.head; while (curr) { curr->fn(); curr = curr->next; } - - gcov_flush_unlock(); } COMPILER_RT_VISIBILITY Modified: vendor/llvm-project/release-10.x/libcxx/include/__bit_reference ============================================================================== --- vendor/llvm-project/release-10.x/libcxx/include/__bit_reference Thu Feb 27 18:49:49 2020 (r358396) +++ vendor/llvm-project/release-10.x/libcxx/include/__bit_reference Thu Feb 27 18:58:42 2020 (r358397) @@ -1122,6 +1122,21 @@ class __bit_iterator (public) __bit_iterator(const __type_for_copy_to_const& __it) _NOEXCEPT : __seg_(__it.__seg_), __ctz_(__it.__ctz_) {} + // The non-const __bit_iterator has historically had a non-trivial + // copy constructor (as a quirk of its construction). We need to maintain *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** _______________________________________________ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"