The tests in TestObjCBuiltinTypes.py were compiled as C++ which didn't properly define the builtin ObjC type 'id' and caused the DWARF to claim the language was C++ instead of ObjC. As a result, when the language in lldb is set to C++ as read from the DWARF, the test would fail. This fix is a prerequisite to recognizing the language from the DWARF and setting the compiler options accordingly.
This looks like it's actually testing the wrong thing… the point is that the expression parser is in ObjC++ mode at all times and we want to make sure that we aren't misinterpreting something that happens to have the name "id" from C++ as something that's an ObjC id.
I'm concerned about the implicit suggestion that we not be in ObjC++ mode at all times. Specifically, it should be possible to run [NSApplication sharedApplication] wherever I'm stopped in an app. I would only want to turn the ObjC parts completely off if there were no Objective-C at all in the program; is this something we're planning on checking?
BTW, the reverse (no C++ if you're not in C++ mode) is going to be a lot trickier because the expression parser uses reference types internally.
I'm concerned about the implicit suggestion that we not be in ObjC++ mode at all times.
I ran into this when I wanted to have the default language be that of the selected frame, but folks prefer an option for that, so this test case will still work as is.
Thanks for your review.