[PATCH] D49476: [Index] Set OrigD before D is changed.

Eric Liu via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Jul 18 05:13:55 PDT 2018


ioeric created this revision.
ioeric added reviewers: akyrtzi, arphaman.
Herald added a subscriber: cfe-commits.

Repository:
  rC Clang

https://reviews.llvm.org/D49476

Files:
  lib/Index/IndexingContext.cpp


Index: lib/Index/IndexingContext.cpp
===================================================================
--- lib/Index/IndexingContext.cpp
+++ lib/Index/IndexingContext.cpp
@@ -350,6 +350,9 @@
     }
   }
 
+  if (!OrigD)
+    OrigD = D;
+
   if (isTemplateImplicitInstantiation(D)) {
     if (!IsRef)
       return true;
@@ -359,9 +362,6 @@
     assert(!isTemplateImplicitInstantiation(D));
   }
 
-  if (!OrigD)
-    OrigD = D;
-
   if (IsRef)
     Roles |= (unsigned)SymbolRole::Reference;
   else if (isDeclADefinition(OrigD, ContainerDC, *Ctx))


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D49476.156051.patch
Type: text/x-patch
Size: 550 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20180718/b3fc67f1/attachment.bin>


More information about the cfe-commits mailing list