Index: SemaDecl.cpp =================================================================== --- SemaDecl.cpp +++ SemaDecl.cpp @@ -2033,6 +2033,12 @@ if (getLangOpts().Modules || getLangOpts().C11) return; + // Added isImplicit() check (bug 25404) to avoid + // assert(Loc.isValid() && "Can't get file characteristic of invalid loc!"); + if (Old->isImplicit() || New->isImplicit()) { + return; + } + // If we have a redefinition of a typedef in C, emit a warning. This warning // is normally mapped to an error, but can be controlled with // -Wtypedef-redefinition. If either the original or the redefinition is