[LLVMbugs] [Bug 14518] New: assert (because of __func__) gives a warning on file scope lambda expression

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Wed Dec 5 10:15:46 PST 2012


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

             Bug #: 14518
           Summary: assert (because of __func__) gives a warning on file
                    scope lambda expression
           Product: clang
           Version: 3.2
          Platform: Macintosh
        OS/Version: All
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: C++11
        AssignedTo: unassignedclangbugs at nondot.org
        ReportedBy: drlaz at me.com
                CC: dgregor at apple.com, llvmbugs at cs.uiuc.edu
    Classification: Unclassified


Simplified version.

static std::function<int(int)> foo = [](int n) { assert(false); return 0; };

__func__ isn't defined at this level so the expansion of the assertion macro
gives a warning about "Predefined identifier only valid inside function". It
might be a little much to ask __func__ to expand to foo, but at least it could
expand to "<lambda>"?!

-- 
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