summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChandler Carruth <chandlerc@gmail.com>2016-08-17 07:18:44 +0000
committerChandler Carruth <chandlerc@gmail.com>2016-08-17 07:18:44 +0000
commitbd5ad0df5119ba520dea58c0eada291e8756e92c (patch)
tree73b4fc58a10438e6508819b8ad6536462b1e2b4b
parentf7b9f3149b764b8beb8e776f888f718f22447bdd (diff)
downloadbcm5719-llvm-bd5ad0df5119ba520dea58c0eada291e8756e92c.tar.gz
bcm5719-llvm-bd5ad0df5119ba520dea58c0eada291e8756e92c.zip
Restrict the use of the C++17 attribute to C++17 (at least as best we
can given the current __cplusplus definitions). Without this, Clang triggers TONS of warnings about using a C++17 extension. I tried using LLVM_EXTENSION to turn these off and it doesn't work. Suggestions on a better approach are welcome, but at least this makes the build usable for me again. llvm-svn: 278909
-rw-r--r--llvm/include/llvm/Support/Compiler.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/include/llvm/Support/Compiler.h b/llvm/include/llvm/Support/Compiler.h
index 6b00ff91cb0..a9b2e433a76 100644
--- a/llvm/include/llvm/Support/Compiler.h
+++ b/llvm/include/llvm/Support/Compiler.h
@@ -233,7 +233,7 @@
#endif
/// LLVM_FALLTHROUGH - Mark fallthrough cases in switch statements.
-#if __has_cpp_attribute(fallthrough)
+#if __cplusplus > 201402L && __has_cpp_attribute(fallthrough)
#define LLVM_FALLTHROUGH [[fallthrough]]
#elif __has_cpp_attribute(clang::fallthrough)
#define LLVM_FALLTHROUGH [[clang::fallthrough]]
OpenPOWER on IntegriCloud