[PATCH] D16751: Enable constexpr on Visual Studio 2015, add support for two equivalent attributes

Alexander Riccio via llvm-commits llvm-commits at lists.llvm.org
Tue Feb 2 17:07:09 PST 2016


ariccio added a comment.

Grr. I need to "submit" comments.


================
Comment at: C:/LLVM/llvm/include/llvm/Support/Compiler.h:128
@@ -127,1 +127,3 @@
+#elif defined(_MSC_VER)
+#define LLVM_ATTRIBUTE_UNUSED_RESULT _Check_return_
 #else
----------------
rnk wrote:
> This is provided by sal.h, right? You should probably add an include like this at the top:
>   #ifdef _MSC_VER
>   #include <sal.h>
>   #endif
It is provided by `sal.h`, but it's like `size_t`: you generally don't need to `#include <stddef.h>` to use `size_t`, or `#include <cstddef>`, for `std::size_t` - they're usually included by default or built in.

If you want to be super strict about standards conformance - which is a totally noble goal - then lemme know and I will go ahead and actually `#include <sal.h>`.


http://reviews.llvm.org/D16751





More information about the llvm-commits mailing list