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
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`
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`
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
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
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:
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
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
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
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
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
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
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
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
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
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
16 matches
Mail list logo