================
@@ -256,3 +256,17 @@ void pragma_optimize_foo() {
 #pragma execution_character_set(push, "utf-8")
 #pragma execution_character_set(push, "UTF-8")
 #pragma execution_character_set(pop)
+
+#define PRAGMA_PACK _Pragma("pack(push, 1)")
+#pragma warning(PRAGMA_PACK) // expected-warning {{expected 'push', 'pop', 
'default', 'disable', 'error', 'once', 'suppress', 1, 2, 3, or 4}} \
+                             // expected-error {{expected identifier or '('}}
+;
+#pragma warning(disable : 4705 ; PRAGMA_PACK) // expected-warning {{expected 
'push', 'pop', 'default', 'disable', 'error', 'once', 'suppress', 1, 2, 3, or 
4}} \
+                                              // expected-error {{expected 
identifier or '('}}
+;
+#pragma execution_character_set(PRAGMA_PACK) // expected-warning {{expected 
'push' or 'pop'}} \
----------------
ipranjalks wrote:

Done, switched to `expected-error@-n` instead of line-continuation backslashes. 
Thanks!

https://github.com/llvm/llvm-project/pull/238342
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to