[clang][AST] Check context of record in structural equivalence.
authorBalázs Kéri <1.int32@gmail.com>
Thu, 25 Nov 2021 14:55:35 +0000 (15:55 +0100)
committerBalázs Kéri <1.int32@gmail.com>
Fri, 26 Nov 2021 07:54:34 +0000 (08:54 +0100)
commit8e8658b19c057a48264514483f188bf7b6c2db7d
treeb082e2af0fdcd4aaa108dc66ef569bdbeab7738e
parentc47108c0414624811684afc8d84697d434219f8c
[clang][AST] Check context of record in structural equivalence.

The AST structural equivalence check did not differentiate between
a struct and a struct with same name in different namespace. When
type of a member is checked it is possible to encounter such a case
and wrongly decide that the types are similar. This problem is fixed
by check for the namespaces of a record declaration.

Reviewed By: martong

Differential Revision: https://reviews.llvm.org/D113118
clang/lib/AST/ASTStructuralEquivalence.cpp
clang/unittests/AST/StructuralEquivalenceTest.cpp