Author: probinson Date: Tue Dec 13 20:06:11 2016 New Revision: 289625 URL: http://llvm.org/viewvc/llvm-project?rev=289625&view=rev Log: [PS4] Undo dialect tweak for Objective-C.
In r267772, we had set the PS4's default dialect for both C and Objective-C to gnu99. Make that change only for C; we don't really support Objective-C/C++ so there's no point fiddling the dialect. Modified: cfe/trunk/lib/Frontend/CompilerInvocation.cpp cfe/trunk/test/SemaObjC/objcbridge-attribute-arc.m Modified: cfe/trunk/lib/Frontend/CompilerInvocation.cpp URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Frontend/CompilerInvocation.cpp?rev=289625&r1=289624&r2=289625&view=diff ============================================================================== --- cfe/trunk/lib/Frontend/CompilerInvocation.cpp (original) +++ cfe/trunk/lib/Frontend/CompilerInvocation.cpp Tue Dec 13 20:06:11 2016 @@ -1558,14 +1558,16 @@ void CompilerInvocation::setLangDefaults case IK_Asm: case IK_C: case IK_PreprocessedC: - case IK_ObjC: - case IK_PreprocessedObjC: // The PS4 uses C99 as the default C standard. if (T.isPS4()) LangStd = LangStandard::lang_gnu99; else LangStd = LangStandard::lang_gnu11; break; + case IK_ObjC: + case IK_PreprocessedObjC: + LangStd = LangStandard::lang_gnu11; + break; case IK_CXX: case IK_PreprocessedCXX: case IK_ObjCXX: Modified: cfe/trunk/test/SemaObjC/objcbridge-attribute-arc.m URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaObjC/objcbridge-attribute-arc.m?rev=289625&r1=289624&r2=289625&view=diff ============================================================================== --- cfe/trunk/test/SemaObjC/objcbridge-attribute-arc.m (original) +++ cfe/trunk/test/SemaObjC/objcbridge-attribute-arc.m Tue Dec 13 20:06:11 2016 @@ -23,10 +23,7 @@ typedef struct __CFSetRef * CFSetRef __a typedef union __CFUColor __attribute__((objc_bridge(NSUColor))) * CFUColorRef; // expected-error {{parameter of 'objc_bridge' attribute must be 'id' when used on a typedef}} -// This error requires C11. -#if __STDC_VERSION__ > 199901L -typedef union __CFUColor __attribute__((objc_bridge(NSUColor))) * CFUColorRef; // expected-error {{parameter of 'objc_bridge' attribute must be 'id' when used on a typedef}} -#endif +typedef union __CFUColor __attribute__((objc_bridge(NSUColor))) * CFUColorRef; // expected-error {{parameter of 'objc_bridge' attribute must be 'id' when used on a typedef}} typedef union __CFUColor __attribute__((objc_bridge(NSUColor))) *CFUColor1Ref; // expected-error {{parameter of 'objc_bridge' attribute must be 'id' when used on a typedef}} _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits