It is easy to evaluate $\int_{-\infty}^\infty x\cdot\exp(-x^2+ix)\,dx$ without using complex analysis, i.e.,
$\int_{-\infty}^\infty x\cdot\exp(-x^2+ix)\,dx=\exp(-\frac{1}{4})\int_{-\infty}^\infty x\cdot\exp(-(x-\frac{1}{2}i)^2)\,dx$ and then use substitution to get the answer $\exp(-\frac{1}{4})\frac{i}{2}\sqrt{\pi}$.
If we want to evaluate it using complex analysis, I know we need to construct a contour so that I can apply Cauchy integral formula (since there is no pole here so that we cannot use Residue theorem). However, I cannot find a contour and the functions to integrate on the complex plane so that the contour follows the part of the complex plane that describes the real-valued integral. Any suggestion or hint will be highly appreciated.