This is the form of the Itō–Tanaka formula I have (Revuz and Yor): For $f$ a convex function and $X$ a continuous semimartingale,
$$f(X_t)=f(X_0) +\int_0^tf_{-}'(X_s)dX_s+\frac{1}{2}\int_{\mathbb{R}}L_t^a f''(da).$$
What confuses me is how to make sense of $f''$ or rather how to make sense of the second integral. I don't know much functional analysis, but I believe that this 'second derivative' is to be interpreted as a distribution. In which case $\int_{\mathbb{R}}L_t^a f''(da)$ really means $f''(L_t^a)$, where $f''$ is a distribution. But, what's to say $L_t^a$ is a suitable test function?
As this question received no answer by real experts, let me dare to write an answer by a non expert :
If f is a convex function, its second derivative is always a very special type of distribution : it is a positive measure. So the second derivative can be integrated against any continuous function with compact support. The local time can be defined so as to be continous in the space variable at fixed time (this in nontrivial, but in fact even more is true ; in fact the local time can be taken to be continuous in both the time an space variable). Moreover, for fixed time, the local time has compact support in space with probability one. Thus the second integral in the generalized Itô formula makes sense.