/*
-** LCLint - annotation-assisted static program checker
-** Copyright (C) 1994-2001 University of Virginia,
+** Splint - annotation-assisted static program checker
+** Copyright (C) 1994-2002 University of Virginia,
** Massachusetts Institute of Technology
**
** This program is free software; you can redistribute it and/or modify it
** the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
** MA 02111-1307, USA.
**
-** For information on lclint: lclint-request@cs.virginia.edu
-** To report a bug: lclint-bug@cs.virginia.edu
-** For more information: http://lclint.cs.virginia.edu
+** For information on splint: info@splint.org
+** To report a bug: splint-bug@splint.org
+** For more information: http://www.splint.org
*/
/*
** mtContextNode.c
*/
-# include "lclintMacros.nf"
+# include "splintMacros.nf"
# include "basic.h"
static bool mtContextNode_matchesType (mtContextNode, ctype) /*@*/ ;
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))
bool mtContextNode_matchesType (mtContextNode context, ctype ct)
{
DPRINTF (("Context type..."));
+ llassert (mtContextNode_isDefined (context));
if (!ctype_match (context->type, ct))
{
cstring mtContextNode_unparse (mtContextNode node)
{
+ llassert (mtContextNode_isDefined (node));
+
if (ctype_isKnown (node->type))
{
return message ("%s %s", mtContextKind_unparse (node->context),