Vendor import of clang release_50 branch r311219:
https://llvm.org/svn/llvm-project/cfe/branches/release_50@311219
This commit is contained in:
parent
ffe56ea4c3
commit
6aa46a19c5
@ -61,7 +61,7 @@ Improvements to Clang's diagnostics
|
||||
New Compiler Flags
|
||||
------------------
|
||||
|
||||
The option ....
|
||||
- --autocomplete was implemented to obtain a list of flags and its arguments. This is used for shell autocompletion.
|
||||
|
||||
Deprecated Compiler Flags
|
||||
-------------------------
|
||||
@ -200,7 +200,13 @@ libclang
|
||||
Static Analyzer
|
||||
---------------
|
||||
|
||||
...
|
||||
- The static analyzer now supports using the
|
||||
`z3 theorem prover <https://github.com/z3prover/z3>`_ from Microsoft Research
|
||||
as an external constraint solver. This allows reasoning over more complex
|
||||
queries, but performance is ~15x slower than the default range-based
|
||||
constraint solver. To enable the z3 solver backend, clang must be built with
|
||||
the ``CLANG_ANALYZER_BUILD_Z3=ON`` option, and the
|
||||
``-Xanalyzer -analyzer-constraints=z3`` arguments passed at runtime.
|
||||
|
||||
Undefined Behavior Sanitizer (UBSan)
|
||||
------------------------------------
|
||||
@ -240,8 +246,20 @@ New Issues Found
|
||||
Python Binding Changes
|
||||
----------------------
|
||||
|
||||
Python bindings now support both Python 2 and Python 3.
|
||||
|
||||
The following methods have been added:
|
||||
|
||||
- ``is_scoped_enum`` has been added to ``Cursor``.
|
||||
|
||||
- ``exception_specification_kind`` has been added to ``Cursor``.
|
||||
|
||||
- ``get_address_space`` has been added to ``Type``.
|
||||
|
||||
- ``get_typedef_name`` has been added to ``Type``.
|
||||
|
||||
- ``get_exception_specification_kind`` has been added to ``Type``.
|
||||
|
||||
- ...
|
||||
|
||||
Significant Known Problems
|
||||
|
@ -3206,6 +3206,8 @@ enum CXCallingConv {
|
||||
CXCallingConv_X86RegCall = 8,
|
||||
CXCallingConv_IntelOclBicc = 9,
|
||||
CXCallingConv_Win64 = 10,
|
||||
/* Alias for compatibility with older versions of API. */
|
||||
CXCallingConv_X86_64Win64 = CXCallingConv_Win64,
|
||||
CXCallingConv_X86_64SysV = 11,
|
||||
CXCallingConv_X86VectorCall = 12,
|
||||
CXCallingConv_Swift = 13,
|
||||
|
@ -1666,8 +1666,7 @@ class FunctionDecl : public DeclaratorDecl, public DeclContext,
|
||||
unsigned HasSkippedBody : 1;
|
||||
|
||||
/// Indicates if the function declaration will have a body, once we're done
|
||||
/// parsing it. (We don't set it to false when we're done parsing, in the
|
||||
/// hopes this is simpler.)
|
||||
/// parsing it.
|
||||
unsigned WillHaveBody : 1;
|
||||
|
||||
/// \brief End part of this FunctionDecl's source range.
|
||||
|
@ -138,9 +138,10 @@ def err_drv_cc_print_options_failure : Error<
|
||||
def err_drv_lto_without_lld : Error<"LTO requires -fuse-ld=lld">;
|
||||
def err_drv_preamble_format : Error<
|
||||
"incorrect format for -preamble-bytes=N,END">;
|
||||
def err_invalid_ios_deployment_target : Error<
|
||||
def warn_invalid_ios_deployment_target : Warning<
|
||||
"invalid iOS deployment version '%0', iOS 10 is the maximum deployment "
|
||||
"target for 32-bit targets">;
|
||||
"target for 32-bit targets">, InGroup<InvalidIOSDeploymentTarget>,
|
||||
DefaultError;
|
||||
def err_drv_conflicting_deployment_targets : Error<
|
||||
"conflicting deployment targets, both '%0' and '%1' are present in environment">;
|
||||
def err_arc_unsupported_on_runtime : Error<
|
||||
|
@ -151,9 +151,13 @@ def GNUFlexibleArrayUnionMember : DiagGroup<"gnu-flexible-array-union-member">;
|
||||
def GNUFoldingConstant : DiagGroup<"gnu-folding-constant">;
|
||||
def FormatExtraArgs : DiagGroup<"format-extra-args">;
|
||||
def FormatZeroLength : DiagGroup<"format-zero-length">;
|
||||
def CXX1zCompatMangling : DiagGroup<"c++1z-compat-mangling">;
|
||||
|
||||
def InvalidIOSDeploymentTarget : DiagGroup<"invalid-ios-deployment-target">;
|
||||
|
||||
def CXX17CompatMangling : DiagGroup<"c++17-compat-mangling">;
|
||||
def : DiagGroup<"c++1z-compat-mangling", [CXX17CompatMangling]>;
|
||||
// Name of this warning in GCC.
|
||||
def NoexceptType : DiagGroup<"noexcept-type", [CXX1zCompatMangling]>;
|
||||
def NoexceptType : DiagGroup<"noexcept-type", [CXX17CompatMangling]>;
|
||||
|
||||
// Warnings for C++1y code which is not compatible with prior C++ standards.
|
||||
def CXXPre14Compat : DiagGroup<"c++98-c++11-compat">;
|
||||
@ -215,9 +219,10 @@ def CXX14Compat : DiagGroup<"c++14-compat", [CXXPre1zCompat]>;
|
||||
def CXX14CompatPedantic : DiagGroup<"c++14-compat-pedantic",
|
||||
[CXXPre1zCompatPedantic]>;
|
||||
|
||||
def CXX1zCompat : DiagGroup<"c++1z-compat", [DeprecatedRegister,
|
||||
def CXX17Compat : DiagGroup<"c++17-compat", [DeprecatedRegister,
|
||||
DeprecatedIncrementBool,
|
||||
CXX1zCompatMangling]>;
|
||||
CXX17CompatMangling]>;
|
||||
def : DiagGroup<"c++1z-compat", [CXX17Compat]>;
|
||||
|
||||
def ExitTimeDestructors : DiagGroup<"exit-time-destructors">;
|
||||
def FlexibleArrayExtensions : DiagGroup<"flexible-array-extensions">;
|
||||
@ -769,10 +774,11 @@ def CXX14 : DiagGroup<"c++14-extensions", [CXX14BinaryLiteral]>;
|
||||
|
||||
// A warning group for warnings about using C++1z features as extensions in
|
||||
// earlier C++ versions.
|
||||
def CXX1z : DiagGroup<"c++1z-extensions">;
|
||||
def CXX17 : DiagGroup<"c++17-extensions">;
|
||||
|
||||
def : DiagGroup<"c++0x-extensions", [CXX11]>;
|
||||
def : DiagGroup<"c++1y-extensions", [CXX14]>;
|
||||
def : DiagGroup<"c++1z-extensions", [CXX17]>;
|
||||
|
||||
def DelegatingCtorCycles :
|
||||
DiagGroup<"delegating-ctor-cycles">;
|
||||
|
@ -181,10 +181,10 @@ def err_hex_constant_requires : Error<
|
||||
def ext_hex_constant_invalid : Extension<
|
||||
"hexadecimal floating constants are a C99 feature">, InGroup<C99>;
|
||||
def ext_hex_literal_invalid : Extension<
|
||||
"hexadecimal floating literals are a C++1z feature">, InGroup<CXX1z>;
|
||||
"hexadecimal floating literals are a C++17 feature">, InGroup<CXX17>;
|
||||
def warn_cxx1z_hex_literal : Warning<
|
||||
"hexadecimal floating literals are incompatible with "
|
||||
"C++ standards before C++1z">,
|
||||
"C++ standards before C++17">,
|
||||
InGroup<CXXPre1zCompatPedantic>, DefaultIgnore;
|
||||
def ext_binary_literal : Extension<
|
||||
"binary integer literals are a GNU extension">, InGroup<GNUBinaryLiteral>;
|
||||
@ -208,7 +208,7 @@ def warn_cxx98_compat_unicode_literal : Warning<
|
||||
"unicode literals are incompatible with C++98">,
|
||||
InGroup<CXX98Compat>, DefaultIgnore;
|
||||
def warn_cxx14_compat_u8_character_literal : Warning<
|
||||
"unicode literals are incompatible with C++ standards before C++1z">,
|
||||
"unicode literals are incompatible with C++ standards before C++17">,
|
||||
InGroup<CXXPre1zCompat>, DefaultIgnore;
|
||||
def warn_cxx11_compat_user_defined_literal : Warning<
|
||||
"identifier after literal will be treated as a user-defined literal suffix "
|
||||
|
@ -211,10 +211,10 @@ def err_inline_namespace_alias : Error<"namespace alias cannot be inline">;
|
||||
def err_namespace_nonnamespace_scope : Error<
|
||||
"namespaces can only be defined in global or namespace scope">;
|
||||
def ext_nested_namespace_definition : ExtWarn<
|
||||
"nested namespace definition is a C++1z extension; "
|
||||
"define each namespace separately">, InGroup<CXX1z>;
|
||||
"nested namespace definition is a C++17 extension; "
|
||||
"define each namespace separately">, InGroup<CXX17>;
|
||||
def warn_cxx14_compat_nested_namespace_definition : Warning<
|
||||
"nested namespace definition is incompatible with C++ standards before C++1z">,
|
||||
"nested namespace definition is incompatible with C++ standards before C++17">,
|
||||
InGroup<CXXPre1zCompat>, DefaultIgnore;
|
||||
def err_inline_nested_namespace_definition : Error<
|
||||
"nested namespace definition cannot be 'inline'">;
|
||||
@ -358,7 +358,7 @@ def err_expected_coloncolon_after_super : Error<
|
||||
"expected '::' after '__super'">;
|
||||
|
||||
def ext_decomp_decl_empty : ExtWarn<
|
||||
"ISO C++1z does not allow a decomposition group to be empty">,
|
||||
"ISO C++17 does not allow a decomposition group to be empty">,
|
||||
InGroup<DiagGroup<"empty-decomposition">>;
|
||||
|
||||
/// Objective-C parser diagnostics
|
||||
@ -522,16 +522,16 @@ def err_function_is_not_record : Error<
|
||||
def err_super_in_using_declaration : Error<
|
||||
"'__super' cannot be used with a using declaration">;
|
||||
def ext_constexpr_if : ExtWarn<
|
||||
"constexpr if is a C++1z extension">, InGroup<CXX1z>;
|
||||
"constexpr if is a C++17 extension">, InGroup<CXX17>;
|
||||
def warn_cxx14_compat_constexpr_if : Warning<
|
||||
"constexpr if is incompatible with C++ standards before C++1z">,
|
||||
"constexpr if is incompatible with C++ standards before C++17">,
|
||||
DefaultIgnore, InGroup<CXXPre1zCompat>;
|
||||
def ext_init_statement : ExtWarn<
|
||||
"'%select{if|switch}0' initialization statements are a C++1z extension">,
|
||||
InGroup<CXX1z>;
|
||||
"'%select{if|switch}0' initialization statements are a C++17 extension">,
|
||||
InGroup<CXX17>;
|
||||
def warn_cxx14_compat_init_statement : Warning<
|
||||
"%select{if|switch}0 initialization statements are incompatible with "
|
||||
"C++ standards before C++1z">, DefaultIgnore, InGroup<CXXPre1zCompat>;
|
||||
"C++ standards before C++17">, DefaultIgnore, InGroup<CXXPre1zCompat>;
|
||||
|
||||
// C++ derived classes
|
||||
def err_dup_virtual : Error<"duplicate 'virtual' in base specifier">;
|
||||
@ -560,7 +560,7 @@ def warn_cxx98_compat_nullptr : Warning<
|
||||
|
||||
def warn_cxx14_compat_attribute : Warning<
|
||||
"attributes on %select{a namespace|an enumerator}0 declaration are "
|
||||
"incompatible with C++ standards before C++1z">,
|
||||
"incompatible with C++ standards before C++17">,
|
||||
InGroup<CXXPre1zCompat>, DefaultIgnore;
|
||||
def warn_cxx98_compat_alignas : Warning<"'alignas' is incompatible with C++98">,
|
||||
InGroup<CXX98Compat>, DefaultIgnore;
|
||||
@ -577,10 +577,10 @@ def err_cxx11_attribute_repeated : Error<
|
||||
"attribute %0 cannot appear multiple times in an attribute specifier">;
|
||||
def warn_cxx14_compat_using_attribute_ns : Warning<
|
||||
"default scope specifier for attributes is incompatible with C++ standards "
|
||||
"before C++1z">, InGroup<CXXPre1zCompat>, DefaultIgnore;
|
||||
"before C++17">, InGroup<CXXPre1zCompat>, DefaultIgnore;
|
||||
def ext_using_attribute_ns : ExtWarn<
|
||||
"default scope specifier for attributes is a C++1z extension">,
|
||||
InGroup<CXX1z>;
|
||||
"default scope specifier for attributes is a C++17 extension">,
|
||||
InGroup<CXX17>;
|
||||
def err_using_attribute_ns_conflict : Error<
|
||||
"attribute with scope specifier cannot follow default scope specifier">;
|
||||
def err_attributes_not_allowed : Error<"an attribute list cannot appear here">;
|
||||
@ -617,11 +617,11 @@ def err_expected_comma_greater : Error<
|
||||
def err_class_on_template_template_param : Error<
|
||||
"template template parameter requires 'class' after the parameter list">;
|
||||
def ext_template_template_param_typename : ExtWarn<
|
||||
"template template parameter using 'typename' is a C++1z extension">,
|
||||
InGroup<CXX1z>;
|
||||
"template template parameter using 'typename' is a C++17 extension">,
|
||||
InGroup<CXX17>;
|
||||
def warn_cxx14_compat_template_template_param_typename : Warning<
|
||||
"template template parameter using 'typename' is "
|
||||
"incompatible with C++ standards before C++1z">,
|
||||
"incompatible with C++ standards before C++17">,
|
||||
InGroup<CXXPre1zCompat>, DefaultIgnore;
|
||||
def err_template_spec_syntax_non_template : Error<
|
||||
"identifier followed by '<' indicates a class template specialization but "
|
||||
@ -695,10 +695,10 @@ def err_default_template_template_parameter_not_template : Error<
|
||||
"template">;
|
||||
|
||||
def ext_fold_expression : ExtWarn<
|
||||
"pack fold expression is a C++1z extension">,
|
||||
InGroup<CXX1z>;
|
||||
"pack fold expression is a C++17 extension">,
|
||||
InGroup<CXX17>;
|
||||
def warn_cxx14_compat_fold_expression : Warning<
|
||||
"pack fold expression is incompatible with C++ standards before C++1z">,
|
||||
"pack fold expression is incompatible with C++ standards before C++17">,
|
||||
InGroup<CXXPre1zCompat>, DefaultIgnore;
|
||||
def err_expected_fold_operator : Error<
|
||||
"expected a foldable binary operator in fold expression">;
|
||||
@ -751,16 +751,16 @@ def err_alias_declaration_pack_expansion : Error<
|
||||
// C++1z using-declaration pack expansions
|
||||
def ext_multi_using_declaration : ExtWarn<
|
||||
"use of multiple declarators in a single using declaration is "
|
||||
"a C++1z extension">, InGroup<CXX1z>;
|
||||
"a C++17 extension">, InGroup<CXX17>;
|
||||
def warn_cxx1z_compat_multi_using_declaration : Warning<
|
||||
"use of multiple declarators in a single using declaration is "
|
||||
"incompatible with C++ standards before C++1z">,
|
||||
"incompatible with C++ standards before C++17">,
|
||||
InGroup<CXXPre1zCompat>, DefaultIgnore;
|
||||
def ext_using_declaration_pack : ExtWarn<
|
||||
"pack expansion of using declaration is a C++1z extension">, InGroup<CXX1z>;
|
||||
"pack expansion of using declaration is a C++17 extension">, InGroup<CXX17>;
|
||||
def warn_cxx1z_compat_using_declaration_pack : Warning<
|
||||
"pack expansion using declaration is incompatible with C++ standards "
|
||||
"before C++1z">, InGroup<CXXPre1zCompat>, DefaultIgnore;
|
||||
"before C++17">, InGroup<CXXPre1zCompat>, DefaultIgnore;
|
||||
|
||||
// C++11 override control
|
||||
def ext_override_control_keyword : ExtWarn<
|
||||
@ -817,10 +817,10 @@ def err_expected_star_this_capture : Error<
|
||||
|
||||
// C++1z constexpr lambda expressions
|
||||
def warn_cxx14_compat_constexpr_on_lambda : Warning<
|
||||
"constexpr on lambda expressions is incompatible with C++ standards before C++1z">,
|
||||
"constexpr on lambda expressions is incompatible with C++ standards before C++17">,
|
||||
InGroup<CXXPre1zCompat>, DefaultIgnore;
|
||||
def ext_constexpr_on_lambda_cxx1z : ExtWarn<
|
||||
"'constexpr' on lambda expressions is a C++1z extension">, InGroup<CXX1z>;
|
||||
"'constexpr' on lambda expressions is a C++17 extension">, InGroup<CXX17>;
|
||||
|
||||
// Availability attribute
|
||||
def err_expected_version : Error<
|
||||
|
@ -211,9 +211,9 @@ def warn_auto_storage_class : Warning<
|
||||
|
||||
def warn_deprecated_register : Warning<
|
||||
"'register' storage class specifier is deprecated "
|
||||
"and incompatible with C++1z">, InGroup<DeprecatedRegister>;
|
||||
"and incompatible with C++17">, InGroup<DeprecatedRegister>;
|
||||
def ext_register_storage_class : ExtWarn<
|
||||
"ISO C++1z does not allow 'register' storage class specifier">,
|
||||
"ISO C++17 does not allow 'register' storage class specifier">,
|
||||
DefaultError, InGroup<Register>;
|
||||
|
||||
def err_invalid_decl_spec_combination : Error<
|
||||
@ -391,9 +391,9 @@ def err_decomp_decl_context : Error<
|
||||
"decomposition declaration not permitted in this context">;
|
||||
def warn_cxx14_compat_decomp_decl : Warning<
|
||||
"decomposition declarations are incompatible with "
|
||||
"C++ standards before C++1z">, DefaultIgnore, InGroup<CXXPre1zCompat>;
|
||||
"C++ standards before C++17">, DefaultIgnore, InGroup<CXXPre1zCompat>;
|
||||
def ext_decomp_decl : ExtWarn<
|
||||
"decomposition declarations are a C++1z extension">, InGroup<CXX1z>;
|
||||
"decomposition declarations are a C++17 extension">, InGroup<CXX17>;
|
||||
def err_decomp_decl_spec : Error<
|
||||
"decomposition declaration cannot be declared "
|
||||
"%plural{1:'%1'|:with '%1' specifiers}0">;
|
||||
@ -494,7 +494,7 @@ def err_access_decl : Error<
|
||||
"ISO C++11 does not allow access declarations; "
|
||||
"use using declarations instead">;
|
||||
def ext_dynamic_exception_spec : ExtWarn<
|
||||
"ISO C++1z does not allow dynamic exception specifications">,
|
||||
"ISO C++17 does not allow dynamic exception specifications">,
|
||||
InGroup<DynamicExceptionSpec>, DefaultError;
|
||||
def warn_exception_spec_deprecated : Warning<
|
||||
"dynamic exception specifications are deprecated">,
|
||||
@ -507,7 +507,7 @@ def warn_deprecated_copy_operation : Warning<
|
||||
InGroup<Deprecated>, DefaultIgnore;
|
||||
def warn_cxx1z_compat_exception_spec_in_signature : Warning<
|
||||
"mangled name of %0 will change in C++17 due to non-throwing exception "
|
||||
"specification in function signature">, InGroup<CXX1zCompatMangling>;
|
||||
"specification in function signature">, InGroup<CXX17CompatMangling>;
|
||||
|
||||
def warn_global_constructor : Warning<
|
||||
"declaration requires a global constructor">,
|
||||
@ -1200,15 +1200,15 @@ def err_static_assert_expression_is_not_constant : Error<
|
||||
"static_assert expression is not an integral constant expression">;
|
||||
def err_static_assert_failed : Error<"static_assert failed%select{ %1|}0">;
|
||||
def ext_static_assert_no_message : ExtWarn<
|
||||
"static_assert with no message is a C++1z extension">, InGroup<CXX1z>;
|
||||
"static_assert with no message is a C++17 extension">, InGroup<CXX17>;
|
||||
def warn_cxx14_compat_static_assert_no_message : Warning<
|
||||
"static_assert with no message is incompatible with C++ standards before C++1z">,
|
||||
"static_assert with no message is incompatible with C++ standards before C++17">,
|
||||
DefaultIgnore, InGroup<CXXPre1zCompat>;
|
||||
|
||||
def ext_inline_variable : ExtWarn<
|
||||
"inline variables are a C++1z extension">, InGroup<CXX1z>;
|
||||
"inline variables are a C++17 extension">, InGroup<CXX17>;
|
||||
def warn_cxx14_compat_inline_variable : Warning<
|
||||
"inline variables are incompatible with C++ standards before C++1z">,
|
||||
"inline variables are incompatible with C++ standards before C++17">,
|
||||
DefaultIgnore, InGroup<CXXPre1zCompat>;
|
||||
|
||||
def warn_inline_namespace_reopened_noninline : Warning<
|
||||
@ -1922,7 +1922,7 @@ def err_auto_not_allowed : Error<
|
||||
"|in non-static struct member|in struct member"
|
||||
"|in non-static union member|in union member"
|
||||
"|in non-static class member|in interface member"
|
||||
"|in exception declaration|in template parameter until C++1z|in block literal"
|
||||
"|in exception declaration|in template parameter until C++17|in block literal"
|
||||
"|in template argument|in typedef|in type alias|in function return type"
|
||||
"|in conversion function type|here|in lambda parameter"
|
||||
"|in type allocated by 'new'|in K&R-style function parameter"
|
||||
@ -2147,11 +2147,11 @@ def err_for_range_iter_deduction_failure : Error<
|
||||
def err_for_range_member_begin_end_mismatch : Error<
|
||||
"range type %0 has '%select{begin|end}1' member but no '%select{end|begin}1' member">;
|
||||
def ext_for_range_begin_end_types_differ : ExtWarn<
|
||||
"'begin' and 'end' returning different types (%0 and %1) is a C++1z extension">,
|
||||
InGroup<CXX1z>;
|
||||
"'begin' and 'end' returning different types (%0 and %1) is a C++17 extension">,
|
||||
InGroup<CXX17>;
|
||||
def warn_for_range_begin_end_types_differ : Warning<
|
||||
"'begin' and 'end' returning different types (%0 and %1) is incompatible "
|
||||
"with C++ standards before C++1z">, InGroup<CXXPre1zCompat>, DefaultIgnore;
|
||||
"with C++ standards before C++17">, InGroup<CXXPre1zCompat>, DefaultIgnore;
|
||||
def note_in_for_range: Note<
|
||||
"when looking up '%select{begin|end}0' function for range expression "
|
||||
"of type %1">;
|
||||
@ -3905,7 +3905,7 @@ def err_template_nontype_parm_bad_type : Error<
|
||||
"a non-type template parameter cannot have type %0">;
|
||||
def warn_cxx14_compat_template_nontype_parm_auto_type : Warning<
|
||||
"non-type template parameters declared with %0 are incompatible with C++ "
|
||||
"standards before C++1z">,
|
||||
"standards before C++17">,
|
||||
DefaultIgnore, InGroup<CXXPre1zCompat>;
|
||||
def err_template_param_default_arg_redefinition : Error<
|
||||
"template parameter redefines default argument">;
|
||||
@ -6337,9 +6337,9 @@ def note_member_first_declared_here : Note<
|
||||
def err_decrement_bool : Error<"cannot decrement expression of type bool">;
|
||||
def warn_increment_bool : Warning<
|
||||
"incrementing expression of type bool is deprecated and "
|
||||
"incompatible with C++1z">, InGroup<DeprecatedIncrementBool>;
|
||||
"incompatible with C++17">, InGroup<DeprecatedIncrementBool>;
|
||||
def ext_increment_bool : ExtWarn<
|
||||
"ISO C++1z does not allow incrementing expression of type bool">,
|
||||
"ISO C++17 does not allow incrementing expression of type bool">,
|
||||
DefaultError, InGroup<IncrementBool>;
|
||||
def err_increment_decrement_enum : Error<
|
||||
"cannot %select{decrement|increment}0 expression of enum type %1">;
|
||||
@ -6528,10 +6528,10 @@ let CategoryName = "Lambda Issue" in {
|
||||
|
||||
// C++1z '*this' captures.
|
||||
def warn_cxx14_compat_star_this_lambda_capture : Warning<
|
||||
"by value capture of '*this' is incompatible with C++ standards before C++1z">,
|
||||
"by value capture of '*this' is incompatible with C++ standards before C++17">,
|
||||
InGroup<CXXPre1zCompat>, DefaultIgnore;
|
||||
def ext_star_this_lambda_capture_cxx1z : ExtWarn<
|
||||
"capture of '*this' by copy is a C++1z extension">, InGroup<CXX1z>;
|
||||
"capture of '*this' by copy is a C++17 extension">, InGroup<CXX17>;
|
||||
}
|
||||
|
||||
def err_return_in_captured_stmt : Error<
|
||||
@ -7200,7 +7200,7 @@ def warn_unused_volatile : Warning<
|
||||
def ext_cxx14_attr : Extension<
|
||||
"use of the %0 attribute is a C++14 extension">, InGroup<CXX14>;
|
||||
def ext_cxx1z_attr : Extension<
|
||||
"use of the %0 attribute is a C++1z extension">, InGroup<CXX1z>;
|
||||
"use of the %0 attribute is a C++17 extension">, InGroup<CXX17>;
|
||||
|
||||
def warn_unused_comparison : Warning<
|
||||
"%select{%select{|in}1equality|relational}0 comparison result unused">,
|
||||
|
@ -2019,6 +2019,10 @@ def mdspr2 : Flag<["-"], "mdspr2">, Group<m_Group>;
|
||||
def mno_dspr2 : Flag<["-"], "mno-dspr2">, Group<m_Group>;
|
||||
def msingle_float : Flag<["-"], "msingle-float">, Group<m_Group>;
|
||||
def mdouble_float : Flag<["-"], "mdouble-float">, Group<m_Group>;
|
||||
def mmadd4 : Flag<["-"], "mmadd4">, Group<m_Group>,
|
||||
HelpText<"Enable the generation of 4-operand madd.s, madd.d and related instructions.">;
|
||||
def mno_madd4 : Flag<["-"], "mno-madd4">, Group<m_Group>,
|
||||
HelpText<"Disable the generation of 4-operand madd.s, madd.d and related instructions.">;
|
||||
def mmsa : Flag<["-"], "mmsa">, Group<m_Group>,
|
||||
HelpText<"Enable MSA ASE (MIPS only)">;
|
||||
def mno_msa : Flag<["-"], "mno-msa">, Group<m_Group>,
|
||||
|
@ -315,7 +315,7 @@ class ToolChain {
|
||||
|
||||
/// IsUnwindTablesDefault - Does this tool chain use -funwind-tables
|
||||
/// by default.
|
||||
virtual bool IsUnwindTablesDefault() const;
|
||||
virtual bool IsUnwindTablesDefault(const llvm::opt::ArgList &Args) const;
|
||||
|
||||
/// \brief Test whether this toolchain defaults to PIC.
|
||||
virtual bool isPICDefault() const = 0;
|
||||
|
@ -109,15 +109,17 @@ LANGSTANDARD(gnucxx14, "gnu++14",
|
||||
GNUMode)
|
||||
LANGSTANDARD_ALIAS_DEPR(gnucxx14, "gnu++1y")
|
||||
|
||||
LANGSTANDARD(cxx1z, "c++1z",
|
||||
CXX, "Working draft for ISO C++ 2017",
|
||||
LANGSTANDARD(cxx17, "c++17",
|
||||
CXX, "ISO C++ 2017 with amendments",
|
||||
LineComment | CPlusPlus | CPlusPlus11 | CPlusPlus14 | CPlusPlus1z |
|
||||
Digraphs | HexFloat)
|
||||
LANGSTANDARD_ALIAS_DEPR(cxx17, "c++1z")
|
||||
|
||||
LANGSTANDARD(gnucxx1z, "gnu++1z",
|
||||
CXX, "Working draft for ISO C++ 2017 with GNU extensions",
|
||||
LANGSTANDARD(gnucxx17, "gnu++17",
|
||||
CXX, "ISO C++ 2017 with amendments and GNU extensions",
|
||||
LineComment | CPlusPlus | CPlusPlus11 | CPlusPlus14 | CPlusPlus1z |
|
||||
Digraphs | HexFloat | GNUMode)
|
||||
LANGSTANDARD_ALIAS_DEPR(gnucxx17, "gnu++1z")
|
||||
|
||||
LANGSTANDARD(cxx2a, "c++2a",
|
||||
CXX, "Working draft for ISO C++ 2020",
|
||||
|
@ -1839,7 +1839,8 @@ bool CXXMethodDecl::hasInlineBody() const {
|
||||
CheckFn = this;
|
||||
|
||||
const FunctionDecl *fn;
|
||||
return CheckFn->hasBody(fn) && !fn->isOutOfLine();
|
||||
return CheckFn->isDefined(fn) && !fn->isOutOfLine() &&
|
||||
(fn->doesThisDeclarationHaveABody() || fn->willHaveBody());
|
||||
}
|
||||
|
||||
bool CXXMethodDecl::isLambdaStaticInvoker() const {
|
||||
|
@ -1052,7 +1052,9 @@ CXXUnresolvedConstructExpr::CXXUnresolvedConstructExpr(TypeSourceInfo *Type,
|
||||
:Type->getType()->isRValueReferenceType()? VK_XValue
|
||||
:VK_RValue),
|
||||
OK_Ordinary,
|
||||
Type->getType()->isDependentType(), true, true,
|
||||
Type->getType()->isDependentType() ||
|
||||
Type->getType()->getContainedDeducedType(),
|
||||
true, true,
|
||||
Type->getType()->containsUnexpandedParameterPack()),
|
||||
Type(Type),
|
||||
LParenLoc(LParenLoc),
|
||||
|
@ -9788,6 +9788,8 @@ class VoidExprEvaluator
|
||||
|
||||
bool Success(const APValue &V, const Expr *e) { return true; }
|
||||
|
||||
bool ZeroInitialization(const Expr *E) { return true; }
|
||||
|
||||
bool VisitCastExpr(const CastExpr *E) {
|
||||
switch (E->getCastKind()) {
|
||||
default:
|
||||
|
@ -8050,6 +8050,7 @@ class MipsTargetInfo : public TargetInfo {
|
||||
NoDSP, DSP1, DSP2
|
||||
} DspRev;
|
||||
bool HasMSA;
|
||||
bool DisableMadd4;
|
||||
|
||||
protected:
|
||||
bool HasFP64;
|
||||
@ -8060,7 +8061,7 @@ class MipsTargetInfo : public TargetInfo {
|
||||
: TargetInfo(Triple), IsMips16(false), IsMicromips(false),
|
||||
IsNan2008(false), IsSingleFloat(false), IsNoABICalls(false),
|
||||
CanUseBSDABICalls(false), FloatABI(HardFloat), DspRev(NoDSP),
|
||||
HasMSA(false), HasFP64(false) {
|
||||
HasMSA(false), DisableMadd4(false), HasFP64(false) {
|
||||
TheCXXABI.set(TargetCXXABI::GenericMIPS);
|
||||
|
||||
setABI((getTriple().getArch() == llvm::Triple::mips ||
|
||||
@ -8306,6 +8307,9 @@ class MipsTargetInfo : public TargetInfo {
|
||||
if (HasMSA)
|
||||
Builder.defineMacro("__mips_msa", Twine(1));
|
||||
|
||||
if (DisableMadd4)
|
||||
Builder.defineMacro("__mips_no_madd4", Twine(1));
|
||||
|
||||
Builder.defineMacro("_MIPS_SZPTR", Twine(getPointerWidth(0)));
|
||||
Builder.defineMacro("_MIPS_SZINT", Twine(getIntWidth()));
|
||||
Builder.defineMacro("_MIPS_SZLONG", Twine(getLongWidth()));
|
||||
@ -8468,6 +8472,8 @@ class MipsTargetInfo : public TargetInfo {
|
||||
DspRev = std::max(DspRev, DSP2);
|
||||
else if (Feature == "+msa")
|
||||
HasMSA = true;
|
||||
else if (Feature == "+nomadd4")
|
||||
DisableMadd4 = true;
|
||||
else if (Feature == "+fp64")
|
||||
HasFP64 = true;
|
||||
else if (Feature == "-fp64")
|
||||
|
@ -5573,17 +5573,14 @@ void ARMABIInfo::setCCs() {
|
||||
// AAPCS apparently requires runtime support functions to be soft-float, but
|
||||
// that's almost certainly for historic reasons (Thumb1 not supporting VFP
|
||||
// most likely). It's more convenient for AAPCS16_VFP to be hard-float.
|
||||
switch (getABIKind()) {
|
||||
case APCS:
|
||||
case AAPCS16_VFP:
|
||||
if (abiCC != getLLVMDefaultCC())
|
||||
|
||||
// The Run-time ABI for the ARM Architecture section 4.1.2 requires
|
||||
// AEABI-complying FP helper functions to use the base AAPCS.
|
||||
// These AEABI functions are expanded in the ARM llvm backend, all the builtin
|
||||
// support functions emitted by clang such as the _Complex helpers follow the
|
||||
// abiCC.
|
||||
if (abiCC != getLLVMDefaultCC())
|
||||
BuiltinCC = abiCC;
|
||||
break;
|
||||
case AAPCS:
|
||||
case AAPCS_VFP:
|
||||
BuiltinCC = llvm::CallingConv::ARM_AAPCS;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
ABIArgInfo ARMABIInfo::classifyArgumentType(QualType Ty,
|
||||
@ -6754,14 +6751,6 @@ MipsABIInfo::classifyArgumentType(QualType Ty, uint64_t &Offset) const {
|
||||
return getNaturalAlignIndirect(Ty, RAA == CGCXXABI::RAA_DirectInMemory);
|
||||
}
|
||||
|
||||
// Use indirect if the aggregate cannot fit into registers for
|
||||
// passing arguments according to the ABI
|
||||
unsigned Threshold = IsO32 ? 16 : 64;
|
||||
|
||||
if(getContext().getTypeSizeInChars(Ty) > CharUnits::fromQuantity(Threshold))
|
||||
return ABIArgInfo::getIndirect(CharUnits::fromQuantity(Align), true,
|
||||
getContext().getTypeAlign(Ty) / 8 > Align);
|
||||
|
||||
// If we have reached here, aggregates are passed directly by coercing to
|
||||
// another structure type. Padding is inserted if the offset of the
|
||||
// aggregate is unaligned.
|
||||
|
@ -217,7 +217,7 @@ StringRef ToolChain::getDefaultUniversalArchName() const {
|
||||
}
|
||||
}
|
||||
|
||||
bool ToolChain::IsUnwindTablesDefault() const {
|
||||
bool ToolChain::IsUnwindTablesDefault(const ArgList &Args) const {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -297,6 +297,8 @@ void mips::getMIPSTargetFeatures(const Driver &D, const llvm::Triple &Triple,
|
||||
|
||||
AddTargetFeature(Args, Features, options::OPT_mno_odd_spreg,
|
||||
options::OPT_modd_spreg, "nooddspreg");
|
||||
AddTargetFeature(Args, Features, options::OPT_mno_madd4, options::OPT_mmadd4,
|
||||
"nomadd4");
|
||||
AddTargetFeature(Args, Features, options::OPT_mlong_calls,
|
||||
options::OPT_mno_long_calls, "long-calls");
|
||||
AddTargetFeature(Args, Features, options::OPT_mmt, options::OPT_mno_mt,"mt");
|
||||
|
@ -2538,7 +2538,7 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA,
|
||||
bool AsynchronousUnwindTables =
|
||||
Args.hasFlag(options::OPT_fasynchronous_unwind_tables,
|
||||
options::OPT_fno_asynchronous_unwind_tables,
|
||||
(getToolChain().IsUnwindTablesDefault() ||
|
||||
(getToolChain().IsUnwindTablesDefault(Args) ||
|
||||
getToolChain().getSanitizerArgs().needsUnwindTables()) &&
|
||||
!KernelOrKext);
|
||||
if (Args.hasFlag(options::OPT_funwind_tables, options::OPT_fno_unwind_tables,
|
||||
|
@ -214,7 +214,7 @@ CrossWindowsToolChain::CrossWindowsToolChain(const Driver &D,
|
||||
}
|
||||
}
|
||||
|
||||
bool CrossWindowsToolChain::IsUnwindTablesDefault() const {
|
||||
bool CrossWindowsToolChain::IsUnwindTablesDefault(const ArgList &Args) const {
|
||||
// FIXME: all non-x86 targets need unwind tables, however, LLVM currently does
|
||||
// not know how to emit them.
|
||||
return getArch() == llvm::Triple::x86_64;
|
||||
|
@ -56,7 +56,7 @@ class LLVM_LIBRARY_VISIBILITY CrossWindowsToolChain : public Generic_GCC {
|
||||
const llvm::opt::ArgList &Args);
|
||||
|
||||
bool IsIntegratedAssemblerDefault() const override { return true; }
|
||||
bool IsUnwindTablesDefault() const override;
|
||||
bool IsUnwindTablesDefault(const llvm::opt::ArgList &Args) const override;
|
||||
bool isPICDefault() const override;
|
||||
bool isPIEDefault() const override;
|
||||
bool isPICDefaultForced() const override;
|
||||
|
@ -1174,13 +1174,12 @@ void Darwin::AddDeploymentTarget(DerivedArgList &Args) const {
|
||||
unsigned Major, Minor, Micro;
|
||||
bool HadExtra;
|
||||
|
||||
// iOS 10 is the maximum deployment target for 32-bit targets.
|
||||
if (iOSVersion && getTriple().isArch32Bit() &&
|
||||
Driver::GetReleaseVersion(iOSVersion->getValue(), Major, Minor, Micro,
|
||||
HadExtra) &&
|
||||
Major > 10)
|
||||
getDriver().Diag(diag::err_invalid_ios_deployment_target)
|
||||
<< iOSVersion->getAsString(Args);
|
||||
// The iOS deployment target that is explicitly specified via a command line
|
||||
// option or an environment variable.
|
||||
std::string ExplicitIOSDeploymentTargetStr;
|
||||
|
||||
if (iOSVersion)
|
||||
ExplicitIOSDeploymentTargetStr = iOSVersion->getAsString(Args);
|
||||
|
||||
// Add a macro to differentiate between m(iphone|tv|watch)os-version-min=X.Y and
|
||||
// -m(iphone|tv|watch)simulator-version-min=X.Y.
|
||||
@ -1223,13 +1222,9 @@ void Darwin::AddDeploymentTarget(DerivedArgList &Args) const {
|
||||
if (char *env = ::getenv("WATCHOS_DEPLOYMENT_TARGET"))
|
||||
WatchOSTarget = env;
|
||||
|
||||
// iOS 10 is the maximum deployment target for 32-bit targets.
|
||||
if (!iOSTarget.empty() && getTriple().isArch32Bit() &&
|
||||
Driver::GetReleaseVersion(iOSTarget.c_str(), Major, Minor, Micro,
|
||||
HadExtra) &&
|
||||
Major > 10)
|
||||
getDriver().Diag(diag::err_invalid_ios_deployment_target)
|
||||
<< std::string("IPHONEOS_DEPLOYMENT_TARGET=") + iOSTarget;
|
||||
if (!iOSTarget.empty())
|
||||
ExplicitIOSDeploymentTargetStr =
|
||||
std::string("IPHONEOS_DEPLOYMENT_TARGET=") + iOSTarget;
|
||||
|
||||
// If there is no command-line argument to specify the Target version and
|
||||
// no environment variable defined, see if we can set the default based
|
||||
@ -1393,12 +1388,19 @@ void Darwin::AddDeploymentTarget(DerivedArgList &Args) const {
|
||||
HadExtra || Major >= 100 || Minor >= 100 || Micro >= 100)
|
||||
getDriver().Diag(diag::err_drv_invalid_version_number)
|
||||
<< iOSVersion->getAsString(Args);
|
||||
// iOS 10 is the maximum deployment target for 32-bit targets. If the
|
||||
// inferred deployment target is iOS 11 or later, set it to 10.99.
|
||||
// For 32-bit targets, the deployment target for iOS has to be earlier than
|
||||
// iOS 11.
|
||||
if (getTriple().isArch32Bit() && Major >= 11) {
|
||||
Major = 10;
|
||||
Minor = 99;
|
||||
Micro = 99;
|
||||
// If the deployment target is explicitly specified, print a diagnostic.
|
||||
if (!ExplicitIOSDeploymentTargetStr.empty()) {
|
||||
getDriver().Diag(diag::warn_invalid_ios_deployment_target)
|
||||
<< ExplicitIOSDeploymentTargetStr;
|
||||
// Otherwise, set it to 10.99.99.
|
||||
} else {
|
||||
Major = 10;
|
||||
Minor = 99;
|
||||
Micro = 99;
|
||||
}
|
||||
}
|
||||
} else if (Platform == TvOS) {
|
||||
if (!Driver::GetReleaseVersion(TvOSVersion->getValue(), Major, Minor,
|
||||
@ -1834,8 +1836,8 @@ Darwin::TranslateArgs(const DerivedArgList &Args, StringRef BoundArch,
|
||||
return DAL;
|
||||
}
|
||||
|
||||
bool MachO::IsUnwindTablesDefault() const {
|
||||
return getArch() == llvm::Triple::x86_64;
|
||||
bool MachO::IsUnwindTablesDefault(const ArgList &Args) const {
|
||||
return !UseSjLjExceptions(Args);
|
||||
}
|
||||
|
||||
bool MachO::UseDwarfDebugFlags() const {
|
||||
|
@ -216,7 +216,7 @@ class LLVM_LIBRARY_VISIBILITY MachO : public ToolChain {
|
||||
|
||||
bool UseObjCMixedDispatch() const override { return true; }
|
||||
|
||||
bool IsUnwindTablesDefault() const override;
|
||||
bool IsUnwindTablesDefault(const llvm::opt::ArgList &Args) const override;
|
||||
|
||||
RuntimeLibType GetDefaultRuntimeLibType() const override {
|
||||
return ToolChain::RLT_CompilerRT;
|
||||
|
@ -2291,7 +2291,7 @@ void Generic_GCC::printVerboseInfo(raw_ostream &OS) const {
|
||||
CudaInstallation.print(OS);
|
||||
}
|
||||
|
||||
bool Generic_GCC::IsUnwindTablesDefault() const {
|
||||
bool Generic_GCC::IsUnwindTablesDefault(const ArgList &Args) const {
|
||||
return getArch() == llvm::Triple::x86_64;
|
||||
}
|
||||
|
||||
|
@ -284,7 +284,7 @@ class LLVM_LIBRARY_VISIBILITY Generic_GCC : public ToolChain {
|
||||
|
||||
void printVerboseInfo(raw_ostream &OS) const override;
|
||||
|
||||
bool IsUnwindTablesDefault() const override;
|
||||
bool IsUnwindTablesDefault(const llvm::opt::ArgList &Args) const override;
|
||||
bool isPICDefault() const override;
|
||||
bool isPIEDefault() const override;
|
||||
bool isPICDefaultForced() const override;
|
||||
|
@ -699,7 +699,7 @@ bool MSVCToolChain::IsIntegratedAssemblerDefault() const {
|
||||
return true;
|
||||
}
|
||||
|
||||
bool MSVCToolChain::IsUnwindTablesDefault() const {
|
||||
bool MSVCToolChain::IsUnwindTablesDefault(const ArgList &Args) const {
|
||||
// Emit unwind tables by default on Win64. All non-x86_32 Windows platforms
|
||||
// such as ARM and PPC actually require unwind tables, but LLVM doesn't know
|
||||
// how to generate them yet.
|
||||
|
@ -73,7 +73,7 @@ class LLVM_LIBRARY_VISIBILITY MSVCToolChain : public ToolChain {
|
||||
Action::OffloadKind DeviceOffloadKind) const override;
|
||||
|
||||
bool IsIntegratedAssemblerDefault() const override;
|
||||
bool IsUnwindTablesDefault() const override;
|
||||
bool IsUnwindTablesDefault(const llvm::opt::ArgList &Args) const override;
|
||||
bool isPICDefault() const override;
|
||||
bool isPIEDefault() const override;
|
||||
bool isPICDefaultForced() const override;
|
||||
|
@ -347,7 +347,7 @@ Tool *toolchains::MinGW::buildLinker() const {
|
||||
return new tools::MinGW::Linker(*this);
|
||||
}
|
||||
|
||||
bool toolchains::MinGW::IsUnwindTablesDefault() const {
|
||||
bool toolchains::MinGW::IsUnwindTablesDefault(const ArgList &Args) const {
|
||||
return getArch() == llvm::Triple::x86_64;
|
||||
}
|
||||
|
||||
|
@ -60,7 +60,7 @@ class LLVM_LIBRARY_VISIBILITY MinGW : public ToolChain {
|
||||
const llvm::opt::ArgList &Args);
|
||||
|
||||
bool IsIntegratedAssemblerDefault() const override;
|
||||
bool IsUnwindTablesDefault() const override;
|
||||
bool IsUnwindTablesDefault(const llvm::opt::ArgList &Args) const override;
|
||||
bool isPICDefault() const override;
|
||||
bool isPIEDefault() const override;
|
||||
bool isPICDefaultForced() const override;
|
||||
|
@ -65,7 +65,10 @@ class LLVM_LIBRARY_VISIBILITY NetBSD : public Generic_ELF {
|
||||
const llvm::opt::ArgList &DriverArgs,
|
||||
llvm::opt::ArgStringList &CC1Args) const override;
|
||||
|
||||
bool IsUnwindTablesDefault() const override { return true; }
|
||||
bool IsUnwindTablesDefault(const llvm::opt::ArgList &Args) const override {
|
||||
return true;
|
||||
}
|
||||
|
||||
SanitizerMask getSupportedSanitizers() const override;
|
||||
|
||||
protected:
|
||||
|
@ -497,6 +497,8 @@ static void InitializeCPlusPlusFeatureTestMacros(const LangOptions &LangOpts,
|
||||
Builder.defineMacro("__cpp_ref_qualifiers", "200710");
|
||||
Builder.defineMacro("__cpp_alias_templates", "200704");
|
||||
}
|
||||
if (LangOpts.ThreadsafeStatics)
|
||||
Builder.defineMacro("__cpp_threadsafe_static_init", "200806");
|
||||
|
||||
// C++14 features.
|
||||
if (LangOpts.CPlusPlus14) {
|
||||
@ -519,6 +521,7 @@ static void InitializeCPlusPlusFeatureTestMacros(const LangOptions &LangOpts,
|
||||
Builder.defineMacro("__cpp_noexcept_function_type", "201510");
|
||||
Builder.defineMacro("__cpp_capture_star_this", "201603");
|
||||
Builder.defineMacro("__cpp_if_constexpr", "201606");
|
||||
Builder.defineMacro("__cpp_deduction_guides", "201611");
|
||||
Builder.defineMacro("__cpp_template_auto", "201606");
|
||||
Builder.defineMacro("__cpp_namespace_attributes", "201411");
|
||||
Builder.defineMacro("__cpp_enumerator_attributes", "201411");
|
||||
@ -528,8 +531,6 @@ static void InitializeCPlusPlusFeatureTestMacros(const LangOptions &LangOpts,
|
||||
Builder.defineMacro("__cpp_structured_bindings", "201606");
|
||||
Builder.defineMacro("__cpp_nontype_template_args", "201411");
|
||||
Builder.defineMacro("__cpp_fold_expressions", "201603");
|
||||
// FIXME: This is not yet listed in SD-6.
|
||||
Builder.defineMacro("__cpp_deduction_guides", "201611");
|
||||
}
|
||||
if (LangOpts.AlignedAllocation)
|
||||
Builder.defineMacro("__cpp_aligned_new", "201606");
|
||||
|
@ -166,20 +166,11 @@ NamedDecl *Parser::ParseCXXInlineMethodDef(AccessSpecifier AS,
|
||||
}
|
||||
|
||||
if (FnD) {
|
||||
// If this is a friend function, mark that it's late-parsed so that
|
||||
// it's still known to be a definition even before we attach the
|
||||
// parsed body. Sema needs to treat friend function definitions
|
||||
// differently during template instantiation, and it's possible for
|
||||
// the containing class to be instantiated before all its member
|
||||
// function definitions are parsed.
|
||||
//
|
||||
// If you remove this, you can remove the code that clears the flag
|
||||
// after parsing the member.
|
||||
if (D.getDeclSpec().isFriendSpecified()) {
|
||||
FunctionDecl *FD = FnD->getAsFunction();
|
||||
Actions.CheckForFunctionRedefinition(FD);
|
||||
FD->setLateTemplateParsed(true);
|
||||
}
|
||||
FunctionDecl *FD = FnD->getAsFunction();
|
||||
// Track that this function will eventually have a body; Sema needs
|
||||
// to know this.
|
||||
Actions.CheckForFunctionRedefinition(FD);
|
||||
FD->setWillHaveBody(true);
|
||||
} else {
|
||||
// If semantic analysis could not build a function declaration,
|
||||
// just throw away the late-parsed declaration.
|
||||
@ -558,10 +549,6 @@ void Parser::ParseLexedMethodDef(LexedMethod &LM) {
|
||||
|
||||
ParseFunctionStatementBody(LM.D, FnScope);
|
||||
|
||||
// Clear the late-template-parsed bit if we set it before.
|
||||
if (LM.D)
|
||||
LM.D->getAsFunction()->setLateTemplateParsed(false);
|
||||
|
||||
while (Tok.isNot(tok::eof))
|
||||
ConsumeAnyToken();
|
||||
|
||||
|
@ -553,6 +553,13 @@ CastsAwayConstness(Sema &Self, QualType SrcType, QualType DestType,
|
||||
Self.Context.getUnqualifiedArrayType(UnwrappedSrcType, SrcQuals);
|
||||
Self.Context.getUnqualifiedArrayType(UnwrappedDestType, DestQuals);
|
||||
|
||||
// We do not meaningfully track object const-ness of Objective-C object
|
||||
// types. Remove const from the source type if either the source or
|
||||
// the destination is an Objective-C object type.
|
||||
if (UnwrappedSrcType->isObjCObjectType() ||
|
||||
UnwrappedDestType->isObjCObjectType())
|
||||
SrcQuals.removeConst();
|
||||
|
||||
Qualifiers RetainedSrcQuals, RetainedDestQuals;
|
||||
if (CheckCVR) {
|
||||
RetainedSrcQuals.setCVRQualifiers(SrcQuals.getCVRQualifiers());
|
||||
|
@ -2401,10 +2401,7 @@ formatBlockPlaceholder(const PrintingPolicy &Policy, const NamedDecl *BlockDecl,
|
||||
static std::string GetDefaultValueString(const ParmVarDecl *Param,
|
||||
const SourceManager &SM,
|
||||
const LangOptions &LangOpts) {
|
||||
const Expr *defaultArg = Param->getDefaultArg();
|
||||
if (!defaultArg)
|
||||
return "";
|
||||
const SourceRange SrcRange = defaultArg->getSourceRange();
|
||||
const SourceRange SrcRange = Param->getDefaultArgRange();
|
||||
CharSourceRange CharSrcRange = CharSourceRange::getTokenRange(SrcRange);
|
||||
bool Invalid = CharSrcRange.isInvalid();
|
||||
if (Invalid)
|
||||
|
@ -6999,6 +6999,21 @@ void Sema::CheckShadow(NamedDecl *D, NamedDecl *ShadowedDecl,
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
if (cast<VarDecl>(ShadowedDecl)->hasLocalStorage()) {
|
||||
// A variable can't shadow a local variable in an enclosing scope, if
|
||||
// they are separated by a non-capturing declaration context.
|
||||
for (DeclContext *ParentDC = NewDC;
|
||||
ParentDC && !ParentDC->Equals(OldDC);
|
||||
ParentDC = getLambdaAwareParentOfDeclContext(ParentDC)) {
|
||||
// Only block literals, captured statements, and lambda expressions
|
||||
// can capture; other scopes don't.
|
||||
if (!isa<BlockDecl>(ParentDC) && !isa<CapturedDecl>(ParentDC) &&
|
||||
!isLambdaCallOperator(ParentDC)) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -12075,8 +12090,9 @@ Decl *Sema::ActOnStartOfFunctionDef(Scope *FnBodyScope, Decl *D,
|
||||
FD->setInvalidDecl();
|
||||
}
|
||||
|
||||
// See if this is a redefinition.
|
||||
if (!FD->isLateTemplateParsed()) {
|
||||
// See if this is a redefinition. If 'will have body' is already set, then
|
||||
// these checks were already performed when it was set.
|
||||
if (!FD->willHaveBody() && !FD->isLateTemplateParsed()) {
|
||||
CheckForFunctionRedefinition(FD, nullptr, SkipBody);
|
||||
|
||||
// If we're skipping the body, we're done. Don't enter the scope.
|
||||
@ -13278,6 +13294,7 @@ Decl *Sema::ActOnTag(Scope *S, unsigned TagSpec, TagUseKind TUK,
|
||||
AddMsStructLayoutForRecord(RD);
|
||||
}
|
||||
}
|
||||
New->setLexicalDeclContext(CurContext);
|
||||
return New;
|
||||
};
|
||||
|
||||
|
@ -3771,6 +3771,8 @@ void Sema::InstantiateFunctionDefinition(SourceLocation PointOfInstantiation,
|
||||
if (PatternDef) {
|
||||
Pattern = PatternDef->getBody(PatternDef);
|
||||
PatternDecl = PatternDef;
|
||||
if (PatternDef->willHaveBody())
|
||||
PatternDef = nullptr;
|
||||
}
|
||||
|
||||
// FIXME: We need to track the instantiation stack in order to know which
|
||||
|
@ -1,5 +1,5 @@
|
||||
// RUN: %clang_cc1 -fsyntax-only -std=c++1z -verify -Wc++1z-extensions %s
|
||||
// RUN: %clang_cc1 -fsyntax-only -std=c++11 -verify -DEXT -Wc++1z-extensions %s
|
||||
// RUN: %clang_cc1 -fsyntax-only -std=c++17 -verify -Wc++17-extensions %s
|
||||
// RUN: %clang_cc1 -fsyntax-only -std=c++11 -verify -DEXT -Wc++17-extensions %s
|
||||
|
||||
struct [[nodiscard]] S {};
|
||||
S get_s();
|
||||
@ -23,7 +23,7 @@ void f() {
|
||||
}
|
||||
|
||||
#ifdef EXT
|
||||
// expected-warning@4 {{use of the 'nodiscard' attribute is a C++1z extension}}
|
||||
// expected-warning@8 {{use of the 'nodiscard' attribute is a C++1z extension}}
|
||||
// expected-warning@11 {{use of the 'nodiscard' attribute is a C++1z extension}}
|
||||
// expected-warning@4 {{use of the 'nodiscard' attribute is a C++17 extension}}
|
||||
// expected-warning@8 {{use of the 'nodiscard' attribute is a C++17 extension}}
|
||||
// expected-warning@11 {{use of the 'nodiscard' attribute is a C++17 extension}}
|
||||
#endif
|
||||
|
@ -1,5 +1,5 @@
|
||||
// RUN: %clang_cc1 -fsyntax-only -Wunused -Wused-but-marked-unused -std=c++1z -Wc++1z-extensions -verify %s
|
||||
// RUN: %clang_cc1 -fsyntax-only -Wunused -Wused-but-marked-unused -std=c++11 -Wc++1z-extensions -verify -DEXT %s
|
||||
// RUN: %clang_cc1 -fsyntax-only -Wunused -Wused-but-marked-unused -std=c++17 -Wc++17-extensions -verify %s
|
||||
// RUN: %clang_cc1 -fsyntax-only -Wunused -Wused-but-marked-unused -std=c++11 -Wc++17-extensions -verify -DEXT %s
|
||||
|
||||
static_assert(__has_cpp_attribute(maybe_unused) == 201603, "");
|
||||
|
||||
@ -20,7 +20,7 @@ void f() {
|
||||
}
|
||||
|
||||
#ifdef EXT
|
||||
// expected-warning@6 {{use of the 'maybe_unused' attribute is a C++1z extension}}
|
||||
// expected-warning@13 {{use of the 'maybe_unused' attribute is a C++1z extension}}
|
||||
// expected-warning@14 {{use of the 'maybe_unused' attribute is a C++1z extension}}
|
||||
// expected-warning@6 {{use of the 'maybe_unused' attribute is a C++17 extension}}
|
||||
// expected-warning@13 {{use of the 'maybe_unused' attribute is a C++17 extension}}
|
||||
// expected-warning@14 {{use of the 'maybe_unused' attribute is a C++17 extension}}
|
||||
#endif
|
||||
|
@ -1,7 +1,7 @@
|
||||
// RUN: %clang_cc1 -std=c++98 %s -verify -fexceptions -fcxx-exceptions -pedantic-errors -Wno-bind-to-temporary-copy
|
||||
// RUN: %clang_cc1 -std=c++11 %s -verify -fexceptions -fcxx-exceptions -pedantic-errors -triple %itanium_abi_triple
|
||||
// RUN: %clang_cc1 -std=c++14 %s -verify -fexceptions -fcxx-exceptions -pedantic-errors -triple %itanium_abi_triple
|
||||
// RUN: %clang_cc1 -std=c++1z %s -verify -fexceptions -fcxx-exceptions -pedantic-errors -triple %itanium_abi_triple
|
||||
// RUN: %clang_cc1 -std=c++17 %s -verify -fexceptions -fcxx-exceptions -pedantic-errors -triple %itanium_abi_triple
|
||||
|
||||
namespace dr1 { // dr1: no
|
||||
namespace X { extern "C" void dr1_f(int a = 1); }
|
||||
@ -276,9 +276,9 @@ namespace dr23 { // dr23: yes
|
||||
|
||||
namespace dr25 { // dr25: yes
|
||||
struct A {
|
||||
void f() throw(int); // expected-error 0-1{{ISO C++1z does not allow}} expected-note 0-1{{use 'noexcept}}
|
||||
void f() throw(int); // expected-error 0-1{{ISO C++17 does not allow}} expected-note 0-1{{use 'noexcept}}
|
||||
};
|
||||
void (A::*f)() throw (int); // expected-error 0-1{{ISO C++1z does not allow}} expected-note 0-1{{use 'noexcept}}
|
||||
void (A::*f)() throw (int); // expected-error 0-1{{ISO C++17 does not allow}} expected-note 0-1{{use 'noexcept}}
|
||||
void (A::*g)() throw () = f;
|
||||
#if __cplusplus <= 201402L
|
||||
// expected-error@-2 {{is not superset of source}}
|
||||
@ -286,7 +286,7 @@ namespace dr25 { // dr25: yes
|
||||
// expected-error@-4 {{different exception specifications}}
|
||||
#endif
|
||||
void (A::*g2)() throw () = 0;
|
||||
void (A::*h)() throw (int, char) = f; // expected-error 0-1{{ISO C++1z does not allow}} expected-note 0-1{{use 'noexcept}}
|
||||
void (A::*h)() throw (int, char) = f; // expected-error 0-1{{ISO C++17 does not allow}} expected-note 0-1{{use 'noexcept}}
|
||||
void (A::*i)() throw () = &A::f;
|
||||
#if __cplusplus <= 201402L
|
||||
// expected-error@-2 {{is not superset of source}}
|
||||
@ -294,7 +294,7 @@ namespace dr25 { // dr25: yes
|
||||
// expected-error@-4 {{different exception specifications}}
|
||||
#endif
|
||||
void (A::*i2)() throw () = 0;
|
||||
void (A::*j)() throw (int, char) = &A::f; // expected-error 0-1{{ISO C++1z does not allow}} expected-note 0-1{{use 'noexcept}}
|
||||
void (A::*j)() throw (int, char) = &A::f; // expected-error 0-1{{ISO C++17 does not allow}} expected-note 0-1{{use 'noexcept}}
|
||||
void x() {
|
||||
g2 = f;
|
||||
#if __cplusplus <= 201402L
|
||||
@ -941,7 +941,7 @@ namespace dr84 { // dr84: yes
|
||||
};
|
||||
A a;
|
||||
// Cannot use B(C) / operator C() pair to construct the B from the B temporary
|
||||
// here. In C++1z, we initialize the B object directly using 'A::operator B()'.
|
||||
// here. In C++17, we initialize the B object directly using 'A::operator B()'.
|
||||
B b = a;
|
||||
#if __cplusplus <= 201402L
|
||||
// expected-error@-2 {{no viable}}
|
||||
@ -1033,14 +1033,14 @@ namespace dr91 { // dr91: yes
|
||||
}
|
||||
|
||||
namespace dr92 { // dr92: 4 c++17
|
||||
void f() throw(int, float); // expected-error 0-1{{ISO C++1z does not allow}} expected-note 0-1{{use 'noexcept}}
|
||||
void (*p)() throw(int) = &f; // expected-error 0-1{{ISO C++1z does not allow}} expected-note 0-1{{use 'noexcept}}
|
||||
void f() throw(int, float); // expected-error 0-1{{ISO C++17 does not allow}} expected-note 0-1{{use 'noexcept}}
|
||||
void (*p)() throw(int) = &f; // expected-error 0-1{{ISO C++17 does not allow}} expected-note 0-1{{use 'noexcept}}
|
||||
#if __cplusplus <= 201402L
|
||||
// expected-error@-2 {{target exception specification is not superset of source}}
|
||||
#else
|
||||
// expected-warning@-4 {{target exception specification is not superset of source}}
|
||||
#endif
|
||||
void (*q)() throw(int); // expected-error 0-1{{ISO C++1z does not allow}} expected-note 0-1{{use 'noexcept}}
|
||||
void (*q)() throw(int); // expected-error 0-1{{ISO C++17 does not allow}} expected-note 0-1{{use 'noexcept}}
|
||||
void (**pp)() throw() = &q;
|
||||
#if __cplusplus <= 201402L
|
||||
// expected-error@-2 {{exception specifications are not allowed}}
|
||||
@ -1064,7 +1064,7 @@ namespace dr92 { // dr92: 4 c++17
|
||||
// expected-error@-2 {{not implicitly convertible}}
|
||||
#endif
|
||||
|
||||
template<void() throw(int)> struct Y {}; // expected-error 0-1{{ISO C++1z does not allow}} expected-note 0-1{{use 'noexcept}}
|
||||
template<void() throw(int)> struct Y {}; // expected-error 0-1{{ISO C++17 does not allow}} expected-note 0-1{{use 'noexcept}}
|
||||
Y<&h> yp; // ok
|
||||
}
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
// RUN: %clang_cc1 -std=c++98 %s -verify -fexceptions -fcxx-exceptions -pedantic-errors
|
||||
// RUN: %clang_cc1 -std=c++11 %s -verify -fexceptions -fcxx-exceptions -pedantic-errors
|
||||
// RUN: %clang_cc1 -std=c++14 %s -verify -fexceptions -fcxx-exceptions -pedantic-errors
|
||||
// RUN: %clang_cc1 -std=c++1z %s -verify -fexceptions -fcxx-exceptions -pedantic-errors
|
||||
// RUN: %clang_cc1 -std=c++17 %s -verify -fexceptions -fcxx-exceptions -pedantic-errors
|
||||
|
||||
__extension__ typedef __SIZE_TYPE__ size_t;
|
||||
|
||||
@ -124,7 +124,7 @@ namespace dr1315 { // dr1315: partial
|
||||
namespace dr1330 { // dr1330: 4 c++11
|
||||
// exception-specifications are parsed in a context where the class is complete.
|
||||
struct A {
|
||||
void f() throw(T) {} // expected-error 0-1{{C++1z}} expected-note 0-1{{noexcept}}
|
||||
void f() throw(T) {} // expected-error 0-1{{C++17}} expected-note 0-1{{noexcept}}
|
||||
struct T {};
|
||||
|
||||
#if __cplusplus >= 201103L
|
||||
@ -134,7 +134,7 @@ namespace dr1330 { // dr1330: 4 c++11
|
||||
#endif
|
||||
};
|
||||
|
||||
void (A::*af1)() throw(A::T) = &A::f; // expected-error 0-1{{C++1z}} expected-note 0-1{{noexcept}}
|
||||
void (A::*af1)() throw(A::T) = &A::f; // expected-error 0-1{{C++17}} expected-note 0-1{{noexcept}}
|
||||
void (A::*af2)() throw() = &A::f; // expected-error-re {{{{not superset|different exception spec}}}}
|
||||
|
||||
#if __cplusplus >= 201103L
|
||||
@ -144,7 +144,7 @@ namespace dr1330 { // dr1330: 4 c++11
|
||||
// Likewise, they're instantiated separately from an enclosing class template.
|
||||
template<typename U>
|
||||
struct B {
|
||||
void f() throw(T, typename U::type) {} // expected-error 0-1{{C++1z}} expected-note 0-1{{noexcept}}
|
||||
void f() throw(T, typename U::type) {} // expected-error 0-1{{C++17}} expected-note 0-1{{noexcept}}
|
||||
struct T {};
|
||||
|
||||
#if __cplusplus >= 201103L
|
||||
@ -161,7 +161,7 @@ namespace dr1330 { // dr1330: 4 c++11
|
||||
static const int value = true;
|
||||
};
|
||||
|
||||
void (B<P>::*bpf1)() throw(B<P>::T, int) = &B<P>::f; // expected-error 0-1{{C++1z}} expected-note 0-1{{noexcept}}
|
||||
void (B<P>::*bpf1)() throw(B<P>::T, int) = &B<P>::f; // expected-error 0-1{{C++17}} expected-note 0-1{{noexcept}}
|
||||
#if __cplusplus < 201103L
|
||||
// expected-error@-2 {{not superset}}
|
||||
// FIXME: We only delay instantiation in C++11 onwards. In C++98, something
|
||||
@ -172,7 +172,7 @@ namespace dr1330 { // dr1330: 4 c++11
|
||||
// the "T has not yet been instantiated" error here, rather than giving
|
||||
// confusing errors later on.
|
||||
#endif
|
||||
void (B<P>::*bpf2)() throw(int) = &B<P>::f; // expected-error 0-1{{C++1z}} expected-note 0-1{{noexcept}}
|
||||
void (B<P>::*bpf2)() throw(int) = &B<P>::f; // expected-error 0-1{{C++17}} expected-note 0-1{{noexcept}}
|
||||
#if __cplusplus <= 201402L
|
||||
// expected-error@-2 {{not superset}}
|
||||
#else
|
||||
@ -194,7 +194,7 @@ namespace dr1330 { // dr1330: 4 c++11
|
||||
|
||||
template<typename T> int f() throw(typename T::error) { return 0; } // expected-error 1-4{{prior to '::'}} expected-note 0-1{{prior to '::'}} expected-note 0-1{{requested here}}
|
||||
#if __cplusplus > 201402L
|
||||
// expected-error@-2 0-1{{C++1z}} expected-note@-2 0-1{{noexcept}}
|
||||
// expected-error@-2 0-1{{C++17}} expected-note@-2 0-1{{noexcept}}
|
||||
#endif
|
||||
// An exception-specification is needed even if the function is only used in
|
||||
// an unevaluated operand.
|
||||
@ -203,7 +203,7 @@ namespace dr1330 { // dr1330: 4 c++11
|
||||
decltype(f<char>()) f2; // expected-note {{instantiation of}}
|
||||
bool f3 = noexcept(f<float>()); // expected-note {{instantiation of}}
|
||||
#endif
|
||||
// In C++1z onwards, substituting explicit template arguments into the
|
||||
// In C++17 onwards, substituting explicit template arguments into the
|
||||
// function type substitutes into the exception specification (because it's
|
||||
// part of the type). In earlier languages, we don't notice there's a problem
|
||||
// until we've already started to instantiate.
|
||||
@ -217,7 +217,7 @@ namespace dr1330 { // dr1330: 4 c++11
|
||||
template<typename T> struct C {
|
||||
C() throw(typename T::type); // expected-error 1-2{{prior to '::'}}
|
||||
#if __cplusplus > 201402L
|
||||
// expected-error@-2 0-1{{C++1z}} expected-note@-2 0-1{{noexcept}}
|
||||
// expected-error@-2 0-1{{C++17}} expected-note@-2 0-1{{noexcept}}
|
||||
#endif
|
||||
};
|
||||
struct D : C<void> {}; // ok
|
||||
|
@ -1,7 +1,7 @@
|
||||
// RUN: %clang_cc1 -std=c++98 -triple x86_64-unknown-unknown %s -verify -fexceptions -fcxx-exceptions -pedantic-errors
|
||||
// RUN: %clang_cc1 -std=c++11 -triple x86_64-unknown-unknown %s -verify -fexceptions -fcxx-exceptions -pedantic-errors
|
||||
// RUN: %clang_cc1 -std=c++14 -triple x86_64-unknown-unknown %s -verify -fexceptions -fcxx-exceptions -pedantic-errors
|
||||
// RUN: %clang_cc1 -std=c++1z -triple x86_64-unknown-unknown %s -verify -fexceptions -fcxx-exceptions -pedantic-errors
|
||||
// RUN: %clang_cc1 -std=c++17 -triple x86_64-unknown-unknown %s -verify -fexceptions -fcxx-exceptions -pedantic-errors
|
||||
|
||||
namespace dr100 { // dr100: yes
|
||||
template<const char *> struct A {}; // expected-note 0-1{{declared here}}
|
||||
@ -313,7 +313,7 @@ namespace dr126 { // dr126: no
|
||||
virtual void z() throw(long); // expected-error {{more lax}}
|
||||
};
|
||||
#else
|
||||
void f() throw(int); // expected-error {{ISO C++1z does not allow}} expected-note {{use 'noexcept}}
|
||||
void f() throw(int); // expected-error {{ISO C++17 does not allow}} expected-note {{use 'noexcept}}
|
||||
#endif
|
||||
}
|
||||
|
||||
|
@ -10,7 +10,7 @@
|
||||
#define static_assert(...) _Static_assert(__VA_ARGS__)
|
||||
#endif
|
||||
|
||||
namespace dr2094 { // dr2094: 5.0
|
||||
namespace dr2094 { // dr2094: 5
|
||||
struct A { int n; };
|
||||
struct B { volatile int n; };
|
||||
static_assert(__is_trivially_copyable(volatile int), "");
|
||||
|
@ -1,7 +1,7 @@
|
||||
// RUN: %clang_cc1 -std=c++98 %s -verify -fexceptions -fcxx-exceptions -pedantic-errors
|
||||
// RUN: %clang_cc1 -std=c++11 %s -verify -fexceptions -fcxx-exceptions -pedantic-errors
|
||||
// RUN: %clang_cc1 -std=c++14 %s -verify -fexceptions -fcxx-exceptions -pedantic-errors
|
||||
// RUN: %clang_cc1 -std=c++1z %s -verify -fexceptions -fcxx-exceptions -pedantic-errors
|
||||
// RUN: %clang_cc1 -std=c++17 %s -verify -fexceptions -fcxx-exceptions -pedantic-errors
|
||||
|
||||
// PR13819 -- __SIZE_TYPE__ is incompatible.
|
||||
typedef __SIZE_TYPE__ size_t; // expected-error 0-1 {{extension}}
|
||||
@ -984,7 +984,7 @@ namespace dr289 { // dr289: yes
|
||||
namespace dr294 { // dr294: no
|
||||
void f() throw(int);
|
||||
#if __cplusplus > 201402L
|
||||
// expected-error@-2 {{ISO C++1z does not allow}} expected-note@-2 {{use 'noexcept}}
|
||||
// expected-error@-2 {{ISO C++17 does not allow}} expected-note@-2 {{use 'noexcept}}
|
||||
#endif
|
||||
int main() {
|
||||
(void)static_cast<void (*)() throw()>(f); // FIXME: ill-formed in C++14 and before
|
||||
@ -1001,13 +1001,13 @@ namespace dr294 { // dr294: no
|
||||
#endif
|
||||
(void)static_cast<void (*)() throw(int)>(f); // FIXME: ill-formed in C++14 and before
|
||||
#if __cplusplus > 201402L
|
||||
// expected-error@-2 {{ISO C++1z does not allow}} expected-note@-2 {{use 'noexcept}}
|
||||
// expected-error@-2 {{ISO C++17 does not allow}} expected-note@-2 {{use 'noexcept}}
|
||||
#endif
|
||||
|
||||
void (*p)() throw() = f; // expected-error-re {{{{not superset|different exception specification}}}}
|
||||
void (*q)() throw(int) = f;
|
||||
#if __cplusplus > 201402L
|
||||
// expected-error@-2 {{ISO C++1z does not allow}} expected-note@-2 {{use 'noexcept}}
|
||||
// expected-error@-2 {{ISO C++17 does not allow}} expected-note@-2 {{use 'noexcept}}
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
@ -1,7 +1,7 @@
|
||||
// RUN: env ASAN_OPTIONS=detect_stack_use_after_return=0 %clang_cc1 -std=c++98 %s -verify -fexceptions -fcxx-exceptions -pedantic-errors
|
||||
// RUN: env ASAN_OPTIONS=detect_stack_use_after_return=0 %clang_cc1 -std=c++11 %s -verify -fexceptions -fcxx-exceptions -pedantic-errors
|
||||
// RUN: env ASAN_OPTIONS=detect_stack_use_after_return=0 %clang_cc1 -std=c++14 %s -verify -fexceptions -fcxx-exceptions -pedantic-errors
|
||||
// RUN: env ASAN_OPTIONS=detect_stack_use_after_return=0 %clang_cc1 -std=c++1z %s -verify -fexceptions -fcxx-exceptions -pedantic-errors
|
||||
// RUN: env ASAN_OPTIONS=detect_stack_use_after_return=0 %clang_cc1 -std=c++17 %s -verify -fexceptions -fcxx-exceptions -pedantic-errors
|
||||
|
||||
// FIXME: __SIZE_TYPE__ expands to 'long long' on some targets.
|
||||
__extension__ typedef __SIZE_TYPE__ size_t;
|
||||
@ -507,16 +507,16 @@ namespace dr437 { // dr437: sup 1308
|
||||
struct S {
|
||||
void f() throw(S);
|
||||
#if __cplusplus > 201402L
|
||||
// expected-error@-2 {{ISO C++1z does not allow}} expected-note@-2 {{use 'noexcept}}
|
||||
// expected-error@-2 {{ISO C++17 does not allow}} expected-note@-2 {{use 'noexcept}}
|
||||
#endif
|
||||
void g() throw(T<S>);
|
||||
#if __cplusplus > 201402L
|
||||
// expected-error@-2 {{ISO C++1z does not allow}} expected-note@-2 {{use 'noexcept}}
|
||||
// expected-error@-2 {{ISO C++17 does not allow}} expected-note@-2 {{use 'noexcept}}
|
||||
#endif
|
||||
struct U;
|
||||
void h() throw(U);
|
||||
#if __cplusplus > 201402L
|
||||
// expected-error@-2 {{ISO C++1z does not allow}} expected-note@-2 {{use 'noexcept}}
|
||||
// expected-error@-2 {{ISO C++17 does not allow}} expected-note@-2 {{use 'noexcept}}
|
||||
#endif
|
||||
struct U {};
|
||||
};
|
||||
@ -1202,7 +1202,7 @@ namespace dr495 { // dr495: 3.5
|
||||
long n2 = s2;
|
||||
}
|
||||
|
||||
namespace dr496 { // dr496: sup dr2094
|
||||
namespace dr496 { // dr496: sup 2094
|
||||
struct A { int n; };
|
||||
struct B { volatile int n; };
|
||||
int check1[ __is_trivially_copyable(const int) ? 1 : -1];
|
||||
|
@ -1,7 +1,7 @@
|
||||
// RUN: %clang_cc1 -std=c++98 %s -verify -fexceptions -fcxx-exceptions -pedantic-errors
|
||||
// RUN: %clang_cc1 -std=c++11 %s -verify -fexceptions -fcxx-exceptions -pedantic-errors
|
||||
// RUN: %clang_cc1 -std=c++14 %s -verify -fexceptions -fcxx-exceptions -pedantic-errors
|
||||
// RUN: %clang_cc1 -std=c++1z %s -verify -fexceptions -fcxx-exceptions -pedantic-errors
|
||||
// RUN: %clang_cc1 -std=c++17 %s -verify -fexceptions -fcxx-exceptions -pedantic-errors
|
||||
|
||||
// FIXME: This is included to avoid a diagnostic with no source location
|
||||
// pointing at the implicit operator new. We can't match such a diagnostic
|
||||
@ -966,7 +966,7 @@ namespace dr595 { // dr595: dup 1330
|
||||
template<class T> struct X {
|
||||
void f() throw(T) {}
|
||||
#if __cplusplus > 201402L
|
||||
// expected-error@-2 {{ISO C++1z does not allow}} expected-note@-2 {{use 'noexcept}}
|
||||
// expected-error@-2 {{ISO C++17 does not allow}} expected-note@-2 {{use 'noexcept}}
|
||||
#endif
|
||||
};
|
||||
struct S {
|
||||
|
@ -1,6 +1,6 @@
|
||||
// RUN: %clang_cc1 -std=c++11 -fsyntax-only -verify %s
|
||||
// RUN: %clang_cc1 -std=c++14 -fsyntax-only -verify %s
|
||||
// RUN: %clang_cc1 -std=c++1z -fsyntax-only -verify %s
|
||||
// RUN: %clang_cc1 -std=c++17 -fsyntax-only -verify %s
|
||||
|
||||
struct pr12960 {
|
||||
int begin;
|
||||
@ -125,7 +125,7 @@ void g() {
|
||||
};
|
||||
for (auto a : Differ())
|
||||
#if __cplusplus <= 201402L
|
||||
// expected-warning@-2 {{'begin' and 'end' returning different types ('int *' and 'null_t') is a C++1z extension}}
|
||||
// expected-warning@-2 {{'begin' and 'end' returning different types ('int *' and 'null_t') is a C++17 extension}}
|
||||
// expected-note@-6 {{selected 'begin' function with iterator type 'int *'}}
|
||||
// expected-note@-6 {{selected 'end' function with iterator type 'null_t'}}
|
||||
#endif
|
||||
|
13
test/CodeCompletion/uninstantiated_params.cpp
Normal file
13
test/CodeCompletion/uninstantiated_params.cpp
Normal file
@ -0,0 +1,13 @@
|
||||
template <class T>
|
||||
struct unique_ptr {
|
||||
typedef T* pointer;
|
||||
|
||||
void reset(pointer ptr = pointer());
|
||||
};
|
||||
|
||||
void test() {
|
||||
unique_ptr<int> x;
|
||||
x.
|
||||
// RUN: %clang_cc1 -fsyntax-only -code-completion-at=%s:10:5 %s -o - | FileCheck -check-prefix=CHECK-CC1 %s
|
||||
// CHECK-CC1: [#void#]reset({#<#unique_ptr<int>::pointer ptr = pointer()#>#})
|
||||
}
|
233
test/CodeGen/arm-float-helpers.c
Normal file
233
test/CodeGen/arm-float-helpers.c
Normal file
@ -0,0 +1,233 @@
|
||||
// REQUIRES: arm-registered-target
|
||||
// RUN: %clang_cc1 -emit-llvm -o - -triple arm-none-linux-gnueabi %s | FileCheck %s
|
||||
// RUN: %clang_cc1 -emit-llvm -o - -triple arm-none-linux-gnueabihf %s | FileCheck %s
|
||||
// RUN: %clang_cc1 -emit-llvm -o - -triple arm-none-linux-gnueabi -target-feature "+soft-float" -target-feature "+soft-float-abi" %s | FileCheck %s
|
||||
// RUN: %clang_cc1 -emit-llvm -o - -triple arm-none-linux-gnueabi -target-feature "+soft-float" %s | FileCheck %s
|
||||
// RUN: %clang_cc1 -emit-llvm -o - -triple arm-none-eabi %s | FileCheck %s
|
||||
// RUN: %clang_cc1 -emit-llvm -o - -triple arm-none-eabi -meabi gnu %s | FileCheck %s
|
||||
// RUN: %clang_cc1 -emit-llvm -o - -triple arm-none-eabi %s | FileCheck %s
|
||||
// RUN: %clang_cc1 -emit-llvm -o - -triple arm-none-eabi -target-feature "+soft-float" -target-feature "+soft-float-abi" -meabi gnu %s | FileCheck %s
|
||||
// RUN: %clang_cc1 -emit-llvm -o - -triple arm-none-eabi -target-feature "+soft-float" -meabi gnu %s | FileCheck %s
|
||||
// RUN: %clang_cc1 -emit-llvm -o - -triple arm-none-eabihf %s | FileCheck %s
|
||||
// RUN: %clang_cc1 -emit-llvm -o - -triple arm-none-eabihf -meabi gnu %s | FileCheck %s
|
||||
|
||||
// The Runtime ABI for the ARM Architecture IHI0043 section 4.1.2 The
|
||||
// floating-point helper functions to always use the base AAPCS (soft-float)
|
||||
// calling convention.
|
||||
//
|
||||
// These helper functions such as __aeabi_fadd are not explicitly called by
|
||||
// clang, instead they are generated by the ARMISelLowering when they are
|
||||
// needed; clang relies on llvm to use the base AAPCS.
|
||||
//
|
||||
// In this test we check that clang is not directly calling the __aeabi_
|
||||
// functions. We rely on llvm to test that the base AAPCS is used for any
|
||||
// __aeabi_ function from 4.1.2 that is used.
|
||||
//
|
||||
// When compiled to an object file with -mfloat-abi=soft each function F
|
||||
// below should result in a call to __aeabi_F. If clang is changed to call any
|
||||
// of these functions directly the test will need to be altered to check that
|
||||
// arm_aapcscc is used.
|
||||
//
|
||||
// Note that it is only the functions in 4.1.2 that must use the base AAPCS,
|
||||
// other runtime functions such as the _Complex helper routines are not covered.
|
||||
|
||||
float fadd(float a, float b) { return a + b; }
|
||||
// CHECK-LABEL: define float @fadd(float %a, float %b)
|
||||
// CHECK-NOT: __aeabi_fadd
|
||||
// CHECK: %add = fadd float {{.*}}, {{.*}}
|
||||
|
||||
float fdiv(float a, float b) { return a / b; }
|
||||
// CHECK-LABEL: define float @fdiv(float %a, float %b)
|
||||
// CHECK-NOT: __aeabi_fdiv
|
||||
// CHECK: %div = fdiv float {{.*}}, {{.*}}
|
||||
|
||||
float fmul(float a, float b) { return a * b; }
|
||||
// CHECK-LABEL: define float @fmul(float %a, float %b)
|
||||
// CHECK-NOT: __aeabi_fmul
|
||||
// CHECK: %mul = fmul float {{.*}}, {{.*}}
|
||||
|
||||
float fsub(float a, float b) { return a - b; }
|
||||
// CHECK-LABEL: define float @fsub(float %a, float %b)
|
||||
// CHECK-NOT: __aeabi_fsub
|
||||
// CHECK: %sub = fsub float {{.*}}, {{.*}}
|
||||
|
||||
int fcmpeq(float a, float b) { return a == b; }
|
||||
// CHECK-LABEL: define i32 @fcmpeq(float %a, float %b)
|
||||
// CHECK-NOT: __aeabi_fcmpeq
|
||||
// CHECK: %cmp = fcmp oeq float {{.*}}, {{.*}}
|
||||
|
||||
int fcmplt(float a, float b) { return a < b; }
|
||||
// CHECK-LABEL: define i32 @fcmplt(float %a, float %b)
|
||||
// CHECK-NOT: __aeabi_fcmplt
|
||||
// CHECK: %cmp = fcmp olt float {{.*}}, {{.*}}
|
||||
|
||||
int fcmple(float a, float b) { return a <= b; }
|
||||
// CHECK-LABEL: define i32 @fcmple(float %a, float %b)
|
||||
// CHECK-NOT: __aeabi_fcmple
|
||||
// CHECK: %cmp = fcmp ole float {{.*}}, {{.*}}
|
||||
|
||||
int fcmpge(float a, float b) { return a >= b; }
|
||||
// CHECK-LABEL: define i32 @fcmpge(float %a, float %b)
|
||||
// CHECK-NOT: __aeabi_fcmpge
|
||||
// CHECK: %cmp = fcmp oge float {{.*}}, {{.*}}
|
||||
|
||||
int fcmpgt(float a, float b) { return a > b; }
|
||||
// CHECK-LABEL: define i32 @fcmpgt(float %a, float %b)
|
||||
// CHECK-NOT: __aeabi_fcmpgt
|
||||
// CHECK: %cmp = fcmp ogt float {{.*}}, {{.*}}
|
||||
|
||||
int fcmpun(float a, float b) { return __builtin_isunordered(a, b); }
|
||||
// CHECK-LABEL: define i32 @fcmpun(float %a, float %b)
|
||||
// CHECK-NOT: __aeabi_fcmpun
|
||||
// CHECK: %cmp = fcmp uno double %conv, %conv1
|
||||
|
||||
double dadd(double a, double b) { return a + b; }
|
||||
// CHECK-LABEL: define double @dadd(double %a, double %b)
|
||||
// CHECK-NOT: __aeabi_dadd
|
||||
// CHECK: %add = fadd double {{.*}}, {{.*}}
|
||||
|
||||
double ddiv(double a, double b) { return a / b; }
|
||||
// CHECK-LABEL: define double @ddiv(double %a, double %b)
|
||||
// CHECK-NOT: __aeabi_ddiv
|
||||
// CHECK: %div = fdiv double {{.*}}, {{.*}}
|
||||
|
||||
double dmul(double a, double b) { return a * b; }
|
||||
// CHECK-LABEL: define double @dmul(double %a, double %b)
|
||||
// CHECK-NOT: __aeabi_dmul
|
||||
// CHECK: %mul = fmul double {{.*}}, {{.*}}
|
||||
|
||||
double dsub(double a, double b) { return a - b; }
|
||||
// CHECK-LABEL: define double @dsub(double %a, double %b)
|
||||
// CHECK-NOT: __aeabi_dsub
|
||||
// CHECK: %sub = fsub double {{.*}}, {{.*}}
|
||||
|
||||
int dcmpeq(double a, double b) { return a == b; }
|
||||
// CHECK-LABEL: define i32 @dcmpeq(double %a, double %b)
|
||||
// CHECK-NOT: __aeabi_dcmpeq
|
||||
// CHECK: %cmp = fcmp oeq double {{.*}}, {{.*}}
|
||||
|
||||
int dcmplt(double a, double b) { return a < b; }
|
||||
// CHECK-LABEL: define i32 @dcmplt(double %a, double %b)
|
||||
// CHECK-NOT: __aeabi_dcmplt
|
||||
// CHECK: %cmp = fcmp olt double {{.*}}, {{.*}}
|
||||
|
||||
int dcmple(double a, double b) { return a <= b; }
|
||||
// CHECK-LABEL: define i32 @dcmple(double %a, double %b)
|
||||
// CHECK-NOT: __aeabi_dcmple
|
||||
// CHECK: %cmp = fcmp ole double {{.*}}, {{.*}}
|
||||
|
||||
int dcmpge(double a, double b) { return a >= b; }
|
||||
// CHECK-LABEL: define i32 @dcmpge(double %a, double %b)
|
||||
// CHECK-NOT: __aeabi_dcmpge
|
||||
// CHECK: %cmp = fcmp oge double {{.*}}, {{.*}}
|
||||
|
||||
int dcmpgt(double a, double b) { return a > b; }
|
||||
// CHECK-LABEL: define i32 @dcmpgt(double %a, double %b)
|
||||
// CHECK-NOT: __aeabi_dcmpgt
|
||||
// CHECK: %cmp = fcmp ogt double {{.*}}, {{.*}}
|
||||
|
||||
int dcmpun(double a, double b) { return __builtin_isunordered(a, b); }
|
||||
// CHECK-LABEL: define i32 @dcmpun(double %a, double %b)
|
||||
// CHECK-NOT: __aeabi_dcmpun
|
||||
// CHECK: %cmp = fcmp uno double {{.*}}, {{.*}}
|
||||
|
||||
int d2iz(double a) { return (int)a; }
|
||||
// CHECK-LABEL: define i32 @d2iz(double %a)
|
||||
// CHECK-NOT: __aeabi_d2iz
|
||||
// CHECK: %conv = fptosi double {{.*}} to i32
|
||||
|
||||
unsigned int d2uiz(double a) { return (unsigned int)a; }
|
||||
// CHECK-LABEL: define i32 @d2uiz(double %a)
|
||||
// CHECK-NOT: __aeabi_d2uiz
|
||||
// CHECK: %conv = fptoui double {{.*}} to i32
|
||||
|
||||
long long d2lz(double a) { return (long long)a; }
|
||||
// CHECK-LABEL: define i64 @d2lz(double %a)
|
||||
// CHECK-NOT: __aeabi_d2lz
|
||||
// CHECK: %conv = fptosi double {{.*}} to i64
|
||||
|
||||
unsigned long long d2ulz(double a) { return (unsigned long long)a; }
|
||||
// CHECK-LABEL: define i64 @d2ulz(double %a)
|
||||
// CHECK-NOT: __aeabi_d2ulz
|
||||
// CHECK: %conv = fptoui double {{.*}} to i64
|
||||
|
||||
int f2iz(float a) { return (int)a; }
|
||||
// CHECK-LABEL: define i32 @f2iz(float %a)
|
||||
// CHECK-NOT: __aeabi_f2iz
|
||||
// CHECK: %conv = fptosi float {{.*}} to i32
|
||||
|
||||
unsigned int f2uiz(float a) { return (unsigned int)a; }
|
||||
// CHECK-LABEL: define i32 @f2uiz(float %a)
|
||||
// CHECK-NOT: __aeabi_f2uiz
|
||||
// CHECK: %conv = fptoui float {{.*}} to i32
|
||||
|
||||
long long f2lz(float a) { return (long long)a; }
|
||||
// CHECK-LABEL: define i64 @f2lz(float %a)
|
||||
// CHECK-NOT: __aeabi_f2lz
|
||||
// CHECK: %conv = fptosi float {{.*}} to i64
|
||||
|
||||
unsigned long long f2ulz(float a) { return (unsigned long long)a; }
|
||||
// CHECK-LABEL: define i64 @f2ulz(float %a)
|
||||
// CHECK-NOT: __aeabi_f2ulz
|
||||
// CHECK: %conv = fptoui float {{.*}} to i64
|
||||
|
||||
float d2f(double a) { return (float)a; }
|
||||
// CHECK-LABEL: define float @d2f(double %a)
|
||||
// CHECK-NOT: __aeabi_d2f
|
||||
// CHECK: %conv = fptrunc double {{.*}} to float
|
||||
|
||||
double f2d(float a) { return (double)a; }
|
||||
// CHECK-LABEL: define double @f2d(float %a)
|
||||
// CHECK-NOT: __aeabi_f2d
|
||||
// CHECK: %conv = fpext float {{.*}} to double
|
||||
|
||||
double i2d(int a) { return (double)a; }
|
||||
// CHECK-LABEL: define double @i2d(i32 %a)
|
||||
// CHECK-NOT: __aeabi_i2d
|
||||
// CHECK: %conv = sitofp i32 {{.*}} to double
|
||||
|
||||
double ui2d(unsigned int a) { return (double)a; }
|
||||
// CHECK-LABEL: define double @ui2d(i32 %a)
|
||||
// CHECK-NOT: __aeabi_ui2d
|
||||
// CHECK: %conv = uitofp i32 {{.*}} to double
|
||||
|
||||
double l2d(long long a) { return (double)a; }
|
||||
// CHECK-LABEL: define double @l2d(i64 %a)
|
||||
// CHECK-NOT: __aeabi_l2d
|
||||
// CHECK: %conv = sitofp i64 {{.*}} to double
|
||||
|
||||
double ul2d(unsigned long long a) { return (unsigned long long)a; }
|
||||
// CHECK-LABEL: define double @ul2d(i64 %a)
|
||||
// CHECK-NOT: __aeabi_ul2d
|
||||
// CHECK: %conv = uitofp i64 {{.*}} to double
|
||||
|
||||
float i2f(int a) { return (int)a; }
|
||||
// CHECK-LABEL: define float @i2f(i32 %a)
|
||||
// CHECK-NOT: __aeabi_i2f
|
||||
// CHECK: %conv = sitofp i32 {{.*}} to float
|
||||
|
||||
float ui2f(unsigned int a) { return (unsigned int)a; }
|
||||
// CHECK-LABEL: define float @ui2f(i32 %a)
|
||||
// CHECK-NOT: __aeabi_ui2f
|
||||
// CHECK: %conv = uitofp i32 {{.*}} to float
|
||||
|
||||
float l2f(long long a) { return (long long)a; }
|
||||
// CHECK-LABEL: define float @l2f(i64 %a)
|
||||
// CHECK-NOT: __aeabi_l2f
|
||||
// CHECK: %conv = sitofp i64 {{.*}} to float
|
||||
|
||||
float ul2f(unsigned long long a) { return (unsigned long long)a; }
|
||||
// CHECK-LABEL: define float @ul2f(i64 %a)
|
||||
// CHECK-NOT: __aeabi_ul2f
|
||||
// CHECK: %conv = uitofp i64 {{.*}} to float
|
||||
|
||||
// Functions in section 4.1.2 not used by llvm and don't easily map directly to
|
||||
// C source code.
|
||||
// cfcmpeq
|
||||
// cfcmple
|
||||
// cfrcmple
|
||||
// cdcmpeq
|
||||
// cdcmple
|
||||
// cdrcmple
|
||||
// frsub
|
||||
// drsub
|
@ -2,7 +2,8 @@
|
||||
// RUN: %clang_cc1 %s -O1 -emit-llvm -triple x86_64-pc-win64 -o - | FileCheck %s --check-prefix=X86
|
||||
// RUN: %clang_cc1 %s -O1 -emit-llvm -triple i686-unknown-unknown -o - | FileCheck %s --check-prefix=X86
|
||||
// RUN: %clang_cc1 %s -O1 -emit-llvm -triple powerpc-unknown-unknown -o - | FileCheck %s --check-prefix=PPC
|
||||
// RUN: %clang_cc1 %s -O1 -emit-llvm -triple armv7-none-linux-gnueabihf -o - | FileCheck %s --check-prefix=ARM
|
||||
// RUN %clang_cc1 %s -O1 -emit-llvm -triple armv7-none-linux-gnueabi -o - | FileCheck %s --check-prefix=ARM
|
||||
// RUN: %clang_cc1 %s -O1 -emit-llvm -triple armv7-none-linux-gnueabihf -o - | FileCheck %s --check-prefix=ARMHF
|
||||
// RUN: %clang_cc1 %s -O1 -emit-llvm -triple thumbv7k-apple-watchos2.0 -o - -target-abi aapcs16 | FileCheck %s --check-prefix=ARM7K
|
||||
|
||||
float _Complex add_float_rr(float a, float b) {
|
||||
@ -476,8 +477,15 @@ _Bool ne_float_cc(float _Complex a, float _Complex b) {
|
||||
|
||||
// Check that the libcall will obtain proper calling convention on ARM
|
||||
_Complex double foo(_Complex double a, _Complex double b) {
|
||||
// These functions are not defined as floating point helper functions in
|
||||
// Run-time ABI for the ARM architecture document so they must not always
|
||||
// use the base AAPCS.
|
||||
|
||||
// ARM-LABEL: @foo(
|
||||
// ARM: call arm_aapcscc { double, double } @__muldc3
|
||||
// ARM: call void { double, double } @__muldc3
|
||||
|
||||
// ARMHF-LABEL: @foo(
|
||||
// ARMHF: call { double, double } @__muldc3
|
||||
|
||||
// ARM7K-LABEL: @foo(
|
||||
// ARM7K: call { double, double } @__muldc3
|
||||
|
@ -1,38 +0,0 @@
|
||||
// RUN: %clang_cc1 -triple mipsel-unknown-linux-gnu -S -emit-llvm -o - %s | FileCheck -check-prefix=O32 %s
|
||||
// RUN: %clang_cc1 -triple mips64el-unknown-linux-gnu -S -emit-llvm -o - %s -target-abi n32 | FileCheck -check-prefix=N32-N64 %s
|
||||
// RUN: %clang_cc1 -triple mips64el-unknown-linux-gnu -S -emit-llvm -o - %s -target-abi n64 | FileCheck -check-prefix=N32-N64 %s
|
||||
|
||||
struct t1 {
|
||||
char t1[10];
|
||||
};
|
||||
|
||||
struct t2 {
|
||||
char t2[20];
|
||||
};
|
||||
|
||||
struct t3 {
|
||||
char t3[65];
|
||||
};
|
||||
|
||||
extern struct t1 g1;
|
||||
extern struct t2 g2;
|
||||
extern struct t3 g3;
|
||||
extern void f1(struct t1);
|
||||
extern void f2(struct t2);
|
||||
extern void f3(struct t3);
|
||||
|
||||
void f() {
|
||||
|
||||
// O32: call void @f1(i32 inreg %{{[0-9]+}}, i32 inreg %{{[0-9]+}}, i16 inreg %{{[0-9]+}})
|
||||
// O32: call void @f2(%struct.t2* byval align 4 %{{.*}})
|
||||
// O32: call void @f3(%struct.t3* byval align 4 %{{.*}})
|
||||
|
||||
// N32-N64: call void @f1(i64 inreg %{{[0-9]+}}, i16 inreg %{{[0-9]+}})
|
||||
// N32-N64: call void @f2(i64 inreg %{{[0-9]+}}, i64 inreg %{{[0-9]+}}, i32 inreg %{{[0-9]+}})
|
||||
// N32-N64: call void @f3(%struct.t3* byval align 8 %{{.*}})
|
||||
|
||||
f1(g1);
|
||||
f2(g2);
|
||||
f3(g3);
|
||||
}
|
||||
|
87
test/CodeGen/mips-madd4.c
Normal file
87
test/CodeGen/mips-madd4.c
Normal file
@ -0,0 +1,87 @@
|
||||
// REQUIRES: mips-registered-target
|
||||
// RUN: %clang --target=mips64-unknown-linux -S -mmadd4 %s -o -| FileCheck %s -check-prefix=MADD4
|
||||
// RUN: %clang --target=mips64-unknown-linux -S -mno-madd4 %s -o -| FileCheck %s -check-prefix=NOMADD4
|
||||
// RUN: %clang --target=mips64-unknown-linux -S -mmadd4 -fno-honor-nans %s -o -| FileCheck %s -check-prefix=MADD4-NONAN
|
||||
// RUN: %clang --target=mips64-unknown-linux -S -mno-madd4 -fno-honor-nans %s -o -| FileCheck %s -check-prefix=NOMADD4-NONAN
|
||||
|
||||
float madd_s (float f, float g, float h)
|
||||
{
|
||||
return (f * g) + h;
|
||||
}
|
||||
// MADD4: madd.s
|
||||
// NOMADD4: mul.s
|
||||
// NOMADD4: add.s
|
||||
|
||||
float msub_s (float f, float g, float h)
|
||||
{
|
||||
return (f * g) - h;
|
||||
}
|
||||
// MADD4: msub.s
|
||||
// NOMADD4: mul.s
|
||||
// NOMADD4: sub.s
|
||||
|
||||
double madd_d (double f, double g, double h)
|
||||
{
|
||||
return (f * g) + h;
|
||||
}
|
||||
// MADD4: madd.d
|
||||
// NOMADD4: mul.d
|
||||
// NOMADD4: add.d
|
||||
|
||||
double msub_d (double f, double g, double h)
|
||||
{
|
||||
return (f * g) - h;
|
||||
}
|
||||
// MADD4: msub.d
|
||||
// NOMADD4: mul.d
|
||||
// NOMADD4: sub.d
|
||||
|
||||
|
||||
float nmadd_s (float f, float g, float h)
|
||||
{
|
||||
// FIXME: Zero has been explicitly placed to force generation of a positive
|
||||
// zero in IR until pattern used to match this instruction is changed to
|
||||
// comply with negative zero as well.
|
||||
return 0-((f * g) + h);
|
||||
}
|
||||
// MADD4-NONAN: nmadd.s
|
||||
// NOMADD4-NONAN: mul.s
|
||||
// NOMADD4-NONAN: add.s
|
||||
// NOMADD4-NONAN: sub.s
|
||||
|
||||
float nmsub_s (float f, float g, float h)
|
||||
{
|
||||
// FIXME: Zero has been explicitly placed to force generation of a positive
|
||||
// zero in IR until pattern used to match this instruction is changed to
|
||||
// comply with negative zero as well.
|
||||
return 0-((f * g) - h);
|
||||
}
|
||||
// MADD4-NONAN: nmsub.s
|
||||
// NOMADD4-NONAN: mul.s
|
||||
// NOMADD4-NONAN: sub.s
|
||||
// NOMADD4-NONAN: sub.s
|
||||
|
||||
double nmadd_d (double f, double g, double h)
|
||||
{
|
||||
// FIXME: Zero has been explicitly placed to force generation of a positive
|
||||
// zero in IR until pattern used to match this instruction is changed to
|
||||
// comply with negative zero as well.
|
||||
return 0-((f * g) + h);
|
||||
}
|
||||
// MADD4-NONAN: nmadd.d
|
||||
// NOMADD4-NONAN: mul.d
|
||||
// NOMADD4-NONAN: add.d
|
||||
// NOMADD4-NONAN: sub.d
|
||||
|
||||
double nmsub_d (double f, double g, double h)
|
||||
{
|
||||
// FIXME: Zero has been explicitly placed to force generation of a positive
|
||||
// zero in IR until pattern used to match this instruction is changed to
|
||||
// comply with negative zero as well.
|
||||
return 0-((f * g) - h);
|
||||
}
|
||||
// MADD4-NONAN: nmsub.d
|
||||
// NOMADD4-NONAN: mul.d
|
||||
// NOMADD4-NONAN: sub.d
|
||||
// NOMADD4-NONAN: sub.d
|
||||
|
13
test/CodeGenCXX/pr34163.cpp
Normal file
13
test/CodeGenCXX/pr34163.cpp
Normal file
@ -0,0 +1,13 @@
|
||||
// RUN: %clang_cc1 -emit-llvm -debug-info-kind=standalone -triple x86_64-linux-gnu -o - -x c++ %s | FileCheck %s
|
||||
|
||||
void f(struct X *) {}
|
||||
|
||||
// CHECK: @_ZTV1X =
|
||||
struct X {
|
||||
void a() { delete this; }
|
||||
virtual ~X() {}
|
||||
virtual void key_function();
|
||||
};
|
||||
|
||||
// CHECK: define {{.*}} @_ZN1X12key_functionEv(
|
||||
void X::key_function() {}
|
@ -69,6 +69,14 @@
|
||||
// ARMV7_HARDFLOAT-NOT: "-msoft-float"
|
||||
// ARMV7_HARDFLOAT: "-x" "c"
|
||||
|
||||
// RUN: %clang -target arm64-apple-ios10 -### -S %s -arch arm64 2>&1 | \
|
||||
// RUN: FileCheck -check-prefix=ARM64-APPLE %s
|
||||
// ARM64-APPLE: -munwind-table
|
||||
|
||||
// RUN: %clang -target armv7k-apple-watchos4.0 -### -S %s -arch armv7k 2>&1 | \
|
||||
// RUN: FileCheck -check-prefix=ARMV7K-APPLE %s
|
||||
// ARMV7K-APPLE: -munwind-table
|
||||
|
||||
// RUN: %clang -target arm-linux -### -S %s -march=armv5e 2>&1 | \
|
||||
// RUN: FileCheck -check-prefix=ARMV5E %s
|
||||
// ARMV5E: clang
|
||||
|
@ -26,6 +26,8 @@
|
||||
|
||||
// RUN: %clang -target armv7-apple-ios11.1 -c -### %s 2>&1 | \
|
||||
// RUN: FileCheck --check-prefix=CHECK-VERSION-IOS7 %s
|
||||
// RUN: %clang -target armv7-apple-ios9 -Wno-missing-sysroot -isysroot SDKs/iPhoneOS11.0.sdk -c -### %s 2>&1 | \
|
||||
// RUN: FileCheck --check-prefix=CHECK-VERSION-IOS7 %s
|
||||
// CHECK-VERSION-IOS7: thumbv7-apple-ios10.99.99
|
||||
|
||||
// RUN: env IPHONEOS_DEPLOYMENT_TARGET=11.0 \
|
||||
@ -45,6 +47,10 @@
|
||||
// RUN: FileCheck --check-prefix=CHECK-VERSION-IOS11 %s
|
||||
// CHECK-VERSION-IOS11: arm64-apple-ios11.1.0
|
||||
|
||||
// RUN: %clang -target armv7-apple-ios9.0 -miphoneos-version-min=11.0 -c -Wno-invalid-ios-deployment-target -### %s 2>&1 | \
|
||||
// RUN: FileCheck --check-prefix=CHECK-VERSION-IOS12 %s
|
||||
// CHECK-VERSION-IOS12: thumbv7-apple-ios11.0.0
|
||||
|
||||
// RUN: %clang -target i686-apple-darwin8 -c %s -### 2>&1 | \
|
||||
// RUN: FileCheck --check-prefix=CHECK-VERSION-OSX4 %s
|
||||
// RUN: %clang -target i686-apple-darwin9 -mmacosx-version-min=10.4 -c %s -### 2>&1 | \
|
||||
|
@ -13,8 +13,8 @@
|
||||
// CHECK-NEXT: note: use 'gnu++11' for 'ISO C++ 2011 with amendments and GNU extensions' standard
|
||||
// CHECK-NEXT: note: use 'c++14' for 'ISO C++ 2014 with amendments' standard
|
||||
// CHECK-NEXT: note: use 'gnu++14' for 'ISO C++ 2014 with amendments and GNU extensions' standard
|
||||
// CHECK-NEXT: note: use 'c++1z' for 'Working draft for ISO C++ 2017' standard
|
||||
// CHECK-NEXT: note: use 'gnu++1z' for 'Working draft for ISO C++ 2017 with GNU extensions' standard
|
||||
// CHECK-NEXT: note: use 'c++17' for 'ISO C++ 2017 with amendments' standard
|
||||
// CHECK-NEXT: note: use 'gnu++17' for 'ISO C++ 2017 with amendments and GNU extensions' standard
|
||||
// CHECK-NEXT: note: use 'c++2a' for 'Working draft for ISO C++ 2020' standard
|
||||
// CHECK-NEXT: note: use 'gnu++2a' for 'Working draft for ISO C++ 2020 with GNU extensions' standard
|
||||
// CUDA-NEXT: note: use 'cuda' for 'NVIDIA CUDA(tm)' standard
|
||||
|
@ -216,7 +216,7 @@ template<class T> typedef Mystery<T>::type getMysteriousThing() { // \
|
||||
}
|
||||
|
||||
template<template<typename> Foo, // expected-error {{template template parameter requires 'class' after the parameter list}}
|
||||
template<typename> typename Bar, // expected-warning {{template template parameter using 'typename' is a C++1z extension}}
|
||||
template<typename> typename Bar, // expected-warning {{template template parameter using 'typename' is a C++17 extension}}
|
||||
template<typename> struct Baz> // expected-error {{template template parameter requires 'class' after the parameter list}}
|
||||
void func();
|
||||
|
||||
|
@ -4,7 +4,7 @@
|
||||
// RUN: %clang_cc1 -std=c++14 -fcxx-exceptions -fsized-deallocation -verify %s
|
||||
// RUN: %clang_cc1 -std=c++1z -fcxx-exceptions -fsized-deallocation -verify %s
|
||||
// RUN: %clang_cc1 -std=c++1z -fcxx-exceptions -fsized-deallocation -fconcepts-ts -DCONCEPTS_TS=1 -verify %s
|
||||
// RUN: %clang_cc1 -fno-rtti -verify %s -DNO_EXCEPTIONS -DNO_RTTI
|
||||
// RUN: %clang_cc1 -fno-rtti -fno-threadsafe-statics -verify %s -DNO_EXCEPTIONS -DNO_RTTI -DNO_THREADSAFE_STATICS
|
||||
// RUN: %clang_cc1 -fcoroutines-ts -DNO_EXCEPTIONS -DCOROUTINES -verify %s
|
||||
|
||||
// expected-no-diagnostics
|
||||
@ -22,19 +22,15 @@
|
||||
|
||||
// --- C++17 features ---
|
||||
|
||||
#if check(variadic_using, 0, 0, 0, 201611) // FIXME: provisional name
|
||||
#error "wrong value for __cpp_variadic_using"
|
||||
#endif
|
||||
|
||||
#if check(hex_float, 0, 0, 0, 201603)
|
||||
#error "wrong value for __cpp_hex_float"
|
||||
#endif
|
||||
|
||||
#if check(inline_variables, 0, 0, 0, 201606) // FIXME: provisional name
|
||||
#if check(inline_variables, 0, 0, 0, 201606)
|
||||
#error "wrong value for __cpp_inline_variables"
|
||||
#endif
|
||||
|
||||
#if check(aligned_new, 0, 0, 0, 201606) // FIXME: provisional name
|
||||
#if check(aligned_new, 0, 0, 0, 201606)
|
||||
#error "wrong value for __cpp_aligned_new"
|
||||
#endif
|
||||
|
||||
@ -52,7 +48,7 @@
|
||||
|
||||
// constexpr checked below
|
||||
|
||||
#if check(if_constexpr, 0, 0, 0, 201606) // FIXME: provisional name
|
||||
#if check(if_constexpr, 0, 0, 0, 201606)
|
||||
#error "wrong value for __cpp_if_constexpr"
|
||||
#endif
|
||||
|
||||
@ -60,7 +56,11 @@
|
||||
|
||||
// static_assert checked below
|
||||
|
||||
#if check(template_auto, 0, 0, 0, 201606) // FIXME: provisional name
|
||||
#if check(deduction_guides, 0, 0, 0, 201611)
|
||||
#error "wrong value for __cpp_deduction_guides"
|
||||
#endif
|
||||
|
||||
#if check(template_auto, 0, 0, 0, 201606)
|
||||
#error "wrong value for __cpp_template_auto"
|
||||
#endif
|
||||
|
||||
@ -80,6 +80,10 @@
|
||||
|
||||
// inheriting_constructors checked below
|
||||
|
||||
#if check(variadic_using, 0, 0, 0, 201611)
|
||||
#error "wrong value for __cpp_variadic_using"
|
||||
#endif
|
||||
|
||||
#if check(aggregate_bases, 0, 0, 0, 201603)
|
||||
#error "wrong value for __cpp_aggregate_bases"
|
||||
#endif
|
||||
@ -96,10 +100,6 @@
|
||||
#error "wrong value for __cpp_template_template_args"
|
||||
#endif
|
||||
|
||||
#if check(deduction_guides, 0, 0, 0, 201611) // FIXME: provisional name
|
||||
#error "wrong value for __cpp_deduction_guides"
|
||||
#endif
|
||||
|
||||
// --- C++14 features ---
|
||||
|
||||
#if check(binary_literals, 0, 0, 201304, 201304)
|
||||
@ -163,6 +163,10 @@
|
||||
#error "wrong value for __cpp_user_defined_literals"
|
||||
#endif
|
||||
|
||||
#if defined(NO_THREADSAFE_STATICS) ? check(threadsafe_static_init, 0, 0, 0, 0) : check(threadsafe_static_init, 200806, 200806, 200806, 200806)
|
||||
#error "wrong value for __cpp_threadsafe_static_init"
|
||||
#endif
|
||||
|
||||
#if check(lambdas, 0, 200907, 200907, 200907)
|
||||
#error "wrong value for __cpp_lambdas"
|
||||
#endif
|
||||
|
@ -1,7 +1,7 @@
|
||||
// RUN: %clang_cc1 -std=c++98 -fsyntax-only -verify -pedantic %s
|
||||
// RUN: %clang_cc1 -std=c++11 -fsyntax-only -verify -pedantic %s
|
||||
// RUN: %clang_cc1 -std=c++14 -fsyntax-only -verify -pedantic %s
|
||||
// RUN: %clang_cc1 -std=c++1z -fsyntax-only -verify -pedantic %s
|
||||
// RUN: %clang_cc1 -std=c++17 -fsyntax-only -verify -pedantic %s
|
||||
double e = 0x.p0; // expected-error-re {{hexadecimal floating {{constant|literal}} requires a significand}}
|
||||
|
||||
float f = 0x1p+1;
|
||||
@ -9,10 +9,10 @@ double d = 0x.2p2;
|
||||
float g = 0x1.2p2;
|
||||
double h = 0x1.p2;
|
||||
#if __cplusplus <= 201402L
|
||||
// expected-warning@-5 {{hexadecimal floating literals are a C++1z feature}}
|
||||
// expected-warning@-5 {{hexadecimal floating literals are a C++1z feature}}
|
||||
// expected-warning@-5 {{hexadecimal floating literals are a C++1z feature}}
|
||||
// expected-warning@-5 {{hexadecimal floating literals are a C++1z feature}}
|
||||
// expected-warning@-5 {{hexadecimal floating literals are a C++17 feature}}
|
||||
// expected-warning@-5 {{hexadecimal floating literals are a C++17 feature}}
|
||||
// expected-warning@-5 {{hexadecimal floating literals are a C++17 feature}}
|
||||
// expected-warning@-5 {{hexadecimal floating literals are a C++17 feature}}
|
||||
#endif
|
||||
|
||||
// PR12717: In order to minimally diverge from the C++ standard, we do not lex
|
||||
|
6
test/Modules/Inputs/innerstructredef.h
Normal file
6
test/Modules/Inputs/innerstructredef.h
Normal file
@ -0,0 +1,6 @@
|
||||
struct Outer {
|
||||
// This definition is actually hidden since only submodule 'one' is imported.
|
||||
struct Inner {
|
||||
int x;
|
||||
} field;
|
||||
};
|
@ -451,3 +451,12 @@ module DebugNestedB {
|
||||
module objcAtKeywordMissingEnd {
|
||||
header "objcAtKeywordMissingEnd.h"
|
||||
}
|
||||
|
||||
module innerstructredef {
|
||||
module one {
|
||||
header "empty.h"
|
||||
}
|
||||
module two {
|
||||
header "innerstructredef.h"
|
||||
}
|
||||
}
|
||||
|
12
test/Modules/inner-struct-redefines-invisible.m
Normal file
12
test/Modules/inner-struct-redefines-invisible.m
Normal file
@ -0,0 +1,12 @@
|
||||
// RUN: rm -rf %t
|
||||
// RUN: %clang_cc1 -fsyntax-only -I%S/Inputs -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -verify %s
|
||||
// expected-no-diagnostics
|
||||
|
||||
@import innerstructredef.one;
|
||||
|
||||
struct Outer {
|
||||
// Should set lexical context when parsing 'Inner' here, otherwise there's a crash:
|
||||
struct Inner {
|
||||
int x;
|
||||
} field;
|
||||
};
|
@ -1,4 +1,4 @@
|
||||
// RUN: %clang_cc1 -fcxx-exceptions -fexceptions -fsyntax-only -verify -std=c++11 -Wc++14-compat -Wc++14-extensions -Wc++1z-extensions %s
|
||||
// RUN: %clang_cc1 -fcxx-exceptions -fexceptions -fsyntax-only -verify -std=c++11 -Wc++14-compat -Wc++14-extensions -Wc++17-extensions %s
|
||||
|
||||
// Need std::initializer_list
|
||||
namespace std {
|
||||
@ -127,7 +127,7 @@ extern "C++" [[]] { } // expected-error {{an attribute list cannot appear here}}
|
||||
[[]] using ns::i; // expected-error {{an attribute list cannot appear here}}
|
||||
[[unknown]] using namespace ns; // expected-warning {{unknown attribute 'unknown' ignored}}
|
||||
[[noreturn]] using namespace ns; // expected-error {{'noreturn' attribute only applies to functions}}
|
||||
namespace [[]] ns2 {} // expected-warning {{attributes on a namespace declaration are incompatible with C++ standards before C++1z}}
|
||||
namespace [[]] ns2 {} // expected-warning {{attributes on a namespace declaration are incompatible with C++ standards before C++17}}
|
||||
|
||||
using [[]] alignas(4) [[]] ns::i; // expected-error {{an attribute list cannot appear here}}
|
||||
using [[]] alignas(4) [[]] foobar = int; // expected-error {{an attribute list cannot appear here}} expected-error {{'alignas' attribute only applies to}}
|
||||
@ -179,7 +179,7 @@ enum [[]] E2; // expected-error {{forbids forward references}}
|
||||
enum [[]] E1;
|
||||
enum [[]] E3 : int;
|
||||
enum [[]] {
|
||||
k_123 [[]] = 123 // expected-warning {{attributes on an enumerator declaration are incompatible with C++ standards before C++1z}}
|
||||
k_123 [[]] = 123 // expected-warning {{attributes on an enumerator declaration are incompatible with C++ standards before C++17}}
|
||||
};
|
||||
enum [[]] E1 e; // expected-error {{an attribute list cannot appear here}}
|
||||
enum [[]] class E4 { }; // expected-error {{an attribute list cannot appear here}}
|
||||
@ -352,7 +352,7 @@ int fallthru(int n) {
|
||||
switch (n) {
|
||||
case 0:
|
||||
n += 5;
|
||||
[[fallthrough]]; // expected-warning {{use of the 'fallthrough' attribute is a C++1z extension}}
|
||||
[[fallthrough]]; // expected-warning {{use of the 'fallthrough' attribute is a C++17 extension}}
|
||||
case 1:
|
||||
n *= 2;
|
||||
break;
|
||||
|
@ -1,4 +1,4 @@
|
||||
// RUN: %clang_cc1 -std=c++1z %s -verify
|
||||
// RUN: %clang_cc1 -std=c++17 %s -verify
|
||||
// RUN: %clang_cc1 -std=c++14 %s -verify
|
||||
// RUN: %clang_cc1 -std=c++11 %s -verify
|
||||
|
||||
@ -23,9 +23,9 @@ auto XL16 = [] () constexpr
|
||||
{ };
|
||||
|
||||
#else
|
||||
auto L = []() mutable constexpr {return 0; }; //expected-warning{{is a C++1z extension}}
|
||||
auto L2 = []() constexpr { return 0;};//expected-warning{{is a C++1z extension}}
|
||||
auto L4 = []() constexpr mutable { return 0; }; //expected-warning{{is a C++1z extension}}
|
||||
auto L = []() mutable constexpr {return 0; }; //expected-warning{{is a C++17 extension}}
|
||||
auto L2 = []() constexpr { return 0;};//expected-warning{{is a C++17 extension}}
|
||||
auto L4 = []() constexpr mutable { return 0; }; //expected-warning{{is a C++17 extension}}
|
||||
#endif
|
||||
|
||||
|
||||
|
@ -2,13 +2,13 @@
|
||||
// RUN: %clang_cc1 -fsyntax-only -verify %s
|
||||
// RUN: not %clang_cc1 -x c++ -fixit %t -Werror -DFIXIT
|
||||
// RUN: %clang_cc1 -x c++ %t -DFIXIT
|
||||
// RUN: %clang_cc1 -fsyntax-only -verify %s -std=c++1z -Wc++14-compat
|
||||
// RUN: %clang_cc1 -fsyntax-only -verify %s -std=c++17 -Wc++14-compat
|
||||
|
||||
namespace foo1::foo2::foo3 {
|
||||
#if __cplusplus <= 201400L
|
||||
// expected-warning@-2 {{nested namespace definition is a C++1z extension; define each namespace separately}}
|
||||
// expected-warning@-2 {{nested namespace definition is a C++17 extension; define each namespace separately}}
|
||||
#else
|
||||
// expected-warning@-4 {{nested namespace definition is incompatible with C++ standards before C++1z}}
|
||||
// expected-warning@-4 {{nested namespace definition is incompatible with C++ standards before C++17}}
|
||||
#endif
|
||||
int foo(int x) { return x; }
|
||||
}
|
||||
|
@ -4686,6 +4686,16 @@
|
||||
// RUN: | FileCheck -match-full-lines -check-prefix MIPS-MSA %s
|
||||
// MIPS-MSA:#define __mips_msa 1
|
||||
//
|
||||
// RUN: %clang_cc1 -target-feature +nomadd4 \
|
||||
// RUN: -E -dM -triple=mips-none-none < /dev/null \
|
||||
// RUN: | FileCheck -match-full-lines -check-prefix MIPS-NOMADD4 %s
|
||||
// MIPS-NOMADD4:#define __mips_no_madd4 1
|
||||
//
|
||||
// RUN: %clang_cc1 \
|
||||
// RUN: -E -dM -triple=mips-none-none < /dev/null \
|
||||
// RUN: | FileCheck -match-full-lines -check-prefix MIPS-MADD4 %s
|
||||
// MIPS-MADD4-NOT:#define __mips_no_madd4 1
|
||||
//
|
||||
// RUN: %clang_cc1 -target-cpu mips32r3 -target-feature +nan2008 \
|
||||
// RUN: -E -dM -triple=mips-none-none < /dev/null \
|
||||
// RUN: | FileCheck -match-full-lines -check-prefix MIPS-NAN2008 %s
|
||||
|
@ -222,7 +222,7 @@ GlobalFnPtr fp_g = g;
|
||||
// Test overloading of destructors
|
||||
// Can't mix H and unattributed destructors
|
||||
struct d_h {
|
||||
~d_h() {} // expected-note {{previous declaration is here}}
|
||||
~d_h() {} // expected-note {{previous definition is here}}
|
||||
__host__ ~d_h() {} // expected-error {{destructor cannot be redeclared}}
|
||||
};
|
||||
|
||||
|
@ -7,27 +7,27 @@
|
||||
// giant change to clang, and the use cases seem quite limited.
|
||||
|
||||
struct A {
|
||||
~A() {} // expected-note {{previous declaration is here}}
|
||||
~A() {} // expected-note {{previous definition is here}}
|
||||
__device__ ~A() {} // expected-error {{destructor cannot be redeclared}}
|
||||
};
|
||||
|
||||
struct B {
|
||||
__host__ ~B() {} // expected-note {{previous declaration is here}}
|
||||
__host__ ~B() {} // expected-note {{previous definition is here}}
|
||||
__host__ __device__ ~B() {} // expected-error {{destructor cannot be redeclared}}
|
||||
};
|
||||
|
||||
struct C {
|
||||
__host__ __device__ ~C() {} // expected-note {{previous declaration is here}}
|
||||
__host__ __device__ ~C() {} // expected-note {{previous definition is here}}
|
||||
__host__ ~C() {} // expected-error {{destructor cannot be redeclared}}
|
||||
};
|
||||
|
||||
struct D {
|
||||
__device__ ~D() {} // expected-note {{previous declaration is here}}
|
||||
__device__ ~D() {} // expected-note {{previous definition is here}}
|
||||
__host__ __device__ ~D() {} // expected-error {{destructor cannot be redeclared}}
|
||||
};
|
||||
|
||||
struct E {
|
||||
__host__ __device__ ~E() {} // expected-note {{previous declaration is here}}
|
||||
__host__ __device__ ~E() {} // expected-note {{previous definition is here}}
|
||||
__device__ ~E() {} // expected-error {{destructor cannot be redeclared}}
|
||||
};
|
||||
|
||||
|
@ -982,3 +982,9 @@ constexpr void PR28739(int n) { // expected-error {{never produces a constant}}
|
||||
int *p = &n;
|
||||
p += (__int128)(unsigned long)-1; // expected-note {{cannot refer to element 18446744073709551615 of non-array object in a constant expression}}
|
||||
}
|
||||
|
||||
constexpr void Void(int n) {
|
||||
void(n + 1);
|
||||
void();
|
||||
}
|
||||
constexpr int void_test = (Void(0), 1);
|
||||
|
@ -1,5 +1,5 @@
|
||||
// RUN: %clang_cc1 -fsyntax-only -std=c++98 -Wc++11-compat -verify %s
|
||||
// RUN: %clang_cc1 -fsyntax-only -std=c++1z -Wc++11-compat -verify %s
|
||||
// RUN: %clang_cc1 -fsyntax-only -std=c++17 -Wc++11-compat -verify %s
|
||||
|
||||
#if __cplusplus < 201103L
|
||||
|
||||
@ -42,14 +42,14 @@ void h(size_t foo, size_t bar) {
|
||||
char c = 'x'_x; // expected-warning {{will be treated as a user-defined literal suffix}}
|
||||
|
||||
template<int ...N> int f() { // expected-warning {{C++11 extension}}
|
||||
return (N + ...); // expected-warning {{C++1z extension}}
|
||||
return (N + ...); // expected-warning {{C++17 extension}}
|
||||
}
|
||||
|
||||
#else
|
||||
|
||||
auto init_capture = [a(0)] {}; // expected-warning {{initialized lambda captures are incompatible with C++ standards before C++14}}
|
||||
static_assert(true); // expected-warning {{incompatible with C++ standards before C++1z}}
|
||||
static_assert(true); // expected-warning {{incompatible with C++ standards before C++17}}
|
||||
|
||||
template<int ...N> int f() { return (N + ...); } // expected-warning {{incompatible with C++ standards before C++1z}}
|
||||
template<int ...N> int f() { return (N + ...); } // expected-warning {{incompatible with C++ standards before C++17}}
|
||||
|
||||
#endif
|
||||
|
@ -286,6 +286,29 @@ namespace tuple_tests {
|
||||
}
|
||||
}
|
||||
|
||||
namespace dependent {
|
||||
template<typename T> struct X {
|
||||
X(T);
|
||||
};
|
||||
template<typename T> int Var(T t) {
|
||||
X x(t);
|
||||
return X(x) + 1; // expected-error {{invalid operands}}
|
||||
}
|
||||
template<typename T> int Cast(T t) {
|
||||
return X(X(t)) + 1; // expected-error {{invalid operands}}
|
||||
}
|
||||
template<typename T> int New(T t) {
|
||||
return X(new X(t)) + 1; // expected-error {{invalid operands}}
|
||||
};
|
||||
template int Var(float); // expected-note {{instantiation of}}
|
||||
template int Cast(float); // expected-note {{instantiation of}}
|
||||
template int New(float); // expected-note {{instantiation of}}
|
||||
template<typename T> int operator+(X<T>, int);
|
||||
template int Var(int);
|
||||
template int Cast(int);
|
||||
template int New(int);
|
||||
}
|
||||
|
||||
#else
|
||||
|
||||
// expected-no-diagnostics
|
||||
|
@ -1,4 +1,5 @@
|
||||
// RUN: %clang_cc1 -std=c++1z -verify %s
|
||||
// RUN: %clang_cc1 -std=c++17 -verify %s
|
||||
|
||||
void testIf() {
|
||||
int x = 0;
|
||||
|
@ -1,9 +1,9 @@
|
||||
// RUN: %clang_cc1 -std=c++98 %s -Wdeprecated -verify -triple x86_64-linux-gnu
|
||||
// RUN: %clang_cc1 -std=c++11 %s -Wdeprecated -verify -triple x86_64-linux-gnu
|
||||
// RUN: %clang_cc1 -std=c++1y %s -Wdeprecated -verify -triple x86_64-linux-gnu
|
||||
// RUN: %clang_cc1 -std=c++1z %s -Wdeprecated -verify -triple x86_64-linux-gnu
|
||||
// RUN: %clang_cc1 -std=c++14 %s -Wdeprecated -verify -triple x86_64-linux-gnu
|
||||
// RUN: %clang_cc1 -std=c++17 %s -Wdeprecated -verify -triple x86_64-linux-gnu
|
||||
|
||||
// RUN: %clang_cc1 -std=c++1y %s -Wdeprecated -verify -triple x86_64-linux-gnu -Wno-deprecated-register -DNO_DEPRECATED_FLAGS
|
||||
// RUN: %clang_cc1 -std=c++14 %s -Wdeprecated -verify -triple x86_64-linux-gnu -Wno-deprecated-register -DNO_DEPRECATED_FLAGS
|
||||
|
||||
#include "Inputs/register.h"
|
||||
|
||||
@ -12,8 +12,8 @@ void h() throw(int);
|
||||
void i() throw(...);
|
||||
#if __cplusplus > 201402L
|
||||
// expected-warning@-4 {{dynamic exception specifications are deprecated}} expected-note@-4 {{use 'noexcept' instead}}
|
||||
// expected-error@-4 {{ISO C++1z does not allow dynamic exception specifications}} expected-note@-4 {{use 'noexcept(false)' instead}}
|
||||
// expected-error@-4 {{ISO C++1z does not allow dynamic exception specifications}} expected-note@-4 {{use 'noexcept(false)' instead}}
|
||||
// expected-error@-4 {{ISO C++17 does not allow dynamic exception specifications}} expected-note@-4 {{use 'noexcept(false)' instead}}
|
||||
// expected-error@-4 {{ISO C++17 does not allow dynamic exception specifications}} expected-note@-4 {{use 'noexcept(false)' instead}}
|
||||
#elif __cplusplus >= 201103L
|
||||
// expected-warning@-8 {{dynamic exception specifications are deprecated}} expected-note@-8 {{use 'noexcept' instead}}
|
||||
// expected-warning@-8 {{dynamic exception specifications are deprecated}} expected-note@-8 {{use 'noexcept(false)' instead}}
|
||||
@ -23,7 +23,7 @@ void i() throw(...);
|
||||
void stuff() {
|
||||
register int n;
|
||||
#if __cplusplus > 201402L
|
||||
// expected-error@-2 {{ISO C++1z does not allow 'register' storage class specifier}}
|
||||
// expected-error@-2 {{ISO C++17 does not allow 'register' storage class specifier}}
|
||||
#elif __cplusplus >= 201103L && !defined(NO_DEPRECATED_FLAGS)
|
||||
// expected-warning@-4 {{'register' storage class specifier is deprecated}}
|
||||
#endif
|
||||
@ -34,14 +34,14 @@ void stuff() {
|
||||
bool b;
|
||||
++b;
|
||||
#if __cplusplus > 201402L
|
||||
// expected-error@-2 {{ISO C++1z does not allow incrementing expression of type bool}}
|
||||
// expected-error@-2 {{ISO C++17 does not allow incrementing expression of type bool}}
|
||||
#else
|
||||
// expected-warning@-4 {{incrementing expression of type bool is deprecated}}
|
||||
#endif
|
||||
|
||||
b++;
|
||||
#if __cplusplus > 201402L
|
||||
// expected-error@-2 {{ISO C++1z does not allow incrementing expression of type bool}}
|
||||
// expected-error@-2 {{ISO C++17 does not allow incrementing expression of type bool}}
|
||||
#else
|
||||
// expected-warning@-4 {{incrementing expression of type bool is deprecated}}
|
||||
#endif
|
||||
|
@ -1,6 +1,6 @@
|
||||
// RUN: %clang_cc1 -fsyntax-only -verify %s
|
||||
// RUN: %clang_cc1 -fsyntax-only -verify -std=c++14 %s
|
||||
// RUN: %clang_cc1 -fsyntax-only -verify -std=c++1z %s -Wc++98-c++11-c++14-compat
|
||||
// RUN: %clang_cc1 -fsyntax-only -verify -std=c++17 %s -Wc++98-c++11-c++14-compat
|
||||
|
||||
// Check that we don't allow illegal uses of inline
|
||||
// (checking C++-only constructs here)
|
||||
@ -12,7 +12,7 @@ void localVar() {
|
||||
|
||||
// Check that we warn appropriately.
|
||||
#if __cplusplus <= 201402L
|
||||
inline int a; // expected-warning{{inline variables are a C++1z extension}}
|
||||
inline int a; // expected-warning{{inline variables are a C++17 extension}}
|
||||
#else
|
||||
inline int a; // expected-warning{{inline variables are incompatible with C++ standards before C++1z}}
|
||||
inline int a; // expected-warning{{inline variables are incompatible with C++ standards before C++17}}
|
||||
#endif
|
||||
|
@ -49,5 +49,5 @@ struct X { ~X(); };
|
||||
StaticAssertProtected<int> sap1;
|
||||
StaticAssertProtected<X> sap2; // expected-note {{instantiation}}
|
||||
|
||||
static_assert(true); // expected-warning {{C++1z extension}}
|
||||
static_assert(true); // expected-warning {{C++17 extension}}
|
||||
static_assert(false); // expected-error-re {{failed{{$}}}} expected-warning {{extension}}
|
||||
|
@ -1,8 +1,8 @@
|
||||
// RUN: %clang_cc1 -fsyntax-only -std=c++14 -verify %s
|
||||
|
||||
void f() {
|
||||
if (bool b = true; b) {} // expected-warning {{'if' initialization statements are a C++1z extension}}
|
||||
switch (int n = 5; n) { // expected-warning {{'switch' initialization statements are a C++1z extension}}
|
||||
if (bool b = true; b) {} // expected-warning {{'if' initialization statements are a C++17 extension}}
|
||||
switch (int n = 5; n) { // expected-warning {{'switch' initialization statements are a C++17 extension}}
|
||||
case 5: break;
|
||||
}
|
||||
}
|
||||
|
@ -213,3 +213,12 @@ typedef int externC; // expected-note {{previous declaration is here}}
|
||||
void handleLinkageSpec() {
|
||||
typedef void externC; // expected-warning {{declaration shadows a typedef in the global namespace}}
|
||||
}
|
||||
|
||||
namespace PR33947 {
|
||||
void f(int a) {
|
||||
struct A {
|
||||
void g(int a) {}
|
||||
A() { int a; }
|
||||
};
|
||||
}
|
||||
}
|
||||
|
@ -1,8 +1,9 @@
|
||||
// RUN: %clang_cc1 -triple x86_64-apple-darwin11 -fsyntax-only -fblocks -verify %s
|
||||
// RUN: %clang_cc1 -triple x86_64-apple-darwin11 -fsyntax-only -fblocks -Wcast-qual -verify %s
|
||||
// rdar://10597832
|
||||
|
||||
typedef const void *CFTypeRef;
|
||||
typedef const struct __CFString *CFStringRef;
|
||||
@class NSString;
|
||||
|
||||
@interface NSString
|
||||
@end
|
||||
@ -18,7 +19,7 @@ NSString *CreateNSString();
|
||||
void from_cf() {
|
||||
id obj1 = (__bridge_transfer id)CFCreateSomething(); // expected-warning {{'__bridge_transfer' casts have no effect when not using ARC}}
|
||||
id obj2 = (__bridge_transfer NSString*)CFCreateString(); // expected-warning {{'__bridge_transfer' casts have no effect when not using ARC}}
|
||||
(__bridge int*)CFCreateSomething(); // expected-warning {{expression result unused}}
|
||||
(__bridge int*)CFCreateSomething(); // expected-warning {{expression result unused}} expected-warning {{cast from 'const void *' to 'int *' drops const qualifier}}
|
||||
id obj3 = (__bridge id)CFGetSomething();
|
||||
id obj4 = (__bridge NSString*)CFGetString();
|
||||
}
|
||||
@ -41,3 +42,15 @@ void to_cf_ignored(id obj) {
|
||||
CFTypeRef cf1 = (__bridge_retained CFTypeRef)CreateSomething(); // no-warning
|
||||
CFTypeRef cf3 = (__bridge CFTypeRef)CreateSomething(); // no-warning
|
||||
}
|
||||
|
||||
// Check that clang doesn't warn about dropping const from Objective-C object
|
||||
// types.
|
||||
void test_wcast_qual() {
|
||||
CFStringRef c;
|
||||
NSString *n0 = (NSString *)c;
|
||||
NSString **n1 = (NSString **)&c;
|
||||
const NSString *n2;
|
||||
const NSString **n3;
|
||||
void *p0 = (void *)n2;
|
||||
void **p1 = (void **)n3;
|
||||
}
|
||||
|
@ -25,7 +25,7 @@ namespace CanonicalNullptr {
|
||||
}
|
||||
|
||||
namespace Auto {
|
||||
template<auto> struct A { }; // expected-error {{until C++1z}}
|
||||
template<auto> struct A { }; // expected-error {{until C++17}}
|
||||
}
|
||||
|
||||
namespace check_conversion_early {
|
||||
|
@ -28,7 +28,7 @@
|
||||
<!--*************************************************************************-->
|
||||
<h1>C++ Defect Report Support in Clang</h1>
|
||||
<!--*************************************************************************-->
|
||||
<p>Last updated: $Date: 2017-05-10 00:21:24 +0200 (Wed, 10 May 2017) $</p>
|
||||
<p>Last updated: $Date: 2017-08-11 18:07:17 +0200 (Fri, 11 Aug 2017) $</p>
|
||||
|
||||
<h2 id="cxxdr">C++ defect report implementation status</h2>
|
||||
|
||||
@ -591,7 +591,7 @@
|
||||
<td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/cwg_defects.html#92">92</a></td>
|
||||
<td>CD4</td>
|
||||
<td>Should <I>exception-specification</I>s be part of the type system?</td>
|
||||
<td class="svn" align="center">Clang 4 (C++17 onwards)</td>
|
||||
<td class="full" align="center">Clang 4 (C++17 onwards)</td>
|
||||
</tr>
|
||||
<tr id="93">
|
||||
<td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/cwg_defects.html#93">93</a></td>
|
||||
@ -813,7 +813,7 @@
|
||||
<td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/cwg_defects.html#129">129</a></td>
|
||||
<td>CD3</td>
|
||||
<td>Stability of uninitialized auto variables</td>
|
||||
<td class="svn" align="center">Duplicate of <a href="#616">616</a></td>
|
||||
<td class="full" align="center">Duplicate of <a href="#616">616</a></td>
|
||||
</tr>
|
||||
<tr id="130">
|
||||
<td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/cwg_closed.html#130">130</a></td>
|
||||
@ -1480,7 +1480,7 @@ accessible?</td>
|
||||
<td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/cwg_defects.html#240">240</a></td>
|
||||
<td>CD3</td>
|
||||
<td>Uninitialized values and undefined behavior</td>
|
||||
<td class="svn" align="center">Duplicate of <a href="#616">616</a></td>
|
||||
<td class="full" align="center">Duplicate of <a href="#616">616</a></td>
|
||||
</tr>
|
||||
<tr id="241">
|
||||
<td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/cwg_defects.html#241">241</a></td>
|
||||
@ -1594,7 +1594,7 @@ accessible?</td>
|
||||
<td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/cwg_defects.html#259">259</a></td>
|
||||
<td>CD1</td>
|
||||
<td>Restrictions on explicit specialization and instantiation</td>
|
||||
<td class="svn" align="center">Clang 4</td>
|
||||
<td class="full" align="center">Clang 4</td>
|
||||
</tr>
|
||||
<tr class="open" id="260">
|
||||
<td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/cwg_active.html#260">260</a></td>
|
||||
@ -1913,7 +1913,7 @@ of class templates</td>
|
||||
<td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/cwg_defects.html#312">312</a></td>
|
||||
<td>CD3</td>
|
||||
<td>“use” of invalid pointer value not defined</td>
|
||||
<td class="svn" align="center">Duplicate of <a href="#616">616</a></td>
|
||||
<td class="full" align="center">Duplicate of <a href="#616">616</a></td>
|
||||
</tr>
|
||||
<tr id="313">
|
||||
<td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/cwg_closed.html#313">313</a></td>
|
||||
@ -2279,7 +2279,7 @@ of class templates</td>
|
||||
<td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/cwg_defects.html#373">373</a></td>
|
||||
<td>C++11</td>
|
||||
<td>Lookup on namespace qualified name in using-directive</td>
|
||||
<td class="svn" align="center">SVN</td>
|
||||
<td class="svn" align="center">Clang 5</td>
|
||||
</tr>
|
||||
<tr id="374">
|
||||
<td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/cwg_defects.html#374">374</a></td>
|
||||
@ -3017,7 +3017,7 @@ of class templates</td>
|
||||
<td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/cwg_defects.html#496">496</a></td>
|
||||
<td>CD3</td>
|
||||
<td>Is a volatile-qualified type really a POD?</td>
|
||||
<td class="none" align="center">Superseded by <a href="#dr2094">dr2094</a></td>
|
||||
<td class="svn" align="center">Superseded by <a href="#2094">2094</a></td>
|
||||
</tr>
|
||||
<tr id="497">
|
||||
<td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/cwg_defects.html#497">497</a></td>
|
||||
@ -3541,7 +3541,7 @@ and <I>POD class</I></td>
|
||||
<td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/cwg_defects.html#583">583</a></td>
|
||||
<td>CD3</td>
|
||||
<td>Relational pointer comparisons against the null pointer constant</td>
|
||||
<td class="svn" align="center">Clang 4</td>
|
||||
<td class="full" align="center">Clang 4</td>
|
||||
</tr>
|
||||
<tr id="584">
|
||||
<td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/cwg_closed.html#584">584</a></td>
|
||||
@ -3613,7 +3613,7 @@ and <I>POD class</I></td>
|
||||
<td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/cwg_closed.html#595">595</a></td>
|
||||
<td>dup</td>
|
||||
<td>Exception specifications in templates instantiated from class bodies</td>
|
||||
<td class="svn" align="center">Duplicate of <a href="#1330">1330</a></td>
|
||||
<td class="full" align="center">Duplicate of <a href="#1330">1330</a></td>
|
||||
</tr>
|
||||
<tr class="open" id="596">
|
||||
<td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/cwg_active.html#596">596</a></td>
|
||||
@ -3739,7 +3739,7 @@ and <I>POD class</I></td>
|
||||
<td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/cwg_defects.html#616">616</a></td>
|
||||
<td>CD3</td>
|
||||
<td>Definition of “indeterminate value”</td>
|
||||
<td class="svn" align="center">Clang 4</td>
|
||||
<td class="full" align="center">Clang 4</td>
|
||||
</tr>
|
||||
<tr class="open" id="617">
|
||||
<td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/cwg_active.html#617">617</a></td>
|
||||
@ -5839,7 +5839,7 @@ and <I>POD class</I></td>
|
||||
<td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/cwg_defects.html#1004">1004</a></td>
|
||||
<td>C++11</td>
|
||||
<td>Injected-class-names as arguments for template template parameters</td>
|
||||
<td class="svn" align="center">SVN</td>
|
||||
<td class="svn" align="center">Clang 5</td>
|
||||
</tr>
|
||||
<tr id="1005">
|
||||
<td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/cwg_closed.html#1005">1005</a></td>
|
||||
@ -7093,7 +7093,7 @@ and <I>POD class</I></td>
|
||||
<td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/cwg_defects.html#1213">1213</a></td>
|
||||
<td>CD3</td>
|
||||
<td>Array subscripting and xvalues</td>
|
||||
<td class="svn" align="center">Clang 4</td>
|
||||
<td class="full" align="center">Clang 4</td>
|
||||
</tr>
|
||||
<tr id="1214">
|
||||
<td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/cwg_defects.html#1214">1214</a></td>
|
||||
@ -7405,7 +7405,7 @@ and <I>POD class</I></td>
|
||||
<td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/cwg_defects.html#1265">1265</a></td>
|
||||
<td>CD3</td>
|
||||
<td>Mixed use of the <TT>auto</TT> specifier</td>
|
||||
<td class="svn" align="center">SVN</td>
|
||||
<td class="svn" align="center">Clang 5</td>
|
||||
</tr>
|
||||
<tr class="open" id="1266">
|
||||
<td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/cwg_active.html#1266">1266</a></td>
|
||||
@ -7585,7 +7585,7 @@ and <I>POD class</I></td>
|
||||
<td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/cwg_defects.html#1295">1295</a></td>
|
||||
<td>CD3</td>
|
||||
<td>Binding a reference to an rvalue bit-field</td>
|
||||
<td class="svn" align="center">Clang 4</td>
|
||||
<td class="full" align="center">Clang 4</td>
|
||||
</tr>
|
||||
<tr id="1296">
|
||||
<td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/cwg_defects.html#1296">1296</a></td>
|
||||
@ -7675,7 +7675,7 @@ and <I>POD class</I></td>
|
||||
<td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/cwg_defects.html#1310">1310</a></td>
|
||||
<td>CD3</td>
|
||||
<td>What is an “acceptable lookup result?”</td>
|
||||
<td class="svn" align="center">SVN</td>
|
||||
<td class="svn" align="center">Clang 5</td>
|
||||
</tr>
|
||||
<tr id="1311">
|
||||
<td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/cwg_defects.html#1311">1311</a></td>
|
||||
@ -7795,7 +7795,7 @@ and <I>POD class</I></td>
|
||||
<td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/cwg_defects.html#1330">1330</a></td>
|
||||
<td>CD3</td>
|
||||
<td>Delayed instantiation of <TT>noexcept</TT> specifiers</td>
|
||||
<td class="svn" align="center">Clang 4 (C++11 onwards)</td>
|
||||
<td class="full" align="center">Clang 4 (C++11 onwards)</td>
|
||||
</tr>
|
||||
<tr class="open" id="1331">
|
||||
<td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/cwg_closed.html#1331">1331</a></td>
|
||||
@ -8143,7 +8143,7 @@ and <I>POD class</I></td>
|
||||
<td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/cwg_defects.html#1388">1388</a></td>
|
||||
<td>CD3</td>
|
||||
<td>Missing non-deduced context following a function parameter pack</td>
|
||||
<td class="svn" align="center">Clang 4</td>
|
||||
<td class="full" align="center">Clang 4</td>
|
||||
</tr>
|
||||
<tr id="1389">
|
||||
<td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/cwg_closed.html#1389">1389</a></td>
|
||||
@ -8209,7 +8209,7 @@ and <I>POD class</I></td>
|
||||
<td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/cwg_defects.html#1399">1399</a></td>
|
||||
<td>CD3</td>
|
||||
<td>Deduction with multiple function parameter packs</td>
|
||||
<td class="svn" align="center">Duplicate of <a href="#1388">1388</a></td>
|
||||
<td class="full" align="center">Duplicate of <a href="#1388">1388</a></td>
|
||||
</tr>
|
||||
<tr id="1400">
|
||||
<td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/cwg_closed.html#1400">1400</a></td>
|
||||
@ -8785,7 +8785,7 @@ and <I>POD class</I></td>
|
||||
<td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/cwg_defects.html#1495">1495</a></td>
|
||||
<td>CD3</td>
|
||||
<td>Partial specialization of variadic class template</td>
|
||||
<td class="svn" align="center">Clang 4</td>
|
||||
<td class="full" align="center">Clang 4</td>
|
||||
</tr>
|
||||
<tr id="1496">
|
||||
<td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/cwg_defects.html#1496">1496</a></td>
|
||||
@ -8887,7 +8887,7 @@ and <I>POD class</I></td>
|
||||
<td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/cwg_defects.html#1512">1512</a></td>
|
||||
<td>CD3</td>
|
||||
<td>Pointer comparison vs qualification conversions</td>
|
||||
<td class="svn" align="center">Clang 4</td>
|
||||
<td class="full" align="center">Clang 4</td>
|
||||
</tr>
|
||||
<tr class="open" id="1513">
|
||||
<td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/cwg_active.html#1513">1513</a></td>
|
||||
@ -8923,7 +8923,7 @@ and <I>POD class</I></td>
|
||||
<td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/cwg_defects.html#1518">1518</a></td>
|
||||
<td>CD4</td>
|
||||
<td>Explicit default constructors and copy-list-initialization</td>
|
||||
<td class="svn" align="center">Clang 4</td>
|
||||
<td class="full" align="center">Clang 4</td>
|
||||
</tr>
|
||||
<tr id="1519">
|
||||
<td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/cwg_closed.html#1519">1519</a></td>
|
||||
@ -9733,7 +9733,7 @@ and <I>POD class</I></td>
|
||||
<td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/cwg_defects.html#1653">1653</a></td>
|
||||
<td>CD4</td>
|
||||
<td>Removing deprecated increment of <TT>bool</TT></td>
|
||||
<td class="svn" align="center">Clang 4 (C++17 onwards)</td>
|
||||
<td class="full" align="center">Clang 4 (C++17 onwards)</td>
|
||||
</tr>
|
||||
<tr id="1654">
|
||||
<td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/cwg_closed.html#1654">1654</a></td>
|
||||
@ -9763,7 +9763,7 @@ and <I>POD class</I></td>
|
||||
<td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/cwg_defects.html#1658">1658</a></td>
|
||||
<td>C++14</td>
|
||||
<td>Deleted default constructor for abstract class via destructor</td>
|
||||
<td class="svn" align="center">SVN</td>
|
||||
<td class="svn" align="center">Clang 5</td>
|
||||
</tr>
|
||||
<tr class="open" id="1659">
|
||||
<td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/cwg_active.html#1659">1659</a></td>
|
||||
@ -11161,7 +11161,7 @@ and <I>POD class</I></td>
|
||||
<td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/cwg_defects.html#1891">1891</a></td>
|
||||
<td>CD4</td>
|
||||
<td>Move constructor/assignment for closure class</td>
|
||||
<td class="svn" align="center">Clang 4</td>
|
||||
<td class="full" align="center">Clang 4</td>
|
||||
</tr>
|
||||
<tr id="1892">
|
||||
<td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/cwg_defects.html#1892">1892</a></td>
|
||||
@ -12379,7 +12379,7 @@ and <I>POD class</I></td>
|
||||
<td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/cwg_defects.html#2094">2094</a></td>
|
||||
<td>DR</td>
|
||||
<td>Trivial copy/move constructor for class with volatile member</td>
|
||||
<td class="full" align="center">Clang 5.0</td>
|
||||
<td class="svn" align="center">Clang 5</td>
|
||||
</tr>
|
||||
<tr id="2095">
|
||||
<td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/cwg_defects.html#2095">2095</a></td>
|
||||
|
@ -26,7 +26,7 @@
|
||||
<!--*************************************************************************-->
|
||||
<h1>C++ Support in Clang</h1>
|
||||
<!--*************************************************************************-->
|
||||
<p>Last updated: $Date: 2017-07-15 17:51:59 +0200 (Sat, 15 Jul 2017) $</p>
|
||||
<p>Last updated: $Date: 2017-08-11 18:16:08 +0200 (Fri, 11 Aug 2017) $</p>
|
||||
|
||||
<p>Clang fully implements all published ISO C++ standards (<a
|
||||
href="#cxx98">C++98 / C++03</a>, <a
|
||||
@ -854,9 +854,9 @@ and library features that are not part of standard C++.</p>
|
||||
<th>Available in Clang?</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td rowspan="3">SD-6: SG10 feature test recommendations</td>
|
||||
<td rowspan="3"><a href="http://isocpp.org/std/standing-documents/sd-6-sg10-feature-test-recommendations">SD-6</a></td>
|
||||
<td rowspan="3">N/A</td>
|
||||
<td rowspan="4">SD-6: SG10 feature test recommendations</td>
|
||||
<td rowspan="4"><a href="http://isocpp.org/std/standing-documents/sd-6-sg10-feature-test-recommendations">SD-6</a></td>
|
||||
<td rowspan="4">N/A</td>
|
||||
<td class="full" align="center">
|
||||
Clang 3.4 (<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2013/n3745">N3745</a>)</br>
|
||||
</td>
|
||||
@ -871,6 +871,11 @@ and library features that are not part of standard C++.</p>
|
||||
Clang 4 (<a href="http://wg21.link/p0096r3">P0096R3</a>)</a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="svn" align="center">
|
||||
Clang 5 (<a href="http://wg21.link/p0096r4">P0096R4</a>)</a>
|
||||
</td>
|
||||
</tr>
|
||||
<!-- FIXME: Implement latest recommendations.
|
||||
<tr>
|
||||
<td class="svn" align="center">
|
||||
|
@ -108,11 +108,11 @@ def availability(issue):
|
||||
if status == 'unknown':
|
||||
avail = 'Unknown'
|
||||
avail_style = ' class="none"'
|
||||
elif status == '5':
|
||||
elif status == '6':
|
||||
avail = 'SVN'
|
||||
avail_style = ' class="svn"'
|
||||
elif status == '4':
|
||||
avail = 'Clang 4'
|
||||
elif status == '5':
|
||||
avail = 'Clang 5'
|
||||
avail_style = ' class="svn"'
|
||||
elif re.match('^[0-9]+\.?[0-9]*', status):
|
||||
avail = 'Clang %s' % status
|
||||
|
Loading…
Reference in New Issue
Block a user