Compiling the latest master (da46ba21af45fab99aeaf4e45dd807cb2e19a3e6) against LLVM 12, I get the following syntax error:
../iwyu.cc:2002:19: error: no member named 'CK_MatrixCast' in namespace 'clang'; did you mean 'CK_BitCast'?
.../include/clang/AST/OperationKinds.def:61:1: note: 'CK_BitCast' declared here
.../include/clang/AST/OperationKinds.h:21:30: note: expanded from macro 'CAST_OPERATION'
#define CAST_OPERATION(Name) CK_##Name,
<scratch space>:179:1: note: expanded from here
Can this just be `#ifdef`ed out for LLVM 12?
IWYU 0.16 for Clang 12 was just released yesterday. You need to use the `clang_12` branch when building against LLVM/Clang 12.
Ah... sorry I missed that.
Hm, I wonder if it makes sense to check that the LLVM version matches somewhere in the CMakeLists.txt?
When I use the master branch and run cmake against LLVM 12, it says:
-- IWYU: configuring for LLVM 12.0.0...
which seems to imply that this should work.
Heh, that note was actually intended to give users a hint that it's NOT going to work. I need to work on my UX.
In the meantime, I've updated the compatibility matrix in the README to cover Clang 12: https://github.com/include-what-you-use/include-what-you-use#how-to-build.