From: evans1629 Date: Sun, 10 Feb 2002 23:25:10 +0000 (+0000) Subject: Fixed bug with unrecognized files in #line commands. X-Git-Tag: splint-3_0_1_6~4 X-Git-Url: http://andersk.mit.edu/gitweb/splint.git/commitdiff_plain/ec579bb3346c12024f2f678b2e05144fa81dedc6 Fixed bug with unrecognized files in #line commands. --- diff --git a/src/cpperror.c b/src/cpperror.c index 14fcd8a..cd797ed 100644 --- a/src/cpperror.c +++ b/src/cpperror.c @@ -254,8 +254,15 @@ cppReader_getLoc (cppReader *pfile) cstring fname = ip->nominal_fname; fileId fid = fileTable_lookup (context_fileTable (), fname); - llassert (fileId_isValid (fid)); - + if (!fileId_isValid (fid)) + { + /* evans 2002-02-09 + ** filename used in #line comment is new + */ + + fid = fileTable_addFile (context_fileTable (), fname); + } + cppBuffer_lineAndColumn (ip, &line, &col); return fileloc_create (fid, line, col);