* tree.c (lvalue_kind) [INDIRECT_REF]: Don't check for
METHOD_TYPE.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@195781
138bc75d-0d04-0410-961f-
82ee72b054a4
2013-02-05 Jason Merrill <jason@redhat.com>
+ PR c++/54122
+ * tree.c (lvalue_kind) [INDIRECT_REF]: Don't check for
+ METHOD_TYPE.
+
PR c++/56177
* decl.c (start_preparsed_function): Update restype if we change
decl1.
case ARRAY_REF:
case PARM_DECL:
case RESULT_DECL:
- if (TREE_CODE (TREE_TYPE (ref)) != METHOD_TYPE)
- return clk_ordinary;
- break;
+ return clk_ordinary;
/* A scope ref in a template, left as SCOPE_REF to support later
access checking. */
--- /dev/null
+// PR c++/54122
+// { dg-options -std=c++11 }
+
+enum E { F };
+
+template <typename A>
+struct C
+{
+ E e;
+ void f () { auto l = [&](void)->void { if (e == F) return; }; }
+};