]> andersk Git - splint.git/commitdiff
Fixed bug with unrecognized files in #line commands.
authorevans1629 <evans1629>
Sun, 10 Feb 2002 23:25:10 +0000 (23:25 +0000)
committerevans1629 <evans1629>
Sun, 10 Feb 2002 23:25:10 +0000 (23:25 +0000)
src/cpperror.c

index 14fcd8a1de0b23e6b8762f7530446370fd625cba..cd797ed6092e1aebf3f18d82be9a46597b1c6534 100644 (file)
@@ -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);
This page took 0.030869 seconds and 5 git commands to generate.