[llvm-bugs] [Bug 37384] New: @catch (Class) causes assertion failure

via llvm-bugs llvm-bugs at lists.llvm.org
Tue May 8 15:19:25 PDT 2018


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

            Bug ID: 37384
           Summary: @catch (Class) causes assertion failure
           Product: clang
           Version: trunk
          Hardware: PC
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: LLVM Codegen
          Assignee: unassignedclangbugs at nondot.org
          Reporter: smeenai at fb.com
                CC: compnerd at compnerd.org, llvm-bugs at lists.llvm.org,
                    rjmccall at apple.com

% cat /tmp/catch.m
void f(void);
void g() {
  @try {
    f();
  } @catch (Class) {
  }
}

% clang -cc1 -triple arm64-apple-ios11.0.0 -fexceptions -fobjc-exceptions
-emit-llvm /tmp/catch.m
clang: ../../tools/clang/lib/CodeGen/CGObjCMac.cpp:7476: virtual llvm::Constant
*(anonymous namespace)::CGObjCNonFragileABIMac::GetEHType(clang::QualType):
Assertion `IT && "Invalid @catch type."' failed.

Does it make sense to catch a Class type? If not, it should be rejected in
Sema, right?

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20180508/6e77ca25/attachment.html>


More information about the llvm-bugs mailing list