diff mbox series

[09/11] objc: handle location wrappers in objc_maybe_build_component_ref

Message ID 1510973563-10046-10-git-send-email-dmalcolm@redhat.com
State New
Headers show
Series C++: locations for (almost) everything (PR 43486) | expand

Commit Message

David Malcolm Nov. 18, 2017, 2:52 a.m. UTC
Fixes "self." e.g. in obj-c++.dg/property/dotsyntax-5.mm.

gcc/objc/ChangeLog:
	* objc-act.c (objc_maybe_build_component_ref): Handle location
	wrappers.
---
 gcc/objc/objc-act.c | 2 ++
 1 file changed, 2 insertions(+)
diff mbox series

Patch

diff --git a/gcc/objc/objc-act.c b/gcc/objc/objc-act.c
index 765192c..15b2dfd 100644
--- a/gcc/objc/objc-act.c
+++ b/gcc/objc/objc-act.c
@@ -1376,6 +1376,8 @@  objc_maybe_build_component_ref (tree object, tree property_ident)
       || TREE_CODE (property_ident) != IDENTIFIER_NODE)
     return NULL_TREE;
 
+  STRIP_ANY_LOCATION_WRAPPER (object);
+
   /* The following analysis of 'object' is similar to the one used for
      the 'receiver' of a method invocation.  We need to determine what
      'object' is and find the appropriate property (either declared,