1f4a2713aSLionel Sambuc // RUN: rm -rf %t 2f4a2713aSLionel Sambuc // RUN: %clang_cc1 -fmodules -x objective-c -emit-module -fmodules-cache-path=%t -fmodule-name=diag_pragma %S/Inputs/module.map 3*0a6a1f1dSLionel Sambuc // RUN: %clang_cc1 -fmodules -x objective-c -verify -fmodules-cache-path=%t -I %S/Inputs %s 4f4a2713aSLionel Sambuc // FIXME: When we have a syntax for modules in C, use that. 5f4a2713aSLionel Sambuc 6f4a2713aSLionel Sambuc @import diag_pragma; 7f4a2713aSLionel Sambuc foo(int x)8f4a2713aSLionel Sambucint foo(int x) { 9f4a2713aSLionel Sambuc if (x = DIAG_PRAGMA_MACRO) // expected-warning {{using the result of an assignment as a condition without parentheses}} \ 10f4a2713aSLionel Sambuc // expected-note {{place parentheses}} expected-note {{use '=='}} 11f4a2713aSLionel Sambuc return 0; 12f4a2713aSLionel Sambuc return 1; 13f4a2713aSLionel Sambuc } 14