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

            Bug ID: 20962
           Summary: crash on bad default argument
           Product: clang
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: C++
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected], [email protected]
    Classification: Unclassified

This causes clang to crash:

template<typename T> struct S { void f(int k = g(k)()); };
void x() { S<int>().f(); }


The interesting part of the backtrace:

7  clang-3.5       0x0000000003645f04
clang::Sema::CheckImplicitConversions(clang::Expr*, clang::SourceLocation) +
132
8  clang-3.5       0x0000000003646812
clang::Sema::CheckCompletedExpr(clang::Expr*, clang::SourceLocation, bool) + 66
9  clang-3.5       0x000000000382b215
clang::Sema::BuildCXXDefaultArgExpr(clang::SourceLocation,
clang::FunctionDecl*, clang::ParmVarDecl*) + 1253

We're presumably calling CheckCompletedExpr on a null expression.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs

Reply via email to