[PATCH] D129973: [clang] Pass FoundDecl to DeclRefExpr creator for operator overloads

Shafik Yaghmour via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Jul 18 19:06:41 PDT 2022


shafik added a comment.

Thank you for working on this.

It looks like there are some pre-commit test failures, did you confirm whether they were related to your change or not?

Also you mentioned that this changes the output of `-ast-dump` it might be worth adding a test to capture this behavior change.



================
Comment at: clang/unittests/ASTMatchers/ASTMatchersTraversalTest.cpp:4679
+  EXPECT_TRUE(matches(
+    "struct S {}; namespace a { int operator+(S s1, S s2) { return 0; }; } using a::operator+; int g() { S a, b; return a + b; }",
+    declRefExpr(throughUsingDecl(anything()))));
----------------
You have a trailing `;` after the definition of `a::operator+` please remove it.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D129973/new/

https://reviews.llvm.org/D129973



More information about the cfe-commits mailing list