Context. Detailed chemical abundance studies have revealed different trends between samples of planet and non-planet hosts. Whether these trends are related to the presence of planets or not is strongly debated. At the same time, tentative evidence that the properties of evolved stars with planets may be different from what we know for main-sequence hosts has recently been reported. Aims. We aim to test whether evolved stars with planets show any chemical peculiarity that could be related to the planet formation process. Methods. In a consistent way, we determine the metallicity and individual abundances of a large sample of evolved (subgiants and red giants) and main-sequence stars that are with and without known planetary companions, and discuss their metallicity distribution and trends. Our methodology is based on the analysis of high-resolution échelle spectra (R 57 000) from 2−3 m class telescopes. It includes the calculation of the fundamental stellar parameters, as well as individual abundances of C, O , Na, Mg, Al, Si, S, Ca, Sc, Ti, V, Cr, Mn, Co, Ni, and Zn. Results. No differences in the [X/Fe] vs. condensation temperature (T C ) slopes are found between the samples of planet and nonplanet hosts when all elements are considered. However, if the analysis is restricted to only refractory elements, differences in the T C -slopes between stars with and without known planets are found. This result is found to be dependent on the stellar evolutionary stage, as it holds for main-sequence and subgiant stars, while there seems to be no difference between planet and non-planet hosts among the sample of giants. A search for correlations between the T C -slope and the stellar properties reveals significant correlations with the stellar mass and the stellar age. The data also suggest that differences in terms of mass and age between main-sequence planet and non-planet hosts may be present. Conclusions. Our results are well explained by radial mixing in the Galaxy. The sample of giants contains stars that are more massive and younger than their main-sequence counterparts. This leads to a sample of stars that are possibly less contaminated by stars that were not born in the solar neighbourhood, leading to no chemical differences between planet and non-planet hosts. The sample of main-sequence stars may contain more stars from the outer disc (specially the non-planet host sample) which might lead to the differences observed in the chemical trends.