Fix wrong filename on include file errors, bug289

This commit is contained in:
Wilson Snyder
2010-09-28 09:33:59 -04:00
parent 16b0c8d353
commit d305a774f0
6 changed files with 53 additions and 7 deletions
+1 -1
View File
@@ -1359,7 +1359,7 @@ int V3PreProcImp::getFinalToken(string& buf) {
if (debug()>=5) fprintf(stderr,"%d: FIN: readjust, fin at %d request at %d\n",
m_lexp->m_tokFilelinep->lineno(),
m_finFilelinep->lineno(), m_lexp->m_tokFilelinep->lineno());
m_finFilelinep = m_finFilelinep->create(m_lexp->m_tokFilelinep->lineno());
m_finFilelinep = m_finFilelinep->create(m_lexp->m_tokFilelinep->filename(),m_lexp->m_tokFilelinep->lineno());
if (outBehind > 0 && outBehind <= (int)V3PreProc::NEWLINES_VS_TICKLINE) {
// Output stream is behind, send newlines to get back in sync
// (Most likely because we're completing a disabled `endif)