]> andersk Git - splint.git/blobdiff - src/mtContextNode.c
Fixed line numbering when multi-line macro parameters are used.
[splint.git] / src / mtContextNode.c
index ba307dae9ef109e64bcc0a7a7142ecd553c0c1e7..4cc6e9ed2faf930836e01a783a18156beb54e2c9 100644 (file)
@@ -184,7 +184,8 @@ bool mtContextNode_matchesRef (mtContextNode context, sRef sr)
 
 bool mtContextNode_matchesRefStrict (mtContextNode context, sRef s)
 {
-  if (mtContextNode_matchesRef (context, s))
+  if (mtContextNode_isDefined (context)
+      && mtContextNode_matchesRef (context, s))
     {
       if (ctype_isKnown (context->type) 
          && (ctype_isUnknown (sRef_getType (s))
@@ -204,6 +205,7 @@ bool mtContextNode_matchesRefStrict (mtContextNode context, sRef s)
 bool mtContextNode_matchesType (mtContextNode context, ctype ct)
 {
   DPRINTF (("Context type..."));
+  llassert (mtContextNode_isDefined (context));
   
   if (!ctype_match (context->type, ct))
     {
@@ -230,6 +232,8 @@ bool mtContextNode_matchesType (mtContextNode context, ctype ct)
 
 cstring mtContextNode_unparse (mtContextNode node)
 {
+  llassert (mtContextNode_isDefined (node));
+
   if (ctype_isKnown (node->type))
     {
       return message ("%s %s", mtContextKind_unparse (node->context),
This page took 0.058649 seconds and 4 git commands to generate.