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

            Bug ID: 27587
           Summary: Exceptions are not catched
           Product: clang
           Version: 3.7
          Hardware: PC
                OS: Windows XP
            Status: NEW
          Severity: normal
          Priority: P
         Component: C++
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected], [email protected]
    Classification: Unclassified

Created attachment 16286
  --> https://llvm.org/bugs/attachment.cgi?id=16286&action=edit
small project, 5 files

I create an object (constructor), which creates an object. Then calls a
function on the object "GetObject", which only throws an exception.
I cannot catch it, neither in object nor in main.

This is only reproducible in this exact way (see attached files).
G++ compiles and catches it fine. If I only use one header file it seems to
work aswell. If I inline the function it works also. But not this way.

Then there is #include <windows.h>, which might be related. It is //commented
right now, like this, it compiles fine, but the catch doesn't work.

If I un-comment it, it doesn't compile, it gives a "undefined reference to
'LoadJson::GetObjectA()' error.
The name of the function is "GetObject()".. without A.

I'm quite new to c++, let me know, if this is not supposed to work like this.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
[email protected]
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to