// RUN: %clang_analyze_cc1 -std=c++14 -analyzer-checker=core %s \
// RUN: -analyzer-output=plist -o %t.plist \
// RUN: -analyzer-config expand-macros=true -verify
//
// RUN: FileCheck --input-file=%t.plist %s
void ;
//===----------------------------------------------------------------------===//
// Tests for non-function-like macro expansions.
//===----------------------------------------------------------------------===//
void
// CHECK: <key>macro_expansions</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>line</key><integer>18</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <key>name</key><string>SET_PTR_VAR_TO_NULL</string>
// CHECK-NEXT: <key>expansion</key><string>ptr =0</string>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
void
// CHECK: <key>macro_expansions</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>line</key><integer>42</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <key>name</key><string>SET_PTR_VAR_TO_NULL_WITH_NESTED_MACRO</string>
// CHECK-NEXT: <key>expansion</key><string>ptr =0</string>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
//===----------------------------------------------------------------------===//
// Tests for function-like macro expansions.
//===----------------------------------------------------------------------===//
void
void
// CHECK: <key>macro_expansions</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>line</key><integer>73</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <key>name</key><string>TO_NULL(&ptr)</string>
// CHECK-NEXT: <key>expansion</key><string>setToNull (&ptr )</string>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
void
// CHECK: <key>macro_expansions</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>line</key><integer>104</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <key>name</key><string>TO_NULL(&a)</string>
// CHECK-NEXT: <key>expansion</key><string>setToNull (&a )</string>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>line</key><integer>105</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <key>name</key><string>DEREF(a)</string>
// CHECK-NEXT: <key>expansion</key><string>{int b ;b =5;}print (a );*a </string>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
//===----------------------------------------------------------------------===//
// Tests for undefining and/or redifining macros.
//===----------------------------------------------------------------------===//
void
// CHECK: <key>macro_expansions</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>line</key><integer>141</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <key>name</key><string>WILL_UNDEF_SET_NULL_TO_PTR(ptr)</string>
// CHECK-NEXT: <key>expansion</key><string>ptr =nullptr ;</string>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
void
// CHECK: <key>macro_expansions</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>line</key><integer>169</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <key>name</key><string>WILL_REDIFINE_MULTIPLE_TIMES_SET_TO_NULL(ptr)</string>
// CHECK-NEXT: <key>expansion</key><string>ptr =nullptr ;</string>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
void
// CHECK: <key>macro_expansions</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>line</key><integer>200</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <key>name</key><string>PASS_PTR_TO_MACRO_THAT_WILL_BE_UNDEFD(ptr)</string>
// CHECK-NEXT: <key>expansion</key><string>ptr =nullptr ;</string>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
//===----------------------------------------------------------------------===//
// Tests for macro arguments containing commas and parantheses.
//
// As of writing these tests, the algorithm expands macro arguments by lexing
// the macro's expansion location, and relies on finding tok::comma and
// tok::l_paren/tok::r_paren.
//===----------------------------------------------------------------------===//
// Note that this commas, parantheses in strings aren't parsed as tok::comma or
// tok::l_paren/tok::r_paren, but why not test them.
void
// CHECK: <key>macro_expansions</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>line</key><integer>237</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <key>name</key><string>TO_NULL_AND_PRINT(a, "Will this , cause a crash?")</string>
// CHECK-NEXT: <key>expansion</key><string>a =0;print ("Will this , cause a crash?")</string>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
void
// CHECK: <key>macro_expansions</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>line</key><integer>257</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <key>name</key><string>TO_NULL_AND_PRINT(a, "Will this ( cause a crash?")</string>
// CHECK-NEXT: <key>expansion</key><string>a =0;print ("Will this ( cause a crash?")</string>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
void
// CHECK: <key>macro_expansions</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>line</key><integer>277</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <key>name</key><string>TO_NULL_AND_PRINT(a, "Will this ) cause a crash?")</string>
// CHECK-NEXT: <key>expansion</key><string>a =0;print ("Will this ) cause a crash?")</string>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
// Function calls do contain both tok::comma and tok::l_paren/tok::r_paren.
void
// CHECK: <key>macro_expansions</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>line</key><integer>302</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <key>name</key><string>CALL_FUNCTION(setToNull(&a))</string>
// CHECK-NEXT: <key>expansion</key><string>setToNull (&a )</string>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
void
void
// CHECK: <key>macro_expansions</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>line</key><integer>327</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <key>name</key><string>CALL_FUNCTION(setToNullAndPrint(&a, "Hello!"))</string>
// CHECK-NEXT: <key>expansion</key><string>setToNullAndPrint (&a ,"Hello!")</string>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
void
// CHECK: <key>macro_expansions</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>line</key><integer>350</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <key>name</key><string>CALL_FUNCTION_WITH_TWO_PARAMS(setToNullAndPrint, &a, "Hello!")</string>
// CHECK-NEXT: <key>expansion</key><string>setToNullAndPrint (&a ,"Hello!")</string>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
void
// FIXME: Why does the expansion appear twice?
// CHECK: <key>macro_expansions</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>line</key><integer>376</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <key>name</key><string>CALL_LAMBDA(([&ptr, str] () mutable { TO_NULL(&ptr); }))</string>
// CHECK-NEXT: <key>expansion</key><string>([&ptr ,str ]()mutable {setToNull (&ptr );})()</string>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>line</key><integer>376</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <key>name</key><string>CALL_LAMBDA(([&ptr, str] () mutable { TO_NULL(&ptr); }))</string>
// CHECK-NEXT: <key>expansion</key><string>([&ptr ,str ]()mutable {setToNull (&ptr );})()</string>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
void
// CHECK: <key>macro_expansions</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>line</key><integer>408</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <key>name</key><string>PASTE_CODE({ // expected-
// CHECK-NEXT: // NOTE: If we were to add a new variable here after a comma, we'd get a
// CHECK-NEXT: // compilation error, so this test is mainly here to show that this was also
// CHECK-NEXT: // investigated.
// CHECK-NEXT: //
// CHECK-NEXT: // int *ptr = nullptr, a;
// CHECK-NEXT: int *ptr = nullptr;
// CHECK-NEXT: *ptr = 5;
// CHECK-NEXT: })</string>
// CHECK-NEXT: <key>expansion</key><string>{int *ptr =nullptr ;*ptr =5;}</string>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
// Example taken from
// https://gcc.gnu.org/onlinedocs/cpp/Macro-Arguments.html#Macro-Arguments.
void
// CHECK: <key>macro_expansions</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>line</key><integer>451</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <key>name</key><string>POTENTIALLY_EMPTY_PARAM(,ptr)</string>
// CHECK-NEXT: <key>expansion</key><string>;ptr =nullptr </string>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
void
// CHECK: <key>macro_expansions</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>line</key><integer>476</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <key>name</key><string>NESTED_EMPTY_PARAM(, ptr)</string>
// CHECK-NEXT: <key>expansion</key><string>;ptr =nullptr ;</string>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
void
// CHECK: <key>macro_expansions</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>line</key><integer>499</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <key>name</key><string>CALL_FUNCTION_WITH_ONE_PARAM_THROUGH_MACRO(setToNull, &ptr)</string>
// CHECK-NEXT: <key>expansion</key><string>setToNull (&ptr )</string>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
//===----------------------------------------------------------------------===//
// Tests for variadic macro arguments.
//===----------------------------------------------------------------------===//
void ;
void
// CHECK: <key>macro_expansions</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>line</key><integer>530</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <key>name</key><string>VARIADIC_SET_TO_NULL(ptr, 1, 5, "haha!")</string>
// CHECK-NEXT: <key>expansion</key><string>ptr =nullptr ;variadicFunc (1,5,"haha!")</string>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
void
// CHECK: <key>macro_expansions</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>line</key><integer>552</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <key>name</key><string>VARIADIC_SET_TO_NULL(ptr)</string>
// CHECK-NEXT: <key>expansion</key><string>ptr =nullptr ;variadicFunc ()</string>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
//===----------------------------------------------------------------------===//
// Tests for # and ##.
//===----------------------------------------------------------------------===//
void
// CHECK: <key>macro_expansions</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>line</key><integer>580</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <key>name</key><string>DECLARE_FUNC_AND_SET_TO_NULL(whatever, ptr)</string>
// CHECK-NEXT: <key>expansion</key><string>void generated_whatever ();ptr =nullptr ;</string>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
void
// CHECK: <key>macro_expansions</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>line</key><integer>600</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <key>name</key><string>TO_NULL_AND_PRINT(a, "Will this ## cause a crash?")</string>
// CHECK-NEXT: <key>expansion</key><string>a =0;print ("Will this ## cause a crash?")</string>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
void
// CHECK: <key>macro_expansions</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>line</key><integer>624</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <key>name</key><string>PRINT_STR(Hello, ptr)</string>
// CHECK-NEXT: <key>expansion</key><string>print ("Hello");ptr =nullptr </string>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
void
// CHECK: <key>macro_expansions</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>line</key><integer>644</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <key>name</key><string>TO_NULL_AND_PRINT(a, "Will this # cause a crash?")</string>
// CHECK-NEXT: <key>expansion</key><string>a =0;print ("Will this # cause a crash?")</string>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
//===----------------------------------------------------------------------===//
// Tests for more complex macro expansions.
//
// We won't cover anything that wasn't covered up to this point, but rather
// show more complex, macros with deeper nesting, more arguments (some unused)
// and so on.
//===----------------------------------------------------------------------===//
int
void
// CHECK: <key>macro_expansions</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>line</key><integer>698</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <key>name</key><string>EUCLIDEAN_ALGORITHM(A, B)</string>
// CHECK-NEXT: <key>expansion</key><string>if (A <0){A =-A ;}if (B <0){B =-B ;}return B /(B -B );</string>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
void
// CHECK: <key>macro_expansions</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>line</key><integer>730</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <key>name</key><string>YET_ANOTHER_SET_TO_NULL(5, DO_NOTHING2("Remember the Vasa"), ptr)</string>
// CHECK-NEXT: <key>expansion</key><string>print ((void *)5);print ((void *)"Remember the Vasa");ptr =nullptr ;</string>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
int garbage_value;
void
// CHECK: <key>macro_expansions</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>line</key><integer>754</integer>
// CHECK-NEXT: <key>col</key><integer>7</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <key>name</key><string>value</string>
// CHECK-NEXT: <key>expansion</key><string>garbage_value </string>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
void // expected-warning{{Division by zero}}
// CHECK: <key>macro_expansions</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>line</key><integer>776</integer>
// CHECK-NEXT: <key>col</key><integer>1</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <key>name</key><string>APPLY_ZERO1(FOO)</string>
// CHECK-NEXT: <key>expansion</key><string>int foo (){return 0;}</string>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
void // expected-warning{{Division by zero}}
// CHECK: <key>macro_expansions</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>line</key><integer>796</integer>
// CHECK-NEXT: <key>col</key><integer>1</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <key>name</key><string>APPLY_ZERO2</string>
// CHECK-NEXT: <key>expansion</key><string>int bar (){return 0;}</string>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
void ;
void
// CHECK: <key>macro_expansions</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>line</key><integer>821</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <key>name</key><string>DISPATCH(x, "LF1M healer")</string>
// CHECK-NEXT: <key>expansion</key><string>foo (x ,"LF1M healer");x =0;;</string>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
void ;
void
// CHECK: <key>macro_expansions</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>line</key><integer>846</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <key>name</key><string>CONCAT_VA_ARGS(x, "You need to construct additional pylons.", 'c', 9)</string>
// CHECK-NEXT: <key>expansion</key><string>variadicCFunction (x ,"You need to construct additional pylons.",'c',9);x =0;</string>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
void
// CHECK: <key>macro_expansions</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>line</key><integer>866</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <key>name</key><string>CONCAT_VA_ARGS(x, "You need to construct")</string>
// CHECK-NEXT: <key>expansion</key><string>variadicCFunction (x ,"You need to construct");x =0;</string>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
void
// CHECK: <key>macro_expansions</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>line</key><integer>889</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <key>name</key><string>STRINGIFIED_VA_ARGS(x, "Additional supply depots required.", 'a', 10)</string>
// CHECK-NEXT: <key>expansion</key><string>variadicCFunction (x ,"Additional supply depots required.","'a', 10");x =0;</string>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
void
// CHECK: <key>macro_expansions</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>line</key><integer>909</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <key>name</key><string>STRINGIFIED_VA_ARGS(x, "Additional supply depots required.")</string>
// CHECK-NEXT: <key>expansion</key><string>variadicCFunction (x ,"Additional supply depots required.","");x =0;</string>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
// bz44493: Support GNU-style named variadic arguments in plister
int
// CHECK: <key>macro_expansions</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>line</key><integer>933</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <key>name</key><string>BZ44493_GNUVA(a, "arg2")</string>
// CHECK-NEXT: <key>expansion</key><string>--(a );</string>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>