Created attachment 11311 [details] code, output, etc. Compile the attached ouch.cc with "clang++ --std=c++1y ouch.cc" (with "clang version 3.4 (trunk 191640)") and the following assertion fails: clang: /users/j3parker/src/llvm/tools/clang/lib/CodeGen/CGExpr.cpp:1984: clang::CodeGen::LValue clang::CodeGen::CodeGenFunction::EmitPredefinedLValue(const clang::PredefinedExpr *): Assertion `cast<ConstantArrayType (E->getType())->getSize() - 1 == FunctionName.size() && "Computed __func__ length differs from type!"' failed. However, if you change the name of the type "cat" to "lynx" (the feline, not the browser!) then the assertion will not fail. (See the included ouch2.cpp)
fyi. This appears to be an issue on the 3.5 trunk too (seen with a different codebase, but the same assert triggering). Is there an alternate clang assertion macro that can be used here to print the variables being compared along with the assertion message itself?
fyi. It looks like erik olofsson, points out the specific commit that introduces this issue: http://llvm-reviews.chandlerc.com/D1491#comment-7