================
@@ -138,25 +139,33 @@ OriginList *OriginManager::getOrCreateList(const Expr *E) 
{
 
   QualType Type = E->getType();
 
-  // Special handling for DeclRefExpr to share origins with the underlying 
decl.
-  if (auto *DRE = dyn_cast<DeclRefExpr>(E)) {
+  // Special handling for expressions referring to a decl to share origins with
+  // the underlying decl.
+  const ValueDecl *ReferencedDecl = nullptr;
+  if (auto *DRE = dyn_cast<DeclRefExpr>(E))
+    ReferencedDecl = DRE->getDecl();
+  if (auto *ME = dyn_cast<MemberExpr>(E))
----------------
Xazax-hun wrote:

```suggestion
  else if (auto *ME = dyn_cast<MemberExpr>(E))
```

https://github.com/llvm/llvm-project/pull/177363
_______________________________________________
llvm-branch-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

Reply via email to