<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Hi Sean,<div>This commit is causing failures on our internal build bots.</div><div><pre style="font-family: 'Courier New', courier, monotype; "><span style="font-family: Helvetica; white-space: normal; ">Looks like you fixed the ObjC version, but not the ObjCXX.</span></pre><pre><span class="stdout"><div style="font-family: 'Courier New', courier, monotype; ">******************** TEST 'Clang :: SemaObjCXX/unknown-anytype.mm' FAILED ********************Script:</div></span></pre><pre style="font-family: 'Courier New', courier, monotype; "><span class="stdout">--
Exit Code: 1
Command Output (stderr):
--
error: 'error' diagnostics seen but not expected: 
  Line 7: no known method '-foo'; cast the message send to the method's return type
1 error generated.
--

********************</span></pre><pre><font face="Helvetica"><span style="white-space: normal;">You have no verifier checks for this new test case.  You're also running the test 3 times, which isn't necessary.</span></font></pre><pre><span style="font-family: 'Courier New', courier, monotype; ">******************** TEST 'Clang :: SemaObjC/debugger-cast-result-to-id.m' FAILED ********************Script:</span></pre><div><pre style="font-family: 'Courier New', courier, monotype; "><span class="stdout">--
Exit Code: 1
Command Output (stderr):
--
error: 'error' diagnostics seen but not expected: 
  Line 12: redefinition of 'test0' with a different type
  Line 13: conflicting types for 'test1'
  Line 15: redefinition of 'test_unknown_anytype_receiver'
  Line 21: redefinition of 'test0' with a different type
  Line 22: conflicting types for 'test1'
  Line 24: redefinition of 'test_unknown_anytype_receiver'
error: 'note' diagnostics seen but not expected: 
  Line 3: previous definition is here
  Line 4: previous declaration is here
  Line 6: previous definition is here
  Line 3: previous definition is here
  Line 4: previous declaration is here
  Line 15: previous definition is here
12 errors generated.
--

********************
</span></pre></div></div><div><span class="stdout"> Chad</span></div><div><br><div><div>On Feb 3, 2012, at 5:29 PM, Sean Callanan <<a href="mailto:scallanan@apple.com">scallanan@apple.com</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div>Author: spyffe<br>Date: Fri Feb  3 19:29:37 2012<br>New Revision: 149735<br><br>URL: <a href="http://llvm.org/viewvc/llvm-project?rev=149735&view=rev">http://llvm.org/viewvc/llvm-project?rev=149735&view=rev</a><br>Log:<br>Clang has existing support for debuggers that<br>want to provide "po"-like functionality which<br>treats the result of an expression implicitly as<br>"id" (if it is not otherwise known) and prints<br>it as an Objective-C object.<br><br>This has in the past been gated by the<br>"DebuggerSupport" language option, but that is<br>too general.  Debuggers also provide other commands<br>like "print" that do not make any assumptions<br>about whether the object is an Objective-C object.<br><br>This patch makes the assumption conditional on a<br>new language option: DebuggerCastResultToId.  I<br>have also made corresponding modifications to the<br>testsuite.<br><br>Added:<br>    cfe/trunk/test/SemaObjC/debugger-cast-result-to-id.m<br>Modified:<br>    cfe/trunk/include/clang/Basic/LangOptions.def<br>    cfe/trunk/include/clang/Driver/CC1Options.td<br>    cfe/trunk/lib/Frontend/CompilerInvocation.cpp<br>    cfe/trunk/lib/Sema/SemaExprCXX.cpp<br>    cfe/trunk/test/SemaObjC/unknown-anytype.m<br><br>Modified: cfe/trunk/include/clang/Basic/LangOptions.def<br>URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Basic/LangOptions.def?rev=149735&r1=149734&r2=149735&view=diff">http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Basic/LangOptions.def?rev=149735&r1=149734&r2=149735&view=diff</a><br>==============================================================================<br>--- cfe/trunk/include/clang/Basic/LangOptions.def (original)<br>+++ cfe/trunk/include/clang/Basic/LangOptions.def Fri Feb  3 19:29:37 2012<br>@@ -123,6 +123,7 @@<br> BENIGN_LANGOPT(InlineVisibilityHidden , 1, 0, "hidden default visibility for inline C++ methods")<br> BENIGN_LANGOPT(ParseUnknownAnytype, 1, 0, "__unknown_anytype")<br> BENIGN_LANGOPT(DebuggerSupport , 1, 0, "debugger support")<br>+BENIGN_LANGOPT(DebuggerCastResultToId, 1, 0, "for 'po' in the debugger, cast the result to id if it is of unknown type")<br> BENIGN_LANGOPT(AddressSanitizer , 1, 0, "AddressSanitizer enabled")<br><br> BENIGN_LANGOPT(SpellChecking , 1, 1, "spell-checking")<br><br>Modified: cfe/trunk/include/clang/Driver/CC1Options.td<br>URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Driver/CC1Options.td?rev=149735&r1=149734&r2=149735&view=diff">http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Driver/CC1Options.td?rev=149735&r1=149734&r2=149735&view=diff</a><br>==============================================================================<br>--- cfe/trunk/include/clang/Driver/CC1Options.td (original)<br>+++ cfe/trunk/include/clang/Driver/CC1Options.td Fri Feb  3 19:29:37 2012<br>@@ -651,6 +651,8 @@<br>   HelpText<"Enable parser support for the __unknown_anytype type; for testing purposes only">;<br> def fdebugger_support : Flag<"-fdebugger-support">,<br>   HelpText<"Enable special debugger support behavior">;<br>+def fdebugger_cast_result_to_id : Flag<"-fdebugger-cast-result-to-id">,<br>+  HelpText<"Enable casting unknown expression results to id">;<br> def fdeprecated_macro : Flag<"-fdeprecated-macro">,<br>   HelpText<"Defines the __DEPRECATED macro">;<br> def fno_deprecated_macro : Flag<"-fno-deprecated-macro">,<br><br>Modified: cfe/trunk/lib/Frontend/CompilerInvocation.cpp<br>URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Frontend/CompilerInvocation.cpp?rev=149735&r1=149734&r2=149735&view=diff">http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Frontend/CompilerInvocation.cpp?rev=149735&r1=149734&r2=149735&view=diff</a><br>==============================================================================<br>--- cfe/trunk/lib/Frontend/CompilerInvocation.cpp (original)<br>+++ cfe/trunk/lib/Frontend/CompilerInvocation.cpp Fri Feb  3 19:29:37 2012<br>@@ -826,6 +826,8 @@<br>     Res.push_back("-funknown-anytype");<br>   if (Opts.DebuggerSupport)<br>     Res.push_back("-fdebugger-support");<br>+  if (Opts.DebuggerCastResultToId)<br>+    Res.push_back("-fdebugger-cast-result-to-id");<br>   if (Opts.DelayedTemplateParsing)<br>     Res.push_back("-fdelayed-template-parsing");<br>   if (Opts.Deprecated)<br>@@ -1885,6 +1887,7 @@<br>   Opts.FakeAddressSpaceMap = Args.hasArg(OPT_ffake_address_space_map);<br>   Opts.ParseUnknownAnytype = Args.hasArg(OPT_funknown_anytype);<br>   Opts.DebuggerSupport = Args.hasArg(OPT_fdebugger_support);<br>+  Opts.DebuggerCastResultToId = Args.hasArg(OPT_fdebugger_cast_result_to_id);<br>   Opts.AddressSanitizer = Args.hasArg(OPT_faddress_sanitizer);<br>   Opts.ApplePragmaPack = Args.hasArg(OPT_fapple_pragma_pack);<br>   Opts.CurrentModule = Args.getLastArgValue(OPT_fmodule_name);<br><br>Modified: cfe/trunk/lib/Sema/SemaExprCXX.cpp<br>URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaExprCXX.cpp?rev=149735&r1=149734&r2=149735&view=diff">http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaExprCXX.cpp?rev=149735&r1=149734&r2=149735&view=diff</a><br>==============================================================================<br>--- cfe/trunk/lib/Sema/SemaExprCXX.cpp (original)<br>+++ cfe/trunk/lib/Sema/SemaExprCXX.cpp Fri Feb  3 19:29:37 2012<br>@@ -4767,7 +4767,7 @@<br>     return ExprError();<br><br>   // Top-level message sends default to 'id' when we're in a debugger.<br>-  if (getLangOptions().DebuggerSupport &&<br>+  if (getLangOptions().DebuggerCastResultToId &&<br>       FullExpr.get()->getType() == Context.UnknownAnyTy &&<br>       isa<ObjCMessageExpr>(FullExpr.get())) {<br>     FullExpr = forceUnknownAnyToType(FullExpr.take(), Context.getObjCIdType());<br><br>Added: cfe/trunk/test/SemaObjC/debugger-cast-result-to-id.m<br>URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaObjC/debugger-cast-result-to-id.m?rev=149735&view=auto">http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaObjC/debugger-cast-result-to-id.m?rev=149735&view=auto</a><br>==============================================================================<br>--- cfe/trunk/test/SemaObjC/debugger-cast-result-to-id.m (added)<br>+++ cfe/trunk/test/SemaObjC/debugger-cast-result-to-id.m Fri Feb  3 19:29:37 2012<br>@@ -0,0 +1,27 @@<br>+// RUN: %clang_cc1 -funknown-anytype -fsyntax-only -fdebugger-support -fdebugger-cast-result-to-id -verify %s<br>+<br>+extern __unknown_anytype test0;<br>+extern __unknown_anytype test1();<br>+<br>+void test_unknown_anytype_receiver() {<br>+  (void)(int)[[test0 unknownMethod] otherUnknownMethod];;<br>+  (void)(id)[[test1() unknownMethod] otherUnknownMethod];<br>+}<br>+// RUN: %clang_cc1 -funknown-anytype -fsyntax-only -fdebugger-support -fdebugger-cast-result-to-id -verify %s<br>+<br>+extern __unknown_anytype test0;<br>+extern __unknown_anytype test1();<br>+<br>+void test_unknown_anytype_receiver() {<br>+  (void)(int)[[test0 unknownMethod] otherUnknownMethod];;<br>+  (void)(id)[[test1() unknownMethod] otherUnknownMethod];<br>+}<br>+// RUN: %clang_cc1 -funknown-anytype -fsyntax-only -fdebugger-support -fdebugger-cast-result-to-id -verify %s<br>+<br>+extern __unknown_anytype test0;<br>+extern __unknown_anytype test1();<br>+<br>+void test_unknown_anytype_receiver() {<br>+  (void)(int)[[test0 unknownMethod] otherUnknownMethod];;<br>+  (void)(id)[[test1() unknownMethod] otherUnknownMethod];<br>+}<br><br>Modified: cfe/trunk/test/SemaObjC/unknown-anytype.m<br>URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaObjC/unknown-anytype.m?rev=149735&r1=149734&r2=149735&view=diff">http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaObjC/unknown-anytype.m?rev=149735&r1=149734&r2=149735&view=diff</a><br>==============================================================================<br>--- cfe/trunk/test/SemaObjC/unknown-anytype.m (original)<br>+++ cfe/trunk/test/SemaObjC/unknown-anytype.m Fri Feb  3 19:29:37 2012<br>@@ -17,9 +17,9 @@<br>   int *ip = [test0 getIntPtr];<br>   float *fp = [test1() getFloatPtr];<br>   double *dp = [test1() getSomePtr]; // okay: picks first method found<br>-  [[test0 unknownMethod] otherUnknownMethod]; <br>+  [[test0 unknownMethod] otherUnknownMethod]; // expected-error{{no known method '-otherUnknownMethod'; cast the message send to the method's return type}}<br>   (void)(int)[[test0 unknownMethod] otherUnknownMethod];;<br>-  [[test1() unknownMethod] otherUnknownMethod];<br>+  [[test1() unknownMethod] otherUnknownMethod]; // expected-error{{no known method '-otherUnknownMethod'; cast the message send to the method's return type}}<br>   (void)(id)[[test1() unknownMethod] otherUnknownMethod];<br><br>   if ([[test0 unknownMethod] otherUnknownMethod]) { // expected-error{{no known method '-otherUnknownMethod'; cast the message send to the method's return type}}<br><br><br>_______________________________________________<br>cfe-commits mailing list<br><a href="mailto:cfe-commits@cs.uiuc.edu">cfe-commits@cs.uiuc.edu</a><br>http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits<br></div></blockquote></div><br></div></body></html>