I'm not sure who owns Compiler.h, so I'll add people from the revision log. If it's not correct, please add the correct subscriber?
This patch enables constexpr on Visual Studio 2015 by adding || LLVM_MSC_PREREQ(1900) to the preprocessor #if statement. Since VS2013 doesn't support constexpr, that's purposely excluded. The LLVM_CONSTEXPR macro is used in ~25 places.
I also added the MSVC/SAL equivalent of:
- __attribute__((__warn_unused_result__)) as an LLVM_ATTRIBUTE_UNUSED_RESULT definition
- __attribute__((returns_nonnull)) as an LLVM_ATTRIBUTE_RETURNS_NONNULL definition
...in case anybody ever decides to run /analyze on LLVM (probably myself, if anybody)