HighCommander4 wrote:
The regression is caused by the additional of the following hunk to
`resolveExprToType()`:
```c++
if (const auto *CE = dyn_cast<CallExpr>(E)) {
if (QualType Resolved = resolveTypeOfCallExpr(CE); !Resolved.isNull())
return Resolved;
}
```
If we have a `CallExpr`, but `resolveTypeOfCallExpr()` fails to resolve a type
for it, we don't early-return but instead proceed to the rest of the function.
Later in the function we call `resolveExprToDecls()`, which will call
`resolveTypeOfCallExpr()` again (as part of calling `resolveTypeOfCallExpr()` +
`resolveTypeToTagDecl()`). So we end up calling `resolveTypeOfCallExpr()` twice
even though we know if won't produce a useful result.
As a result of this, a call to `resolveExprToDecls()` on an expression involved
chained function calls will do an amount of processing that's expontential in
the length of the chain.
Fix coming up.
https://github.com/llvm/llvm-project/pull/156282
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits