[LLVMbugs] [Bug 21254] New: Assertion in CommentParser.cpp with -Wdocumentation

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Sun Oct 12 22:55:48 PDT 2014


http://llvm.org/bugs/show_bug.cgi?id=21254

            Bug ID: 21254
           Summary: Assertion in CommentParser.cpp with -Wdocumentation
           Product: clang
           Version: unspecified
          Hardware: PC
                OS: Windows NT
            Status: NEW
          Severity: normal
          Priority: P
         Component: Frontend
          Assignee: unassignedclangbugs at nondot.org
          Reporter: warren_ristow at playstation.sony.com
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified

The test-case, "test.c" appended below, hits an assertion-failure when
'-Weverything' is used (more specifically, it's the warning '-Wdocumentation'
that needs to be enabled to cause the assertion-failure.)

Appears to happen irrespective of which target is specified or other switches
(e.g., -O<n>, -g, etc.)  Tested with:

  $ clang --version
  clang version 3.6.0 (trunk 219524)
  Target: x86_64-unknown-linux-gnu
  Thread model: posix
  $ clang -c -Wdocumentation test.c
  test.c:30:27: warning: unknown command tag name 'in'; did you mean 'fn'?
[-Wdocumentation]
 * @inlen:  the length of @in
                          ^~~
                           fn
  clang: ..../llvm/tools/clang/lib/AST/CommentParser.cpp:595:
        clang::comments::BlockContentComment*
                clang::comments::Parser::parseParagraphOrBlockCommand():
                        Assertion `Info->IsInlineCommand' failed.
    ...
  $

"test.c" below
____________________________________________________________

// ============================================================================
/**
 * @size:  the size requested in bytes
 * @str: a zero terminated string
 * @systemId: The system ID of the entity
 * @atts:  An array of name/value attributes pairs, NULL terminated
 * @target:  the target name
 * @value:  the comment content
 * @URL: The System ID of the resource requested
 * @ID: The Public ID of the resource requested
 * @userData:  user provided data for the error callback
 * @data0: the first data
 * @data1: the second data
 * @user: extra user provided data to the walker
 * @SystemID:  the SYSTEM ID (e.g. filename or URL)
 * @ExternalID:  the external ID
 * @publicId: The public ID of the entity
 * @fullname:  the attribute name
 * @type:  the attribute type
 * @defaultValue: the attribute default value
 * @tree:  the tree of enumerated value set
 * @notationName: the name of the notation
 * @loc: A SAX Locator
 * @ctx:  an XML parser context
 * @URI:  the element namespace name if available
 * @attributes:  pointer to the array of (localname/prefix/URI/value/end)
 * @localname:  the local name of the element
 * @prefix:  the element namespace prefix if available
 * @outlen:  the length of @out
 * @inlen:  the length of @in
 * @filename: the filename or URI
 * @buffer:  the buffer to store data read
 * @len:  the length of the buffer in bytes
 * @context:  an Output context
 * @role:  the role string
 * @nbLocators: the number of locators detected on the link
 * @roles:  pointer to the array of locator roles
 * @nbArcs: the number of arcs detected on the link
 * @from:  pointer to the array of source roles found on the arcs
 * @to:  pointer to the array of target roles found on the arcs
 * @show:  array of values for the show attributes found on the arcs
 * @actuate:  array of values for the actuate attributes found on the arcs
 * @nbTitles: the number of titles detected on the link
 * @title:  array of titles detected on the link
 * @langs:  array of xml:lang values for the titles
 * @hrefs:  pointer to the array of locator hrefs
 * @ent: the entity
 * @firstNode:  the fist node in the chunk
 * @lastNode:  the last nod in the chunk
 * @localName: the local name
 * Returns the localName if @namespaceName is NULL, a formatted
 * @pc: the type of processContents
 * @retValue: the returned value
 * @ws: the whitespace type of the value
 * @itemName: the name of the item
 * @itemNode: the node of the item
 * @local: the local name
 * @parsing: if the function is used during the parse
 * @extra:  extra informations
 * @str2: extra data
 * @strData1: extra data
 * @strData2: extra data
 * @strData3: extra data
 * @str3:  extra parameter for the message display
 * @str4:  extra parameter for the message display
 * @ctxt: the schema validation context
 * @ownerName: the name of the owner
 * @refName: the referenced local name
 * @refURI: the referenced namespace URI
 * @attr: the illegal attribute node
 * @ownerDes: the designation of the attribute's owner
 * @itemElem: the node of the schema item
 * @message: the error message
 * @str1: an optional param for the error message
 * @error: the error code
 * @itemDes: the designation of the schema type
 * @facet: the illegal facet
 * @elemDes: the designation of the parent element node
 * @onwerDes: the designation of the holder of the content
 * @ownerElem: the node of the holder of the content
 * @child: the invalid child node
 * @content: the optional string describing the correct content
 * @use:  an attribute use
 * @prohib:  an attribute use prohibition
 * @wildcard:  a wildcard structure
 * @alink: a type link
 * @idc: a identity-constraint definition
 * @elem:  an element
 * @depth: the depth used for intentation
 * @uses:  attribute uses list
 * @output:  the file output
 * a namespace URI of @uri.
 * @ns:  the target namespace of the attribute
 * @nsName:  the target namespace
 * @min: the minOccurs
 * @max: the maxOccurs
 * @pctxt:  a schema parser context
 * @head:  the head of the substitution group
 * @member: the new member of the substitution group
 * @ownerItem: the schema object owner if existent
 * @wildc:  the wildcard, already created
 * @schema:  the schema being built
 * @flagQualified: the specific flag for "qualified"
 * @flags: the flags to be modified
 * @flagAll: the specific flag for "#all"
 * @flagExtension: the specific flag for "extension"
 * @flagRestriction: the specific flag for "restriction"
 * @flagSubstitution: the specific flag for "substitution"
 * @flagList: the specific flag for "list"
 * @flagUnion: the specific flag for "union"
 * @item: the schema component
 * @annot: the annotation
 * @node:  a subtree containing XML Schema informations
 * @topLevel: indicates if this is global declaration
 * @nodes:  the list of top level nodes
 * @dict: the dictionary to be used
 *         @schemaLocation, NULL otherwise.
 * @final: the final
 * @particle: the particle
 * @actxt: a context
 * @baseType:  the base type definition
 * @subset: the subset of ('restriction', ect.)
 * @ancestor: an ancestor of @ctxtType
 * @typeDecl:  the schema type definition
 * @ctxtMGroup: the searched model group
 * @selfMGroup: the second searched model group
 * @mg:  the model group
 * @ctxtGr: the searched attribute group
 * @list: the attribute uses
 * and returned via the @prohibs list.
 * @attrGr:  the attribute group definition
 * @attrgrpDecl:  the schema attribute definition
 * @decl: the element declaration
 * @err:  the error callback
 * @warn:  the warning callback
 * @serror:  the structured error function
 * @vctxt:  a schema validation context
 * @location: the location of the schema
 * @idcDef: the IDC definition
 * @idcDef: the IDC definition of this binding
 */
void foo(){}
// ============================================================================

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20141013/661bfba4/attachment.html>


More information about the llvm-bugs mailing list