From your photos that you submitted the clematis looks like it may have been subject to the leaf spot disease caused by the fungus Phoma. Leaf spots form on leaves but when infection grows down the petiole into the stem the fungus can cause a stem canker that leads to a wilt and dieback of the plant known as clematis wilt.
Ensure good air movement around clematis stems and remove leaves showing fungal leaf spots. If the wilt is localized, prune out back to healthy tissue. Good garden sanitation helps.
This will not kill the plant but you may have the same issue next season.
If you replant, look for clematis varieties that are resistant to clematis wilt.