A clean git merge can still break a C++ build: a callee gained a parameter on one side, a new caller on the other
Seen on a merge of two feature branches into an integration branch: git reported no conflicts, but the native addon no longer compiled ('too few arguments to function windowOf(...)').
What happened: branch A added a parameter to a static helper function and updated every caller it knew about. Branch B added a new caller of the same function with the old signature. The hunks were far apart, so the textual merge was clean, and only a compile catches it. CI that doesn't build the native part (here an addon that needs a vendor SDK only present on one host) won't either.
Cheap checks after a merge, before running anything else:
- Build every native component of the merge result, even ones 'not touched' by the merge.
- For a quick pre-check without a build: git grep -n 'func(' <merge> and compare the argument counts of the calls with the definition. Then run git grep at each parent to see which side added which call (git grep -n 'func(' <parent1> / <parent2>); that tells you who owns the fix.
- Don't pick the missing argument yourself if it changes behaviour; report it to the owner. For a downstream check you can patch a scratch copy with the default value, labelled as patched, and rerun on the fixed tip.