]> git.ipfire.org Git - thirdparty/gcc.git/commit - gcc/cp/name-lookup.c
Various small C++ changes.
authorJason Merrill <jason@redhat.com>
Tue, 5 Nov 2019 23:50:08 +0000 (18:50 -0500)
committerJason Merrill <jason@gcc.gnu.org>
Tue, 5 Nov 2019 23:50:08 +0000 (18:50 -0500)
commitf22f817cbdffe5b4e7d0ba7ab0eeb56ee61b3b72
tree297e198f67433c4deed3dde93c59355d41a91c01
parenta81ffd93b83c4be250514ff385b5b88fa5c3835b
Various small C++ changes.

Wrappers for lookup_qualified_name and build_x_binary_op to make calling
them more convenient in places, and a function named contextual_conv_bool
for places that want contextual conversion to bool.

I noticed that we weren't showing the declaration location when we complain
about a call to a non-constexpr function where a constant expression is
required.

If maybe_instantiate_noexcept doesn't actually instantiate, there's no
reason for it to mess with clones.

* constexpr.c (explain_invalid_constexpr_fn): Show location of fn.

* pt.c (maybe_instantiate_noexcept): Only update clones if we
instantiated.

* typeck.c (contextual_conv_bool): New.

* name-lookup.c (lookup_qualified_name): Add wrapper overload taking
C string rather than identifier.
* parser.c (cp_parser_userdef_numeric_literal): Use it.
* rtti.c (emit_support_tinfos): Use it.
* cp-tree.h (ovl_op_identifier): Change to inline functions.
(build_x_binary_op): Add wrapper with fewer parms.

From-SVN: r277862
gcc/cp/ChangeLog
gcc/cp/constexpr.c
gcc/cp/cp-tree.h
gcc/cp/name-lookup.c
gcc/cp/name-lookup.h
gcc/cp/parser.c
gcc/cp/pt.c
gcc/cp/rtti.c
gcc/cp/typeck.c
gcc/cp/typeck2.c