[libclang/AST]
AST: For auto-synthesized ivars give them the location of the related
property (previously they had no source location). This allows them
to be indexed by libclang.

libclang: Make sure synthesized ivars are indexed before the methods that
may reference them.

Fixes rdar://11607001.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158189 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Sema/SemaObjCProperty.cpp b/lib/Sema/SemaObjCProperty.cpp
index 52859d4..91fe0ba 100644
--- a/lib/Sema/SemaObjCProperty.cpp
+++ b/lib/Sema/SemaObjCProperty.cpp
@@ -1502,7 +1502,7 @@
                             true,
                             /* property = */ Prop->getIdentifier(),
                             /* ivar = */ getDefaultSynthIvarName(Prop, Context),
-                            SourceLocation()));
+                            Prop->getLocation()));
     if (PIDecl) {
       Diag(Prop->getLocation(), diag::warn_missing_explicit_synthesis);
       Diag(IMPDecl->getLocation(), diag::note_while_in_implementation);