AmrDeveloper wrote:
I was thinking of a utility or helper function to getComplexElementType because
we have in many places casting type to complex directly without checking if it
has an AtomicType wrapper, for example
```c++
ComplexPairTy ComplexExprEmitter::EmitComplexToComplexCast(ComplexPairTy Val,
QualType SrcType,
QualType DestType,
SourceLocation Loc) {
// Get the src/dest element type.
SrcType = SrcType->castAs<ComplexType>()->getElementType();
DestType = DestType->castAs<ComplexType>()->getElementType();
```
https://github.com/llvm/llvm-project/pull/172163
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits