https://llvm.org/bugs/show_bug.cgi?id=23005

            Bug ID: 23005
           Summary: typo-correction crash-on-invalid when trying to call a
                    static method on a class that hasn't been defined
           Product: clang
           Version: trunk
          Hardware: PC
                OS: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: -New Bugs
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected]
    Classification: Unclassified

Created attachment 14092
  --> https://llvm.org/bugs/attachment.cgi?id=14092&action=edit
reproducer

The following program crashes on shutdown:

  void f() { X a = X::b(c); }

Like so:

  crash-in-typo-correction.cpp:5:3: error: unknown type name 'X'
    X a = X::b(c);
    ^
  crash-in-typo-correction.cpp:5:9: error: use of undeclared identifier 'X'
    X a = X::b(c);
          ^
  Assertion failed: (DelayedTypos.empty() && "Uncorrected typos!"), function
~Sema, file llvm/tools/clang/lib/Sema/Sema.cpp, line 273.

Build it with -cc1, because the error doesn't occur without -disable-free. I've
attached a lit-style reproducer.

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