[PATCH] D113118: [clang][AST] Check context of record in structural equivalence.

2021-11-30 Thread Shafik Yaghmour via Phabricator via cfe-commits
shafik added inline comments. Comment at: clang/unittests/AST/StructuralEquivalenceTest.cpp:1037 + "void foo(struct Param { int a; } *p);", Lang_C89); + EXPECT_TRUE(testStructuralMatch(Decls)); +} balazske wrote: > shafik wrote: > > I expect

[PATCH] D113118: [clang][AST] Check context of record in structural equivalence.

2021-11-30 Thread Balázs Kéri via Phabricator via cfe-commits
balazske added inline comments. Comment at: clang/unittests/AST/StructuralEquivalenceTest.cpp:1037 + "void foo(struct Param { int a; } *p);", Lang_C89); + EXPECT_TRUE(testStructuralMatch(Decls)); +} shafik wrote: > I expect this to be `false`

[PATCH] D113118: [clang][AST] Check context of record in structural equivalence.

2021-11-29 Thread Shafik Yaghmour via Phabricator via cfe-commits
shafik added inline comments. Comment at: clang/unittests/AST/StructuralEquivalenceTest.cpp:1037 + "void foo(struct Param { int a; } *p);", Lang_C89); + EXPECT_TRUE(testStructuralMatch(Decls)); +} I expect this to be `false` the outer `Param`

[PATCH] D113118: [clang][AST] Check context of record in structural equivalence.

2021-11-25 Thread Balázs Kéri via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG8e8658b19c05: [clang][AST] Check context of record in structural equivalence. (authored by balazske). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D113118/ne

[PATCH] D113118: [clang][AST] Check context of record in structural equivalence.

2021-11-25 Thread Balázs Kéri via Phabricator via cfe-commits
balazske updated this revision to Diff 389709. balazske added a comment. Using correct AST match in the tests to fix failures on Windows. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D113118/new/ https://reviews.llvm.org/D113118 Files: clang/lib

[PATCH] D113118: [clang][AST] Check context of record in structural equivalence.

2021-11-25 Thread Balázs Kéri via Phabricator via cfe-commits
balazske reopened this revision. balazske added a comment. This revision is now accepted and ready to land. Windows test failures occurred because wrong AST matchers in the tests. Tests will be updated to use named match. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https:

[PATCH] D113118: [clang][AST] Check context of record in structural equivalence.

2021-11-24 Thread Nico Weber via Phabricator via cfe-commits
thakis added a comment. Looks like this breaks tests on windows: http://45.33.8.238/win/49558/step_7.txt Please take a look and revert for now if it takes a while to fix. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D113118/new/ https://reviews.ll

[PATCH] D113118: [clang][AST] Check context of record in structural equivalence.

2021-11-24 Thread Balázs Kéri via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG6b96b2a0bf65: [clang][AST] Check context of record in structural equivalence. (authored by balazske). Repository: rG LLVM Github Monorepo CHANGES

[PATCH] D113118: [clang][AST] Check context of record in structural equivalence.

2021-11-23 Thread Gabor Marton via Phabricator via cfe-commits
martong accepted this revision. martong added a comment. Still LGTM! Let's land it! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D113118/new/ https://reviews.llvm.org/D113118 ___ cfe-commits mailing list

[PATCH] D113118: [clang][AST] Check context of record in structural equivalence.

2021-11-23 Thread Balázs Kéri via Phabricator via cfe-commits
balazske updated this revision to Diff 389111. balazske added a comment. Applied lint reformattings. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D113118/new/ https://reviews.llvm.org/D113118 Files: clang/lib/AST/ASTStructuralEquivalence.cpp c

[PATCH] D113118: [clang][AST] Check context of record in structural equivalence.

2021-11-19 Thread Gabor Marton via Phabricator via cfe-commits
martong accepted this revision. martong added a comment. This revision is now accepted and ready to land. Thanks @balazske for updating the tests, I think this addresses @shafik 's questions. LGTM! Ping @shafik Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.l

[PATCH] D113118: [clang][AST] Check context of record in structural equivalence.

2021-11-15 Thread Balázs Kéri via Phabricator via cfe-commits
balazske updated this revision to Diff 387181. balazske added a comment. Updated tests. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D113118/new/ https://reviews.llvm.org/D113118 Files: clang/lib/AST/ASTStructuralEquivalence.cpp clang/unittest

[PATCH] D113118: [clang][AST] Check context of record in structural equivalence.

2021-11-15 Thread Balázs Kéri via Phabricator via cfe-commits
balazske added a comment. In the last case the the RecordDecl's `a` and `b` can be matched (not internal statements in a function) and this is similar to the existing test cases. The `struct a` and `struct b` already fails to match because different name. Comment at: clang/li

[PATCH] D113118: [clang][AST] Check context of record in structural equivalence.

2021-11-05 Thread Shafik Yaghmour via Phabricator via cfe-commits
shafik added a comment. How does it handle this case: struct A {int x;}; struct A f(void) { struct A{} a; return a; and this case: struct b{}; struct a {int x;} // visible outside of f f(struct b {int x; } b1) { // not visibile out of f return (stru

[PATCH] D113118: [clang][AST] Check context of record in structural equivalence.

2021-11-04 Thread Balázs Benics via Phabricator via cfe-commits
steakhal added a comment. I very much like the code. L1364 is uncovered according to my coverage results. Comment at: clang/lib/AST/ASTStructuralEquivalence.cpp:1360-1364 +// Special case: We allow a struct defined in a function to be equivalent +// with a similar struc

[PATCH] D113118: [clang][AST] Check context of record in structural equivalence.

2021-11-03 Thread Balázs Kéri via Phabricator via cfe-commits
balazske created this revision. Herald added subscribers: steakhal, martong, gamesh411, Szelethus, dkrupp. balazske requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. The AST structural equivalence check did not differentiate between a struct