search for: cxx_attributes

Displaying 2 results from an estimated 2 matches for "cxx_attributes".

2012 Jul 02
4
[LLVMdev] PROPOSAL: LLVM_FALLTHROUGH macro for intended fall-throughs between switch cases
...o wrap [[clang::fallthrough]]to a macro, so the code would continue to work in c++98 mode, but in c++11 mode it would also allow to run this diagnostic (btw, is llvm compilable in c++11 mode?). Sample implementation of the macro (see * fallthrough-macro.diff*): *#ifdef __clang__ **#if __has_feature(cxx_attributes) && __has_warning("-Wimplicit-fallthrough") * *#define LLVM_FALLTHROUGH [[clang::fallthrough]] **#endif **#endif ****#ifndef LLVM_FALLTHROUGH **#define LLVM_FALLTHROUGH do { } while (0) **#endif* After this we can start using *-Wimplicit-fallthrough*. Please express your opinion...
2012 Jul 26
0
[LLVMdev] PROPOSAL: LLVM_FALLTHROUGH macro for intended fall-throughs between switch cases
...nue to work >>> in c++98 mode, but in c++11 mode it would also allow to run this diagnostic >>> (btw, is llvm compilable in c++11 mode?). Sample implementation of the >>> macro (see *fallthrough-macro.diff*): >>> *#ifdef __clang__ >>> **#if __has_feature(cxx_attributes) && >>> __has_warning("-Wimplicit-fallthrough") >>> * >>> *#define LLVM_FALLTHROUGH [[clang::fallthrough]] >>> **#endif >>> **#endif >>> ****#ifndef LLVM_FALLTHROUGH >>> **#define LLVM_FALLTHROUGH do { } while (0) >...