[Lldb-commits] [PATCH] D11099: [ClangASTType] Catch unhandled clang types at compile time
labath at google.com
Tue Jul 14 02:09:57 PDT 2015
labath added a comment.
In http://reviews.llvm.org/D11099#204409, @chaoren wrote:
> Is it only this one switch statement that needs this assertion? Maybe the pragma should be localized to this part (with push/pop)? Also, I'm not sure if any other compilers are supported but this wouldn't work with MSVC.
I am no expert in this area, but it seems to me that basically the whole file is made of switch statements on clang enums and that they all could use some protection.
It is true that we won't get this protection on MSVC, but I don't think that's a big problem. Since this is not OS-dependent, it should be enough that at least some compilers are verifying this. However, if you know the right incantations to produce an error on MSVC, we can definitely add them.
For clang and gcc we pass -Wno-unknown-pragma, but I don't know if we have a MSVC equivalent. If we don't and this produces a warning there, we can make this pragma #ifndef MSVC.
More information about the lldb-commits