Skip to content

Commit b726713

Browse files
author
z1.cciauto
committed
merge main into amd-staging
2 parents 1947eb9 + fb13be0 commit b726713

File tree

118 files changed

+1583
-1503
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

118 files changed

+1583
-1503
lines changed

bolt/lib/Target/AArch64/AArch64MCPlusBuilder.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2557,7 +2557,7 @@ class AArch64MCPlusBuilder : public MCPlusBuilder {
25572557
else if (Fixup.getKind() ==
25582558
MCFixupKind(AArch64::fixup_aarch64_pcrel_branch26))
25592559
RelType = ELF::R_AARCH64_JUMP26;
2560-
else if (FKI.Flags & MCFixupKindInfo::FKF_IsPCRel) {
2560+
else if (Fixup.isPCRel()) {
25612561
switch (FKI.TargetSize) {
25622562
default:
25632563
return std::nullopt;

bolt/lib/Target/X86/X86MCPlusBuilder.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2444,7 +2444,7 @@ class X86MCPlusBuilder : public MCPlusBuilder {
24442444
const uint64_t RelOffset = Fixup.getOffset();
24452445

24462446
uint32_t RelType;
2447-
if (FKI.Flags & MCFixupKindInfo::FKF_IsPCRel) {
2447+
if (Fixup.isPCRel()) {
24482448
switch (FKI.TargetSize) {
24492449
default:
24502450
return std::nullopt;

clang/docs/ReleaseNotes.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -916,6 +916,7 @@ Bug Fixes to C++ Support
916916
- Fixed an access checking bug when substituting into concepts (#GH115838)
917917
- Fix a bug where private access specifier of overloaded function not respected. (#GH107629)
918918
- Correctly handle allocations in the condition of a ``if constexpr``.(#GH120197) (#GH134820)
919+
- Fixed a crash when handling invalid member using-declaration in C++20+ mode. (#GH63254)
919920

920921
Bug Fixes to AST Handling
921922
^^^^^^^^^^^^^^^^^^^^^^^^^

clang/lib/Driver/ToolChains/Arch/AArch64.cpp

Lines changed: 3 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -156,39 +156,18 @@ static bool
156156
getAArch64MicroArchFeaturesFromMtune(const Driver &D, StringRef Mtune,
157157
const ArgList &Args,
158158
std::vector<StringRef> &Features) {
159-
std::string MtuneLowerCase = Mtune.lower();
160159
// Check CPU name is valid, but ignore any extensions on it.
160+
std::string MtuneLowerCase = Mtune.lower();
161161
llvm::AArch64::ExtensionSet Extensions;
162162
StringRef Tune;
163-
if (!DecodeAArch64Mcpu(D, MtuneLowerCase, Tune, Extensions))
164-
return false;
165-
166-
// Handle CPU name is 'native'.
167-
if (MtuneLowerCase == "native")
168-
MtuneLowerCase = std::string(llvm::sys::getHostCPUName());
169-
170-
// 'cyclone' and later have zero-cycle register moves and zeroing.
171-
if (MtuneLowerCase == "cyclone" ||
172-
StringRef(MtuneLowerCase).starts_with("apple")) {
173-
Features.push_back("+zcm-gpr64");
174-
Features.push_back("+zcz");
175-
}
176-
177-
return true;
163+
return DecodeAArch64Mcpu(D, MtuneLowerCase, Tune, Extensions);
178164
}
179165

180166
static bool
181167
getAArch64MicroArchFeaturesFromMcpu(const Driver &D, StringRef Mcpu,
182168
const ArgList &Args,
183169
std::vector<StringRef> &Features) {
184-
StringRef CPU;
185-
// Check CPU name is valid, but ignore any extensions on it.
186-
llvm::AArch64::ExtensionSet DecodedFeature;
187-
std::string McpuLowerCase = Mcpu.lower();
188-
if (!DecodeAArch64Mcpu(D, McpuLowerCase, CPU, DecodedFeature))
189-
return false;
190-
191-
return getAArch64MicroArchFeaturesFromMtune(D, CPU, Args, Features);
170+
return getAArch64MicroArchFeaturesFromMtune(D, Mcpu, Args, Features);
192171
}
193172

194173
void aarch64::getAArch64TargetFeatures(const Driver &D,

clang/lib/Driver/ToolChains/HIPAMD.cpp

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -386,19 +386,22 @@ HIPAMDToolChain::getDeviceLibs(const llvm::opt::ArgList &DriverArgs) const {
386386
// Maintain compatability with --hip-device-lib.
387387
auto BCLibArgs = DriverArgs.getAllArgValues(options::OPT_hip_device_lib_EQ);
388388
if (!BCLibArgs.empty()) {
389-
llvm::for_each(BCLibArgs, [&](StringRef BCName) {
389+
for (StringRef BCName : BCLibArgs) {
390390
StringRef FullName;
391+
bool Found = false;
391392
for (StringRef LibraryPath : LibraryPaths) {
392393
SmallString<128> Path(LibraryPath);
393394
llvm::sys::path::append(Path, BCName);
394395
FullName = Path;
395396
if (llvm::sys::fs::exists(FullName)) {
396397
BCLibs.emplace_back(FullName);
397-
return;
398+
Found = true;
399+
break;
398400
}
399401
}
400-
getDriver().Diag(diag::err_drv_no_such_file) << BCName;
401-
});
402+
if (!Found)
403+
getDriver().Diag(diag::err_drv_no_such_file) << BCName;
404+
}
402405
} else {
403406
if (!RocmInstallation->hasDeviceLibrary()) {
404407
getDriver().Diag(diag::err_drv_no_rocm_device_lib) << 0;

clang/lib/Driver/ToolChains/HIPSPV.cpp

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -226,19 +226,22 @@ HIPSPVToolChain::getDeviceLibs(const llvm::opt::ArgList &DriverArgs) const {
226226
// Maintain compatability with --hip-device-lib.
227227
auto BCLibArgs = DriverArgs.getAllArgValues(options::OPT_hip_device_lib_EQ);
228228
if (!BCLibArgs.empty()) {
229-
llvm::for_each(BCLibArgs, [&](StringRef BCName) {
229+
bool Found = false;
230+
for (StringRef BCName : BCLibArgs) {
230231
StringRef FullName;
231232
for (std::string LibraryPath : LibraryPaths) {
232233
SmallString<128> Path(LibraryPath);
233234
llvm::sys::path::append(Path, BCName);
234235
FullName = Path;
235236
if (llvm::sys::fs::exists(FullName)) {
236237
BCLibs.emplace_back(FullName.str());
237-
return;
238+
Found = true;
239+
break;
238240
}
239241
}
240-
getDriver().Diag(diag::err_drv_no_such_file) << BCName;
241-
});
242+
if (!Found)
243+
getDriver().Diag(diag::err_drv_no_such_file) << BCName;
244+
}
242245
} else {
243246
// Search device library named as 'hipspv-<triple>.bc'.
244247
auto TT = getTriple().normalize();

clang/lib/Index/IndexBody.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ class BodyIndexer : public RecursiveASTVisitor<BodyIndexer> {
6969
while (isa<CastExpr>(*It) || isa<ParenExpr>(*It)) {
7070
if (auto ICE = dyn_cast<ImplicitCastExpr>(*It)) {
7171
if (ICE->getCastKind() == CK_LValueToRValue)
72-
Roles |= (unsigned)(unsigned)SymbolRole::Read;
72+
Roles |= (unsigned)SymbolRole::Read;
7373
}
7474
if (It == StmtStack.begin())
7575
break;

clang/lib/Sema/SemaDeclCXX.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13638,7 +13638,7 @@ bool Sema::CheckUsingDeclQualifier(SourceLocation UsingLoc, bool HasTypename,
1363813638
Diag(SS.getBeginLoc(),
1363913639
diag::err_using_decl_nested_name_specifier_is_current_class)
1364013640
<< SS.getRange();
13641-
return !getLangOpts().CPlusPlus20;
13641+
return true;
1364213642
}
1364313643

1364413644
if (!cast<CXXRecordDecl>(NamedContext)->isInvalidDecl()) {

clang/test/Preprocessor/aarch64-target-features.c

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -316,7 +316,7 @@
316316

317317
// ================== Check whether -mtune accepts mixed-case features.
318318
// RUN: %clang -target aarch64 -mtune=CYCLONE -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-MTUNE-CYCLONE %s
319-
// CHECK-MTUNE-CYCLONE: "-cc1"{{.*}} "-triple" "aarch64{{.*}}" "-target-feature" "+zcm-gpr64" "-target-feature" "+zcz" "-target-feature" "+v8a"
319+
// CHECK-MTUNE-CYCLONE: "-cc1"{{.*}} "-triple" "aarch64{{.*}}" "-target-feature" "+v8a"
320320

321321
// RUN: %clang -target aarch64 -mcpu=apple-a7 -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-MCPU-APPLE-A7 %s
322322
// RUN: %clang -target aarch64 -mcpu=apple-a8 -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-MCPU-APPLE-A7 %s
@@ -342,12 +342,12 @@
342342
// RUN: %clang -target aarch64 -mcpu=thunderx2t99 -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-MCPU-THUNDERX2T99 %s
343343
// RUN: %clang -target aarch64 -mcpu=a64fx -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-MCPU-A64FX %s
344344
// RUN: %clang -target aarch64 -mcpu=carmel -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-MCPU-CARMEL %s
345-
// CHECK-MCPU-APPLE-A7: "-cc1"{{.*}} "-triple" "aarch64{{.*}}" "-target-feature" "+zcm-gpr64" "-target-feature" "+zcz" "-target-feature" "+v8a" "-target-feature" "+aes" "-target-feature" "+fp-armv8" "-target-feature" "+neon" "-target-feature" "+perfmon" "-target-feature" "+sha2"
346-
// CHECK-MCPU-APPLE-A10: "-cc1"{{.*}} "-triple" "aarch64{{.*}}" "-target-feature" "+zcm-gpr64" "-target-feature" "+zcz" "-target-feature" "+v8a" "-target-feature" "+aes" "-target-feature" "+crc" "-target-feature" "+fp-armv8" "-target-feature" "+lor" "-target-feature" "+neon" "-target-feature" "+pan" "-target-feature" "+perfmon" "-target-feature" "+rdm" "-target-feature" "+sha2" "-target-feature" "+vh"
347-
// CHECK-MCPU-APPLE-A11: "-cc1"{{.*}} "-triple" "aarch64{{.*}}"{{.*}}"-target-feature" "+zcm-gpr64" "-target-feature" "+zcz" "-target-feature" "+v8.2a" "-target-feature" "+aes" "-target-feature" "+crc" "-target-feature" "+fp-armv8" "-target-feature" "+fullfp16" "-target-feature" "+lse" "-target-feature" "+neon" "-target-feature" "+perfmon" "-target-feature" "+ras" "-target-feature" "+rdm" "-target-feature" "+sha2"
348-
// CHECK-MCPU-APPLE-A12: "-cc1"{{.*}} "-triple" "aarch64"{{.*}} "-target-feature" "+zcm-gpr64" "-target-feature" "+zcz" "-target-feature" "+v8.3a" "-target-feature" "+aes" "-target-feature" "+complxnum" "-target-feature" "+crc" "-target-feature" "+fp-armv8" "-target-feature" "+fullfp16" "-target-feature" "+jsconv" "-target-feature" "+lse" "-target-feature" "+neon" "-target-feature" "+pauth" "-target-feature" "+perfmon" "-target-feature" "+ras" "-target-feature" "+rcpc" "-target-feature" "+rdm" "-target-feature" "+sha2"
345+
// CHECK-MCPU-APPLE-A7: "-cc1"{{.*}} "-triple" "aarch64{{.*}}" "-target-feature" "+v8a" "-target-feature" "+aes" "-target-feature" "+fp-armv8" "-target-feature" "+neon" "-target-feature" "+perfmon" "-target-feature" "+sha2"
346+
// CHECK-MCPU-APPLE-A10: "-cc1"{{.*}} "-triple" "aarch64{{.*}}" "-target-feature" "+v8a" "-target-feature" "+aes" "-target-feature" "+crc" "-target-feature" "+fp-armv8" "-target-feature" "+lor" "-target-feature" "+neon" "-target-feature" "+pan" "-target-feature" "+perfmon" "-target-feature" "+rdm" "-target-feature" "+sha2" "-target-feature" "+vh"
347+
// CHECK-MCPU-APPLE-A11: "-cc1"{{.*}} "-triple" "aarch64{{.*}}"{{.*}} "-target-feature" "+v8.2a" "-target-feature" "+aes" "-target-feature" "+crc" "-target-feature" "+fp-armv8" "-target-feature" "+fullfp16" "-target-feature" "+lse" "-target-feature" "+neon" "-target-feature" "+perfmon" "-target-feature" "+ras" "-target-feature" "+rdm" "-target-feature" "+sha2"
348+
// CHECK-MCPU-APPLE-A12: "-cc1"{{.*}} "-triple" "aarch64"{{.*}} "-target-feature" "+v8.3a" "-target-feature" "+aes" "-target-feature" "+complxnum" "-target-feature" "+crc" "-target-feature" "+fp-armv8" "-target-feature" "+fullfp16" "-target-feature" "+jsconv" "-target-feature" "+lse" "-target-feature" "+neon" "-target-feature" "+pauth" "-target-feature" "+perfmon" "-target-feature" "+ras" "-target-feature" "+rcpc" "-target-feature" "+rdm" "-target-feature" "+sha2"
349349
// CHECK-MCPU-A34: "-cc1"{{.*}} "-triple" "aarch64{{.*}}" "-target-feature" "+aes" "-target-feature" "+crc" "-target-feature" "+fp-armv8" "-target-feature" "+neon" "-target-feature" "+perfmon" "-target-feature" "+sha2"
350-
// CHECK-MCPU-APPLE-A13: "-cc1"{{.*}} "-triple" "aarch64{{.*}}" "-target-feature" "+zcm-gpr64" "-target-feature" "+zcz" "-target-feature" "+v8.4a" "-target-feature" "+aes" "-target-feature" "+complxnum" "-target-feature" "+crc" "-target-feature" "+dotprod" "-target-feature" "+fp-armv8" "-target-feature" "+fp16fml" "-target-feature" "+fullfp16" "-target-feature" "+jsconv" "-target-feature" "+lse" "-target-feature" "+neon" "-target-feature" "+pauth" "-target-feature" "+perfmon" "-target-feature" "+ras" "-target-feature" "+rcpc" "-target-feature" "+rdm" "-target-feature" "+sha2" "-target-feature" "+sha3"
350+
// CHECK-MCPU-APPLE-A13: "-cc1"{{.*}} "-triple" "aarch64{{.*}}" "-target-feature" "+v8.4a" "-target-feature" "+aes" "-target-feature" "+complxnum" "-target-feature" "+crc" "-target-feature" "+dotprod" "-target-feature" "+fp-armv8" "-target-feature" "+fp16fml" "-target-feature" "+fullfp16" "-target-feature" "+jsconv" "-target-feature" "+lse" "-target-feature" "+neon" "-target-feature" "+pauth" "-target-feature" "+perfmon" "-target-feature" "+ras" "-target-feature" "+rcpc" "-target-feature" "+rdm" "-target-feature" "+sha2" "-target-feature" "+sha3"
351351
// CHECK-MCPU-A35: "-cc1"{{.*}} "-triple" "aarch64{{.*}}" "-target-feature" "+v8a" "-target-feature" "+aes" "-target-feature" "+crc" "-target-feature" "+fp-armv8" "-target-feature" "+neon" "-target-feature" "+perfmon" "-target-feature" "+sha2"
352352
// CHECK-MCPU-A53: "-cc1"{{.*}} "-triple" "aarch64{{.*}}" "-target-feature" "+v8a" "-target-feature" "+aes" "-target-feature" "+crc" "-target-feature" "+fp-armv8" "-target-feature" "+neon" "-target-feature" "+perfmon" "-target-feature" "+sha2"
353353
// CHECK-MCPU-A57: "-cc1"{{.*}} "-triple" "aarch64{{.*}}" "-target-feature" "+v8a" "-target-feature" "+aes" "-target-feature" "+crc" "-target-feature" "+fp-armv8" "-target-feature" "+neon" "-target-feature" "+perfmon" "-target-feature" "+sha2"
@@ -362,10 +362,10 @@
362362
// CHECK-MCPU-CARMEL: "-cc1"{{.*}} "-triple" "aarch64{{.*}}" "-target-feature" "+v8.2a" "-target-feature" "+aes" "-target-feature" "+crc" "-target-feature" "+fp-armv8" "-target-feature" "+fullfp16" "-target-feature" "+lse" "-target-feature" "+neon" "-target-feature" "+ras" "-target-feature" "+rdm" "-target-feature" "+sha2"
363363

364364
// RUN: %clang -target x86_64-apple-macosx -arch arm64 -### -c %s 2>&1 | FileCheck --check-prefix=CHECK-ARCH-ARM64 %s
365-
// CHECK-ARCH-ARM64: "-target-cpu" "apple-m1" "-target-feature" "+zcm-gpr64" "-target-feature" "+zcz" "-target-feature" "+v8.4a" "-target-feature" "+aes" "-target-feature" "+altnzcv" "-target-feature" "+ccdp" "-target-feature" "+ccpp" "-target-feature" "+complxnum" "-target-feature" "+crc" "-target-feature" "+dotprod" "-target-feature" "+flagm" "-target-feature" "+fp-armv8" "-target-feature" "+fp16fml" "-target-feature" "+fptoint" "-target-feature" "+fullfp16" "-target-feature" "+jsconv" "-target-feature" "+lse" "-target-feature" "+neon" "-target-feature" "+pauth" "-target-feature" "+perfmon" "-target-feature" "+predres" "-target-feature" "+ras" "-target-feature" "+rcpc" "-target-feature" "+rdm" "-target-feature" "+sb" "-target-feature" "+sha2" "-target-feature" "+sha3" "-target-feature" "+specrestrict" "-target-feature" "+ssbs"
365+
// CHECK-ARCH-ARM64: "-target-cpu" "apple-m1" "-target-feature" "+v8.4a" "-target-feature" "+aes" "-target-feature" "+altnzcv" "-target-feature" "+ccdp" "-target-feature" "+ccpp" "-target-feature" "+complxnum" "-target-feature" "+crc" "-target-feature" "+dotprod" "-target-feature" "+flagm" "-target-feature" "+fp-armv8" "-target-feature" "+fp16fml" "-target-feature" "+fptoint" "-target-feature" "+fullfp16" "-target-feature" "+jsconv" "-target-feature" "+lse" "-target-feature" "+neon" "-target-feature" "+pauth" "-target-feature" "+perfmon" "-target-feature" "+predres" "-target-feature" "+ras" "-target-feature" "+rcpc" "-target-feature" "+rdm" "-target-feature" "+sb" "-target-feature" "+sha2" "-target-feature" "+sha3" "-target-feature" "+specrestrict" "-target-feature" "+ssbs"
366366

367367
// RUN: %clang -target x86_64-apple-macosx -arch arm64_32 -### -c %s 2>&1 | FileCheck --check-prefix=CHECK-ARCH-ARM64_32 %s
368-
// CHECK-ARCH-ARM64_32: "-target-cpu" "apple-s4" "-target-feature" "+zcm-gpr64" "-target-feature" "+zcz" "-target-feature" "+v8.3a" "-target-feature" "+aes" "-target-feature" "+complxnum" "-target-feature" "+crc" "-target-feature" "+fp-armv8" "-target-feature" "+fullfp16" "-target-feature" "+jsconv" "-target-feature" "+lse" "-target-feature" "+neon" "-target-feature" "+pauth" "-target-feature" "+perfmon" "-target-feature" "+ras" "-target-feature" "+rcpc" "-target-feature" "+rdm" "-target-feature" "+sha2"
368+
// CHECK-ARCH-ARM64_32: "-target-cpu" "apple-s4" "-target-feature" "+v8.3a" "-target-feature" "+aes" "-target-feature" "+complxnum" "-target-feature" "+crc" "-target-feature" "+fp-armv8" "-target-feature" "+fullfp16" "-target-feature" "+jsconv" "-target-feature" "+lse" "-target-feature" "+neon" "-target-feature" "+pauth" "-target-feature" "+perfmon" "-target-feature" "+ras" "-target-feature" "+rcpc" "-target-feature" "+rdm" "-target-feature" "+sha2"
369369

370370
// RUN: %clang -target aarch64 -march=armv8-a+fp+simd+crc+crypto -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-MARCH-1 %s
371371
// RUN: %clang -target aarch64 -march=armv8-a+nofp+nosimd+nocrc+nocrypto+fp+simd+crc+crypto -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-MARCH-1 %s

clang/test/SemaCXX/nested-name-spec.cpp

Lines changed: 29 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,11 @@
1-
// RUN: %clang_cc1 -fsyntax-only -std=c++98 -verify -fblocks %s
1+
// RUN: %clang_cc1 -fsyntax-only -std=c++98 -verify=expected,cxx98,cxx98-11 -fblocks %s
2+
// RUN: %clang_cc1 -fsyntax-only -std=c++11 -verify=expected,since-cxx11,cxx98-11 -fblocks %s
3+
// RUN: %clang_cc1 -fsyntax-only -std=c++14 -verify=expected,since-cxx11 -fblocks %s
4+
// RUN: %clang_cc1 -fsyntax-only -std=c++17 -verify=expected,since-cxx11 -fblocks %s
5+
// RUN: %clang_cc1 -fsyntax-only -std=c++20 -verify=expected,since-cxx11,since-cxx20 -fblocks %s
6+
// RUN: %clang_cc1 -fsyntax-only -std=c++23 -verify=expected,since-cxx11,since-cxx20 -fblocks %s
7+
// RUN: %clang_cc1 -fsyntax-only -std=c++26 -verify=expected,since-cxx11,since-cxx20 -fblocks %s
8+
29
namespace A {
310
struct C {
411
static int cx;
@@ -118,7 +125,7 @@ namespace E {
118125
};
119126

120127
int f() {
121-
return E::X; // expected-warning{{use of enumeration in a nested name specifier is a C++11 extension}}
128+
return E::X; // cxx98-warning{{use of enumeration in a nested name specifier is a C++11 extension}}
122129
}
123130
}
124131
}
@@ -170,8 +177,9 @@ void ::global_func2(int) { } // expected-warning{{extra qualification on member
170177

171178
void N::f() { } // okay
172179

173-
struct Y; // expected-note{{forward declaration of 'Y'}}
174-
Y::foo y; // expected-error{{incomplete type 'Y' named in nested name specifier}}
180+
// FIXME (GH147000): duplicate diagnostics
181+
struct Y; // expected-note{{forward declaration of 'Y'}} since-cxx20-note{{forward declaration of 'Y'}}
182+
Y::foo y; // expected-error{{incomplete type 'Y' named in nested name specifier}} since-cxx20-error{{incomplete type 'Y' named in nested name specifier}}
175183

176184
namespace PR25156 {
177185
struct Y; // expected-note{{forward declaration of 'PR25156::Y'}}
@@ -189,7 +197,9 @@ bool (foo_S::value);
189197

190198

191199
namespace somens {
192-
struct a { }; // expected-note{{candidate constructor (the implicit copy constructor)}}
200+
struct a { };
201+
// expected-note@-1 {{candidate constructor (the implicit copy constructor)}}
202+
// since-cxx11-note@-2 {{candidate constructor (the implicit move constructor)}}
193203
}
194204

195205
template <typename T>
@@ -432,20 +442,20 @@ namespace PR16951 {
432442
};
433443
}
434444

435-
int x1 = ns::an_enumeration::ENUMERATOR; // expected-warning{{use of enumeration in a nested name specifier is a C++11 extension}}
445+
int x1 = ns::an_enumeration::ENUMERATOR; // cxx98-warning{{use of enumeration in a nested name specifier is a C++11 extension}}
436446

437-
int x2 = ns::an_enumeration::ENUMERATOR::vvv; // expected-warning{{use of enumeration in a nested name specifier is a C++11 extension}} \
447+
int x2 = ns::an_enumeration::ENUMERATOR::vvv; // cxx98-warning{{use of enumeration in a nested name specifier is a C++11 extension}} \
438448
// expected-error{{'ENUMERATOR' is not a class, namespace, or enumeration}} \
439449
440-
int x3 = ns::an_enumeration::X; // expected-warning{{use of enumeration in a nested name specifier is a C++11 extension}} \
450+
int x3 = ns::an_enumeration::X; // cxx98-warning {{use of enumeration in a nested name specifier is a C++11 extension}} \
441451
// expected-error{{no member named 'X'}}
442452

443453
enum enumerator_2 {
444454
ENUMERATOR_2
445455
};
446456

447-
int x4 = enumerator_2::ENUMERATOR_2; // expected-warning{{use of enumeration in a nested name specifier is a C++11 extension}}
448-
int x5 = enumerator_2::X2; // expected-warning{{use of enumeration in a nested name specifier is a C++11 extension}} \
457+
int x4 = enumerator_2::ENUMERATOR_2; // cxx98-warning{{use of enumeration in a nested name specifier is a C++11 extension}}
458+
int x5 = enumerator_2::X2; // cxx98-warning{{use of enumeration in a nested name specifier is a C++11 extension}} \
449459
// expected-error{{no member named 'X2' in 'PR16951::enumerator_2'}} \
450460
// expected-error{{cannot initialize a variable of type 'int' with an lvalue of type 'int (*)()'}}
451461

@@ -487,7 +497,7 @@ struct x; // expected-note {{template is declared here}}
487497

488498
template <typename T>
489499
int issue55962 = x::a; // expected-error {{use of class template 'x' requires template arguments}} \
490-
// expected-warning {{variable templates are a C++14 extension}}
500+
// cxx98-11-warning {{variable templates are a C++14 extension}}
491501

492502
namespace ForwardDeclared {
493503
typedef class A B;
@@ -496,3 +506,11 @@ namespace ForwardDeclared {
496506
void F(B::C);
497507
};
498508
}
509+
510+
namespace GH63254 {
511+
template <typename...> struct V {}; // cxx98-warning {{variadic templates are a C++11 extension}}
512+
struct S : V<> {
513+
using S::V; // expected-error {{using declaration refers to its own class}}
514+
V<> v; // no crash
515+
};
516+
}

0 commit comments

Comments
 (0)