• Abseil Team's avatar
    Googletest export · a09ea700
    Abseil Team authored
    Fix `-Wgnu-zero-variadic-macro-arguments` in GMock
    
    Passing zero arguments to the variadic part of a macro is a GNU
    extension and triggers warnings when build projects using GMock with
    `-pedantic`.
    
     - Fix uses of `GMOCK_PP_INTERNAL_16TH` to always receive at least 17
    arguments. (this was triggered when `GMOCK_PP_NARG` or `GMOCK_PP_HAS_COMMA`
    were used with an argument containing no commas).
     - Fix `GMOCK_PP_HEAD` to append a dummy unused argument so that
    `GMOCK_PP_INTERNAL_HEAD` always has two arguments.
    
    PiperOrigin-RevId: 310414611
    a09ea700
gmock-pp.h 13.2 KB