Global Navigation Satellite System (GNSS) is essential for autonomous driving by providing absolute positioning solutions. However, the performance of GNSS measurement is significantly degraded in urban areas, due to the severe multipath and non-line-of-sight (NLOS) effects. To ensure the operation safety of autonomous driving applications, the GNSS localization performance is required to improve. In this study, a novel vehicle-to-vehicle (V2V) based cooperative localization algorithm with double-layers of consistency check (CC) is developed. GNSS pseudorange measurements of the ego-vehicle and surrounding vehicles conduct the first-layer of CC independently to exclude the multipath-biased measurement and obtaining their absolute positions. Then, the survived GNSS measurement and the absolute positions of each vehicles are shared in between, and further applied with double difference (DD) technique to obtain an accurate relative position between the surrounding vehicles. The second-layer CC is conducted during the GNSS DD-based relative positioning, to exclude the multipath and NLOS effects more comprehensively. Finally, the absolute and relative positions of surrounding vehicles are cooperated to optimize the final position of all participating vehicles. By the both simulation and real experimental results, the proposed algorithm is able to mitigate the multipath effect and significantly improve the accuracy of GNSS localization solutions to fulfill the safety requirements for autonomous driving.