Unverified Commit 3542168b authored by Sunrise's avatar Sunrise Committed by GitHub
Browse files

[clang][AST] fix lack comparison of declRefExpr in ASTStructuralEquivalence (#66041)

Fixed #66047
Before fix,the following testcase expected true.
```cpp
TEST_F(StructuralEquivalenceStmtTest, DeclRefENoEq) {
  std::string Prefix = "enum Test { AAA, BBB };";
  auto t = makeStmts(
      Prefix + "void foo(int i) {if (i > 0) {i = AAA;} else {i = BBB;}}",
      Prefix + "void foo(int i) {if (i > 0) {i = BBB;} else {i = AAA;}}",
      Lang_CXX03, ifStmt());
  EXPECT_FALSE(testStructuralMatch(t)); // EXPECT_TRUE
}
```
parent dc925be6
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment