[LLVMbugs] [Bug 13593] New: Assertion in getRawCommentForDeclNoCache with template, comment, excluded code and -Weverything

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Mon Aug 13 03:40:52 PDT 2012


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

             Bug #: 13593
           Summary: Assertion in getRawCommentForDeclNoCache with
                    template, comment, excluded code and -Weverything
           Product: clang
           Version: trunk
          Platform: Macintosh
        OS/Version: MacOS X
            Status: NEW
          Severity: normal
          Priority: P
         Component: C++
        AssignedTo: unassignedclangbugs at nondot.org
        ReportedBy: jonathan.sauer at gmx.de
                CC: dgregor at apple.com, gribozavr at gmail.com,
                    llvmbugs at cs.uiuc.edu
    Classification: Unclassified


Created attachment 9043
  --> http://llvm.org/bugs/attachment.cgi?id=9043
Log of clang run

The following code crashes clang r161746 with a failed assertion when using
-Weverything:

/**
 * Bla.
 */
template <typename>
void bla();


/// Foo

#if 0
void foo();
#endif

template <typename>
void bla()
{
}


This results in (full log attached):

% ~/LLVM/build/Release+Asserts/bin/clang++ -c -Weverything clang.cpp
Assertion failed: (DeclOrParsedComment.isNull()), function setDecl, file
/Users/rynnsauer/LLVM/llvm/tools/clang/lib/AST/../../include/clang/AST/RawCommentList.h,
line 66.


Removing the #if 0 ... #endif fixes the crash. Removing the "/// Foo" Doxygen
comment or making "bla" a non-templated function do so as well. Ditto removing
the Doxygen comment on the "bla" prototype or compiling without -Weverything.

-- 
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.



More information about the llvm-bugs mailing list