[PATCH] D40948: Switch Clang's default C++ language target to C++14

Tim Northover via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Dec 7 03:26:20 PST 2017


t.p.northover created this revision.
Herald added a subscriber: mcrosier.

Hi all,

So, I've finally managed to run all the tests I wanted and get this out for review. Sorry it's taken so long. This patch switches Clang's default C++ target to C++14 across all platforms and updates the test-suite to pass.

I've managed to test Linux, macOS and iOS on both the regression tests and the test-suite (minus externals on Linux because it's my home machine). There's a separate patch for the test-suite which I'll attach to a follow-up message here.

I think most of the test changes are pretty straightforward and fall into a few broad categories:

- Changes to how the operands for "operator new" are promoted and otherwise wrangled in C++14. Slightly different CodeGen but essentially fine.
- Some tests explicitly testing C++ mode differences left the C++98 line without a -std=... argument, I added it.
- OpenMP CodeGen changes. As far as I can tell both are correct, but the tests are essentially unreadable so I gave up trying to adapt the output and just set it to C++98 mode.

I'm happy to rework anything people think needs changing.


Repository:
  rC Clang

https://reviews.llvm.org/D40948

Files:
  clang/lib/Frontend/CompilerInvocation.cpp
  clang/test/CodeGenCXX/new-overflow.cpp
  clang/test/CodeGenCXX/new.cpp
  clang/test/CodeGenCXX/vtable-available-externally.cpp
  clang/test/Lexer/cxx-features.cpp
  clang/test/Lexer/half-literal.cpp
  clang/test/OpenMP/taskloop_reduction_codegen.cpp
  clang/test/OpenMP/taskloop_simd_reduction_codegen.cpp
  clang/test/Parser/cxx1z-nested-namespace-definition.cpp
  clang/test/SemaCXX/new-array-size-conv.cpp
  clang/test/SemaCXX/new-delete.cpp
  clang/test/SemaCXX/unknown-type-name.cpp
  clang/test/SemaTemplate/class-template-decl.cpp
  clang/test/SemaTemplate/explicit-instantiation.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D40948.125925.patch
Type: text/x-patch
Size: 15396 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20171207/1c56c8ed/attachment.bin>


More information about the cfe-commits mailing list