Steady planar flow of the upper convected Maxwell (UCM) fluid is described for re–entrant corners with angles 180°/α, where ½ ⩽ α < 1. Local to the corner we consider a class of similarity solutions associated with the inviscid flow equations which arise from the dominance of the upper convective stress derivative in the constitutive equations. These solutions, first noted by Hinch, hold in an outer (core–flow) region and give stress singularities of O(r−2(1−α)) (with r the radial distance from the corner) and a stream function behaviour of O(rnα). Here n is a parameter defining distinct solutions within this similarity class. We match such solutions to wall boundary layers, in which viscometric behaviour is retrieved. We discuss two types of boundary–layer structure. The first is a single–layer structure, previously noted by Renardy. This single layer occurs for n = 3 − α and has the viscoelastic balance of the constitutive equations holding uniformly within it. Here we complete previous analysis by considering the downstream case. The second type of boundary layer considered is a double–layer structure, which we discuss for the range 1 < n < 3 − α. Now the elastic balance of the constitutive equations holds within its main region, with a thinner region closer to the wall in which the relaxation terms are recovered. This structure extends the range of the core similarity solutions and has not been previously noted.