gecko-dev/build/build-clang/clang-tidy-cxx14.patch

24 строки
817 B
Diff

Backport cxx14 default dialect flag from clang 6.0.0 trunk to 5.0.1
Index: lib/Frontend/CompilerInvocation.cpp
===================================================================
--- a/clang/lib/Frontend/CompilerInvocation.cpp (revision 320871)
+++ b/clang/lib/Frontend/CompilerInvocation.cpp (working copy)
@@ -1690,11 +1690,11 @@
break;
case InputKind::CXX:
case InputKind::ObjCXX:
- // The PS4 uses C++11 as the default C++ standard.
- if (T.isPS4())
- LangStd = LangStandard::lang_gnucxx11;
- else
- LangStd = LangStandard::lang_gnucxx98;
+#if defined(CLANG_DEFAULT_STD_CXX)
+ LangStd = CLANG_DEFAULT_STD_CXX;
+#else
+ LangStd = LangStandard::lang_gnucxx14;
+#endif
break;
case InputKind::RenderScript:
LangStd = LangStandard::lang_c99;