Commit 7c0a6187 by Jason Merrill Committed by Jason Merrill

PR c++/92859 - ADL and bit-field.

We also need unlowered_expr_type when considering associated types for ADL.

	* name-lookup.c: Use unlowered_expr_type.

From-SVN: r279229
parent 3e7a892c
2019-12-11 Jason Merrill <jason@redhat.com> 2019-12-11 Jason Merrill <jason@redhat.com>
PR c++/92859 - ADL and bit-field.
* name-lookup.c: Use unlowered_expr_type.
PR c++/92446 - deduction of class NTTP. PR c++/92446 - deduction of class NTTP.
* pt.c (deducible_expression): Look through VIEW_CONVERT_EXPR. * pt.c (deducible_expression): Look through VIEW_CONVERT_EXPR.
......
...@@ -908,7 +908,7 @@ name_lookup::adl_expr (tree expr) ...@@ -908,7 +908,7 @@ name_lookup::adl_expr (tree expr)
if (TREE_TYPE (expr) != unknown_type_node) if (TREE_TYPE (expr) != unknown_type_node)
{ {
adl_type (TREE_TYPE (expr)); adl_type (unlowered_expr_type (expr));
return; return;
} }
......
// PR c++/92859
// { dg-do compile { target c++11 } }
void f(int) = delete;
struct ES {
enum E { v };
friend void f(E) { }
};
struct S {
ES::E e : 1;
};
int main() {
S s{};
f (s.e);
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment