]> andersk Git - splint.git/blobdiff - src/cscanner.l
*** empty log message ***
[splint.git] / src / cscanner.l
index 66405dbef74315b8c27c8c1d9f2480ba7809b39e..0038eaa456428b0a5798ea814cdbbaf60302a820 100644 (file)
@@ -1239,7 +1239,6 @@ static bool processMacro (void)
       e2 = usymtab_lookupExpose (fname);
       ct = uentry_getType (e2);
 
-      
       if (uentry_isCodeDefined (e2) 
          && fileloc_isUser (uentry_whereDefined (e2)))
        {
@@ -1523,6 +1522,7 @@ static bool processMacro (void)
              && !uentry_isElipsisMarker (uentryList_getN 
                                          (specparams, paramno)))
            {
+             fileloc sloc = context_getSaveLocation ();
              uentry decl = uentryList_getN (specparams, paramno);
              sRef sr;
              
@@ -1530,7 +1530,7 @@ static bool processMacro (void)
 
                              
              uentry_setParam (param);
-             sr = sRef_makeParam (paramno, uentry_getType (param));
+             sr = sRef_makeParam (paramno, uentry_getType (param), stateInfo_makeLoc (sloc));
 
              if (sRef_getNullState (sr) == NS_ABSNULL)
                {
@@ -1547,12 +1547,12 @@ static bool processMacro (void)
                    }
                  else
                    {
-                     sRef_setNullState (sr, NS_UNKNOWN, g_currentloc);
+                     sRef_setNullState (sr, NS_UNKNOWN, sloc);
                    }
                }
 
              uentry_setSref (param, sr);
-             uentry_setDeclaredForceOnly (param, context_getSaveLocation ());
+             uentry_setDeclaredForceOnly (param, sloc);
 
              skipparam = isiter && uentry_isOut (uentryList_getN (specparams, paramno));
            }
@@ -1561,11 +1561,11 @@ static bool processMacro (void)
              fileloc sloc = context_getSaveLocation ();
 
              param = uentry_makeVariableSrefParam 
-               (paramname, ctype_unknown, sRef_makeParam (paramno, ctype_unknown));
+               (paramname, ctype_unknown, fileloc_copy (sloc), 
+                sRef_makeParam (paramno, ctype_unknown, stateInfo_makeLoc (sloc)));
              cstring_free (paramname);
 
              sRef_setPosNull  (uentry_getSref (param), sloc);
-
              uentry_setDeclaredForce (param, sloc);
 
              skipparam = FALSE;
@@ -1819,7 +1819,11 @@ static bool handleSpecial (char *yyt)
       
       if (!(fileId_isValid (fid)))
        {
-         if (isHeaderFile (fname))
+         if (context_inXHFile ())
+           {
+             fid = fileTable_addXHFile (context_fileTable (), fname);
+           }
+         else if (isHeaderFile (fname))
            {
              fid = fileTable_addHeaderFile (context_fileTable (), fname);
            }
@@ -2492,8 +2496,10 @@ static int processIdentifier (cstring id)
 {
   uentry le;
 
-  DPRINTF (("Process identifier: %s / %s / %s", id, fileloc_unparse (g_currentloc),
-           bool_unparse (context_inFunctionHeader ())));
+  if (context_getFlag (FLG_GRAMMAR))
+    {
+      lldiagmsg (message ("Process identifier: %s", id));
+    }
 
   context_clearJustPopped ();
   lastidprocessed = id; 
This page took 1.116064 seconds and 4 git commands to generate.