In this article, to enhance the communication quality of cognitive unmanned aerial vehicle networks (CUAVNs), we investigate the intelligent reflecting surface (IRS)-assisted CUAVNs, where a leading UAV (LUAV) is deployed for sensing spectrum and a group of following UAVs (FUAVs) transmit data to LUAV with the aid of IRS. Our objective is to maximize the achievable throughput of CUAVNs by jointly optimizing sensing duration, IRS passive beamforming, and LUAV's 3-D location, where LUAV's 3-D location is restricted by IRS, FUAVs, and primary user. For the IRS-assisted single FUAV case, the intractable nonconvex optimization problem is resolved into three subproblems, which are solved by utilizing the bisection search method, the closed-form expression of the optimal IRS phase shift matrix and the successive convex approximation method, respectively. Finally, an efficient alternating optimization algorithm is developed to obtain a high-quality suboptimal solution. By exploiting the solutions of single FUAV, we further propose the throughput weighted sum (TWS) algorithm to solve the intricate nonconvex problem in IRS-assisted multiple FUAVs case. To further reduce the complexity of TWS, the low-complexity location weighted sum (LWS) algorithm is proposed. Numerical results show that compared to the scheme without IRS assistance, the achievable throughput increases about 102% with the proposed single FUAV scheme, and over 88% with the proposed TWS-based multiple FUAVs scheme. Moreover, the performance gap between the low-complexity LWS and the TWS is less than 7%.