Closed mapsam closed 7 years ago
Thanks for creating. Love how node-cpp-skel can be the place to discuss and resolve oddities like this so we can dodge them everywhere (once fixed).
This problem seems like a clang-tidy bug. So I wonder if upgrading the llvm/clang++/clang-tidy version would fix it (We recently did this upgrade in skel). So if you start pulling clang-tidy 5.0 instead of 4.0 I wonder if the bug is fixed?
Downloading clang-tidy 5.0.0 doesn't seem to solve the problem, unfortunately ._.
Downloading binary package osx-x86_64/clang-tidy/5.0.0.tar.gz...
Run ‘make distclean’ to clear out the .toolchain folder to ensure it is being used. But yeah, if that does not fix then I’ll think of something else.
doh! That does seem to fix the issue @springmeyer.
Oh yay. Note: when I updated node-cpp-skel there were some minor differences in format output: so had to re-run that too.
Closing. Resolution is to use clang++ 5.x. For projects based on skel that means ensuring we are pulling >= LLVM 5.0.0 at https://github.com/mapbox/node-cpp-skel/blob/e54f258a67c4252137617f851bf98d503aa5dd9f/scripts/setup.sh#L7
Here's an example struct with two empty initializers
name()
andtype()
:And when running
make tidy
the output looks like this:Notice the dangling and extra commas
,
- these result in compiler errors. Perhaps there is a way to tell clang tidy to disregard empty initializers?cc @GretaCB @mapbox/core-tech