Commit Graph

226889 Commits

Author SHA1 Message Date
Marek Polacek
a8635547d2 Use alias_template_specialization_p in eval_has_template_arguments 2026-01-14 11:01:12 -05:00
Marek Polacek
7982d483b5 Don't check DECL_CONV_FN_P in eval_is_override 2026-01-14 11:01:12 -05:00
Marek Polacek
bf331fd22a Remove unneeded check in eval_constant_of 2026-01-14 11:01:12 -05:00
Marek Polacek
e4aa93def3 Fix TODO in eval_object_of 2026-01-14 11:01:12 -05:00
Marek Polacek
3862920c26 Uncomment tests in storage_duration2.C 2026-01-14 11:01:11 -05:00
Marek Polacek
56e2c236d1 Introduce type_linkage_name 2026-01-14 11:01:11 -05:00
Marek Polacek
cca09641c0 Improve eval_is_enumerator comment 2026-01-14 11:01:11 -05:00
Marek Polacek
b3ee2b522e Use DECL_VIRTUAL_P in eval_is_override 2026-01-14 11:01:11 -05:00
Marek Polacek
a8a62bf3fc Resolve all TEMPLATE_ID_EXPRs in get_reflection
resolve_nondeduced_ is still needed in compare_reflections
otherwise g++.dg/reflect/substitute1.C FAILs.
2026-01-14 11:01:11 -05:00
Jakub Jelinek
5a54827502 Change int kind arguments to enum metafn_code kind and pass the METAFN_* codes. 2026-01-14 11:01:10 -05:00
Marek Polacek
9ddfa2559a Adjust error message 2026-01-14 11:01:10 -05:00
Marek Polacek
cd9243f298 Check is_capture_proxy sooner
...and don't check !normal.
2026-01-14 11:01:10 -05:00
Jakub Jelinek
b6bd6249bd Rewrite eval_exception__S_exception_cvt_{to,from}_utf8 into a single
eval_exception__S_exception_cvt_tofrom_utf8 with extra to_utf8 argument.
2026-01-14 11:01:10 -05:00
Jakub Jelinek
967b4e8235 Introduce METAFN_KIND_SHIFT and METAFN_KIND_MASK, use it and rewrite
process_metafunction start to use a loop for all 3 arguments.
Update copyright years.
2026-01-14 11:01:10 -05:00
Jakub Jelinek
f6a3ac7218 Fix a typo: manling -> mangling. 2026-01-14 11:01:10 -05:00
Jakub Jelinek
9f8f38bd57 Tweak comment in namespace_members_of. 2026-01-14 11:01:09 -05:00
Jakub Jelinek
b01d0d7189 Merge VAR_DECL and FUNCTION_DECL cases in members_of_representable_p. 2026-01-14 11:01:09 -05:00
Jakub Jelinek
1cc58bbd7f Add extra comment to eval_access_context_current for inherited ctor handling. 2026-01-14 11:01:09 -05:00
Jakub Jelinek
91a2ab239d Move eval_is_implicit_lifetime_type earlier. 2026-01-14 11:01:09 -05:00
Jakub Jelinek
3e796d828e Swap TYPE_MAIN_VARIANT and strip_typedefs in eval_define_aggregate. 2026-01-14 11:01:09 -05:00
Jakub Jelinek
dc0c617e97 Change diagnostics for cv-qualified first define_aggregate argument. 2026-01-14 11:01:08 -05:00
Jakub Jelinek
98cbbd7b53 Merge 2 separate throw_exception calls in can_substitute. 2026-01-14 11:01:08 -05:00
Jakub Jelinek
a5c94b4653 Combine 2 ifs in eval_is_lrvalue_reference_qualified. 2026-01-14 11:01:08 -05:00
Jakub Jelinek
ade2d7ca8b Move some strip_typedefs calls earlier. 2026-01-14 11:01:08 -05:00
Jakub Jelinek
29c610e1df Drop eval_is_type checks before calling eval_is_function_type.
This isn't needed after https://forge.sourceware.org/marek/gcc/commit/34293549c7c3
because it is process_metafunction which throws for is_function_type,
not eval_is_function_type, and the latter just returns boolean_false_node
if the argument is not a type.
2026-01-14 11:01:08 -05:00
Jakub Jelinek
16a7a7dd28 Remove annotations with erroneous types earlier. 2026-01-14 11:01:08 -05:00
Jakub Jelinek
97fb60db19 Change *display_string_of for direct base class relationships. 2026-01-14 11:01:07 -05:00
Jakub Jelinek
bc94613edd Assorted tweaks to eval_alignment_of. 2026-01-14 11:01:07 -05:00
Jakub Jelinek
1cc3dae768 Use the same throw_exception calls for the !complete_type_or_maybe_complain
and c_sizeof_or_alignof_type == error_mark_node cases, add metafn name.
2026-01-14 11:01:07 -05:00
Jakub Jelinek
d8e45233dd Add comments explaining why no special casing of references is needed for *size_of. 2026-01-14 11:01:07 -05:00
Jakub Jelinek
b8d7f79a11 Use type_of in eval_size_of even for FIELD_DECLs. 2026-01-14 11:01:07 -05:00
Jakub Jelinek
eb4569e1d0 offset -> offset_of in std::meta::exception argument from eval_offset_of 2026-01-14 11:01:07 -05:00
Jakub Jelinek
37d7a5eb20 Add missing parameter name to variable_of function comment. 2026-01-14 11:01:06 -05:00
Jakub Jelinek
5e8852ca21 Pass loc rather than location_of etc. to get_reflection_raw calls. 2026-01-14 11:01:06 -05:00
Jakub Jelinek
b40cb058be Small simplification for eval_is_noexcept. 2026-01-14 11:01:06 -05:00
Jakub Jelinek
c4ad08c045 Move get_vector_info function definition before use. 2026-01-14 11:01:06 -05:00
Marek Polacek
44d49d05a5 Move info(^^int) handling in cxx_eval_constant_expression
NFC
2026-01-14 11:01:06 -05:00
Marek Polacek
cd96edc08d Initialize std_meta_node in init_reflection 2026-01-14 11:01:06 -05:00
Jakub Jelinek
d08fb83ec6 Don't try to instantiate REFLECT_EXPR_HANDLE of REFLECT_ANNOTATION REFLECT_EXPR. 2026-01-14 11:01:05 -05:00
Jakub Jelinek
34e0841e21 Export build_stub_type and use it in reflect.cc where needed. 2026-01-14 11:01:05 -05:00
Jakub Jelinek
59af6f1796 Avoid doing any extra handling for remaining DECL_Ps or OVL_Ps, just use an assertion what can come up. 2026-01-14 11:01:05 -05:00
Jakub Jelinek
c6b5bd5100 Add direct_base_parent{_binfo,} helpers. 2026-01-14 11:01:05 -05:00
Jakub Jelinek
0d361404b7 Change eval_has_c_language_linkage to accept any non-lk_none linkage rather than only lk_external for DECL_LANGUAGE test. 2026-01-14 11:01:04 -05:00
Jakub Jelinek
b7aed3618d Remove strip_typedefs call from eval_is_complete_type. 2026-01-14 11:01:04 -05:00
Jakub Jelinek
236edbbf4f Don't uselessly call STRIP_TEMPLATE in eval_is_operator_function. 2026-01-14 11:01:04 -05:00
Eczbek
13053b0d0f c++: Make std::meta::operator_of() accept operator function templates [PR122771]
eval_operator_of() checks if a reflection does not
represent an operator function, but it should also check that
the reflection does not represent an operator function template.

	PR c++/122771

gcc/cp/ChangeLog:

	* reflect.cc (eval_operator_of): Add check for operator function
	templates and improve error message.

gcc/testsuite/ChangeLog:

	* g++.dg/reflect/operator_of1.C: Add tests for operator function
	templates.
2026-01-14 11:01:04 -05:00
Jakub Jelinek
46a06ed9b9 Rename temp_string_literal to get_string_literal, tweak its function comment. 2026-01-14 11:01:04 -05:00
Jakub Jelinek
98dc84243e Use maybe_get_reflection_fndecl in eval_is_function. 2026-01-14 11:01:04 -05:00
Jakub Jelinek
0646efcf02 If std::ranges::data or std::ranges::size are not variable templates, emit error
rather than following through into the non-contiguous handling.
2026-01-14 11:01:03 -05:00
Jakub Jelinek
4eb05609fa Simplify string literal type check. 2026-01-14 11:01:03 -05:00