If I have pre.hpp containing: template<class T> void f(T); template<class T> void f(T); void g() { f(0); f('x'); } Then if I do: clang -cc1 pre.hpp -emit-pch -o pre.hpp.pch echo | clang -cc1 -include-pch pre.hpp.pch -x c++ - The second invocation results in: clang: DeclBase.cpp:199: clang::TranslationUnitDecl* clang::Decl::getTranslationUnitDecl(): Assertion `DC && "This decl is not contained in a translation unit!"' failed. I'm using Clang r113729.
Fixed at r113744, thanks for the report!