[all-commits] [llvm/llvm-project] 9ca1a0: [clang][ASTImporter] Improve structural equivalenc...
Balázs Kéri via All-commits
all-commits at lists.llvm.org
Thu Jan 18 00:20:17 PST 2024
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 9ca1a08144a3caea8fd2f45fd4930ca796cf4166
https://github.com/llvm/llvm-project/commit/9ca1a08144a3caea8fd2f45fd4930ca796cf4166
Author: Balázs Kéri <balazs.keri at ericsson.com>
Date: 2024-01-18 (Thu, 18 Jan 2024)
Changed paths:
M clang/lib/AST/ASTStructuralEquivalence.cpp
M clang/unittests/AST/StructuralEquivalenceTest.cpp
Log Message:
-----------
[clang][ASTImporter] Improve structural equivalence of overloadable operators. (#72242)
Operators that are overloadable may be parsed as `CXXOperatorCallExpr`
or as `UnaryOperator` (or `BinaryOperator`). This depends on the context
and can be different if a similar construct is imported into an existing
AST. The two "forms" of the operator call AST nodes should be detected
as equivalent to allow AST import of these cases.
This fix has probably other consequences because if a structure is
imported that has `CXXOperatorCallExpr` into an AST with an existing
similar structure that has `UnaryOperator` (or binary), the additional
data in the `CXXOperatorCallExpr` node is lost at the import (because
the existing node will be used). I am not sure if this can cause
problems.
More information about the All-commits
mailing list