[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 14:19:04 PST 2017


t.p.northover added a comment.

Thanks Richard. I'll file the bugs tomorrow for the issues you suggest. Do you see either of them blocking the change to C++14 as a default? On a scale of "no", "no but I want a commitment to fix them" and "yes" sort of thing.

Tonight I've just got one comment that may or may not be useful context before I give you a proper answer tomorrow:



================
Comment at: clang/test/CodeGenCXX/vtable-available-externally.cpp:1-2
-// RUN: %clang_cc1 %s -I%S -triple=x86_64-apple-darwin10 -emit-llvm -o %t
-// RUN: %clang_cc1 %s -I%S -triple=x86_64-apple-darwin10 -O2 -disable-llvm-passes -emit-llvm -o %t.opt
+// RUN: %clang_cc1 %s -I%S -triple=x86_64-apple-darwin10 -std=c++98 -emit-llvm -o %t
+// RUN: %clang_cc1 %s -I%S -triple=x86_64-apple-darwin10 -std=c++98 -O2 -disable-llvm-passes -emit-llvm -o %t.opt
 // RUN: FileCheck --check-prefix=CHECK-TEST1 %s < %t
----------------
rsmith wrote:
> Why does this one need a -std= flag?
It's a bit late here so I'll just give the proximal cause this evening in case that makes it obvious to you. I'll dig deeper tomorrow if not.

In this particular case (without the std flag) on the -O2 run line the "vtable for Test11::D" does not get marked "available_externally".

The diff on line 1 is definitely unneeded.


================
Comment at: clang/test/Parser/cxx1z-nested-namespace-definition.cpp:3-4
+// RUN: %clang_cc1 -fsyntax-only -verify %s -std=c++98
 // RUN: not %clang_cc1 -x c++ -fixit %t -Werror -DFIXIT
 // RUN: %clang_cc1 -x c++ %t -DFIXIT
 // RUN: %clang_cc1 -fsyntax-only -verify %s -std=c++17 -Wc++14-compat
----------------
rsmith wrote:
> I think these two should also be `-std=c++98`, right?
Probably; I'll convince myself of that fact tomorrow.


================
Comment at: clang/test/SemaCXX/unknown-type-name.cpp:110-111
 
 // FIXME: We can tell this was intended to be a function because it does not
 //        have a dependent nested name specifier.
+template<typename T> int i(T::type, int());
----------------
rsmith wrote:
> Maybe delete this (incorrect in C++14) FIXME?
Sounds sensible.


Repository:
  rC Clang

https://reviews.llvm.org/D40948





More information about the cfe-commits mailing list