Skip to content

Commit b0ffbbc

Browse files
SC llvm teamSC llvm team
authored andcommitted
Merged main:887f7002b65f7376c7a5004535bd08c95bdaa8f8 into amd-gfx:3ae0653ec5af
Local branch amd-gfx 3ae0653 Merged main:b10ecfa914dd1bc2013584917d0505ba5f15f75c into amd-gfx:8182b88afaa8 Remote branch main 887f700 [NFC][bolt][test] Change |& to 2>&1 | for lit internal shell support (llvm#102402)
2 parents 3ae0653 + 887f700 commit b0ffbbc

File tree

210 files changed

+6428
-2211
lines changed

Some content is hidden

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

210 files changed

+6428
-2211
lines changed

bolt/test/X86/encoding-validation.s

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
# RUN: llvm-mc -filetype=obj -triple x86_64-unknown-linux %s -o %t.o
44
# RUN: ld.lld %t.o -o %t.exe -q
5-
# RUN: llvm-bolt %t.exe --relocs -o %t.out --check-encoding |& FileCheck %s
5+
# RUN: llvm-bolt %t.exe --relocs -o %t.out --check-encoding 2>&1 | FileCheck %s
66

77
.text
88
.globl _start

bolt/test/X86/gotpcrelx.s

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,11 @@
1010
# RUN: ld.lld %t.o -o %t.pie.exe -q -pie
1111
# RUN: ld.lld %t.o -o %t.no-relax.exe -q --no-relax
1212
# RUN: llvm-bolt %t.exe --relocs -o %t.out --print-cfg --print-only=_start \
13-
# RUN: |& FileCheck --check-prefix=BOLT %s
13+
# RUN: 2>&1 | FileCheck --check-prefix=BOLT %s
1414
# RUN: llvm-bolt %t.pie.exe -o %t.null --print-cfg --print-only=_start \
15-
# RUN: |& FileCheck --check-prefix=PIE-BOLT %s
15+
# RUN: 2>&1 | FileCheck --check-prefix=PIE-BOLT %s
1616
# RUN: llvm-bolt %t.no-relax.exe -o %t.null --print-cfg --print-only=_start \
17-
# RUN: |& FileCheck --check-prefix=NO-RELAX-BOLT %s
17+
# RUN: 2>&1 | FileCheck --check-prefix=NO-RELAX-BOLT %s
1818
# RUN: llvm-objdump -d --no-show-raw-insn --print-imm-hex \
1919
# RUN: %t.out | FileCheck --check-prefix=DISASM %s
2020

bolt/test/X86/icf-jump-tables.test

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
# REQUIRES: system-linux
55

66
# RUN: %clang %cflags -O1 -g %p/../Inputs/icf-jump-tables.c -o %t.exe -Wl,-q
7-
# RUN: llvm-bolt %t.exe --icf -o %t.bolt |& FileCheck %s
7+
# RUN: llvm-bolt %t.exe --icf -o %t.bolt 2>&1 | FileCheck %s
88

99
## Check that BOLT successfully folded a function with jump table:
1010
# CHECK: ICF folded {{.*}}. {{[^0]}} functions had jump tables.

bolt/test/X86/indirect-goto-pie.test

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ REQUIRES: x86_64-linux
66

77
RUN: %clang %S/Inputs/indirect_goto.c -o %t -fpic -pie -Wl,-q
88
RUN: not llvm-bolt %t -o %t.bolt --relocs=1 --print-cfg --print-only=main \
9-
RUN: |& FileCheck %s
9+
RUN: 2>&1 | FileCheck %s
1010

1111
## Check that processing works if main() is skipped.
1212
RUN: llvm-bolt %t -o %t.bolt --relocs=1 --skip-funcs=main

bolt/test/X86/jump-table-func-entry.s

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
# RUN: %clang %cflags %t.o -o %t.exe -no-pie -Wl,-q
88

99
# RUN: llvm-bolt %t.exe --print-normalized --print-only=foo -o %t.out \
10-
# RUN: |& FileCheck %s
10+
# RUN: 2>&1 | FileCheck %s
1111

1212

1313

bolt/test/X86/keep-nops.s

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
# RUN: llvm-mc -filetype=obj -triple x86_64-unknown-linux %s -o %t.o
66
# RUN: ld.lld %t.o -o %t.exe -q
77
# RUN: llvm-bolt %t.exe -o %t.bolt.exe --keep-nops --relocs --print-finalized \
8-
# RUN: |& FileCheck --check-prefix=CHECK-BOLT %s
8+
# RUN: 2>&1 | FileCheck --check-prefix=CHECK-BOLT %s
99
# RUN: llvm-objdump -d %t.bolt.exe | FileCheck %s
1010

1111
.text

bolt/test/X86/linux-bug-table.s

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
## Verify bug entry bindings again after unreachable code elimination.
1616

1717
# RUN: llvm-bolt %t.out -o %t.out.1 --print-only=_start --print-normalized \
18-
# RUN: |& FileCheck --check-prefix=CHECK-REOPT %s
18+
# RUN: 2>&1 | FileCheck --check-prefix=CHECK-REOPT %s
1919

2020
# CHECK: BOLT-INFO: Linux kernel binary detected
2121
# CHECK: BOLT-INFO: parsed 2 bug table entries

bolt/test/X86/linux-orc.s

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
## Verify reading contents of ORC sections.
1111

12-
# RUN: llvm-bolt %t.exe --dump-orc -o /dev/null |& FileCheck %s \
12+
# RUN: llvm-bolt %t.exe --dump-orc -o /dev/null 2>&1 | FileCheck %s \
1313
# RUN: --check-prefix=CHECK-ORC
1414

1515
# CHECK-ORC: BOLT-INFO: ORC unwind information:
@@ -27,19 +27,19 @@
2727
## Verify ORC bindings to instructions.
2828

2929
# RUN: llvm-bolt %t.exe --print-normalized --dump-orc --print-orc -o %t.out \
30-
# RUN: --keep-nops=0 --bolt-info=0 |& FileCheck %s
30+
# RUN: --keep-nops=0 --bolt-info=0 2>&1 | FileCheck %s
3131

3232

3333
## Verify ORC bindings after rewrite.
3434

3535
# RUN: llvm-bolt %t.out -o %t.out.1 --print-normalized --print-orc \
36-
# RUN: |& FileCheck %s
36+
# RUN: 2>&1 | FileCheck %s
3737

3838
## Verify ORC binding after rewrite when some of the functions are skipped.
3939

4040
# RUN: llvm-bolt %t.exe -o %t.out --skip-funcs=bar --bolt-info=0 --keep-nops=0
4141
# RUN: llvm-bolt %t.out -o %t.out.1 --print-normalized --print-orc \
42-
# RUN: |& FileCheck %s
42+
# RUN: 2>&1 | FileCheck %s
4343

4444
# CHECK: BOLT-INFO: Linux kernel binary detected
4545
# CHECK: BOLT-INFO: parsed 9 ORC entries

bolt/test/X86/linux-pci-fixup.s

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
# RUN: llvm-mc -filetype=obj -triple x86_64-unknown-unknown %s -o %t.o
44
# RUN: %clang %cflags -nostdlib %t.o -o %t.exe \
55
# RUN: -Wl,--image-base=0xffffffff80000000,--no-dynamic-linker,--no-eh-frame-hdr,--no-pie
6-
# RUN: llvm-bolt %t.exe --print-normalized -o %t.out |& FileCheck %s
6+
# RUN: llvm-bolt %t.exe --print-normalized -o %t.out 2>&1 | FileCheck %s
77

88
## Check that BOLT correctly parses the Linux kernel .pci_fixup section and
99
## verify that PCI fixup hook in the middle of a function is detected.

bolt/test/X86/linux-smp-locks.s

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,11 @@
77
# RUN: %clang %cflags -nostdlib %t.o -o %t.exe \
88
# RUN: -Wl,--image-base=0xffffffff80000000,--no-dynamic-linker,--no-eh-frame-hdr,--no-pie
99
# RUN: llvm-bolt %t.exe --print-normalized --keep-nops=0 --bolt-info=0 -o %t.out \
10-
# RUN: |& FileCheck %s
10+
# RUN: 2>&1 | FileCheck %s
1111

1212
## Check the output of BOLT with NOPs removed.
1313

14-
# RUN: llvm-bolt %t.out -o %t.out.1 --print-normalized |& FileCheck %s
14+
# RUN: llvm-bolt %t.out -o %t.out.1 --print-normalized 2>&1 | FileCheck %s
1515

1616
# CHECK: BOLT-INFO: Linux kernel binary detected
1717
# CHECK: BOLT-INFO: parsed 2 SMP lock entries

bolt/test/X86/linux-static-calls.s

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,11 @@
99
## Verify static calls bindings to instructions.
1010

1111
# RUN: llvm-bolt %t.exe --print-normalized -o %t.out --keep-nops=0 \
12-
# RUN: --bolt-info=0 |& FileCheck %s
12+
# RUN: --bolt-info=0 2>&1 | FileCheck %s
1313

1414
## Verify the bindings again on the rewritten binary with nops removed.
1515

16-
# RUN: llvm-bolt %t.out -o %t.out.1 --print-normalized |& FileCheck %s
16+
# RUN: llvm-bolt %t.out -o %t.out.1 --print-normalized 2>&1 | FileCheck %s
1717

1818
# CHECK: BOLT-INFO: Linux kernel binary detected
1919
# CHECK: BOLT-INFO: parsed 2 static call entries

bolt/test/X86/linux-static-keys.s

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,17 +11,17 @@
1111
## Verify static keys jump bindings to instructions.
1212

1313
# RUN: llvm-bolt %t.exe --print-normalized -o %t.out --keep-nops=0 \
14-
# RUN: --bolt-info=0 |& FileCheck %s
14+
# RUN: --bolt-info=0 2>&1 | FileCheck %s
1515

1616
## Verify that profile is matched correctly.
1717

1818
# RUN: llvm-bolt %t.exe --print-normalized -o %t.out --keep-nops=0 \
19-
# RUN: --bolt-info=0 --data %t.fdata |& \
20-
# RUN: FileCheck --check-prefix=CHECK-FDATA %s
19+
# RUN: --bolt-info=0 --data %t.fdata 2>&1 \
20+
# RUN: | FileCheck --check-prefix=CHECK-FDATA %s
2121

2222
## Verify the bindings again on the rewritten binary with nops removed.
2323

24-
# RUN: llvm-bolt %t.out -o %t.out.1 --print-normalized |& FileCheck %s
24+
# RUN: llvm-bolt %t.out -o %t.out.1 --print-normalized 2>&1 | FileCheck %s
2525

2626
# CHECK: BOLT-INFO: Linux kernel binary detected
2727
# CHECK: BOLT-INFO: parsed 2 static keys jump entries

bolt/test/X86/pt_gnu_relro.s

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
# READELF: 04 .got
2323

2424
# RUN: llvm-bolt %t.exe --relocs -o %t.null -v=1 \
25-
# RUN: |& FileCheck --check-prefix=BOLT %s
25+
# RUN: 2>&1 | FileCheck --check-prefix=BOLT %s
2626
# BOLT: BOLT-INFO: marking .got as GNU_RELRO
2727

2828
.globl _start

bolt/test/X86/unclaimed-jt-entries.s

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818

1919
# RUN: llvm-mc -filetype=obj -triple x86_64-unknown-unknown %s -o %t.o
2020
# RUN: %clang %cflags -no-pie %t.o -o %t.exe -Wl,-q
21-
# RUN: llvm-bolt %t.exe -v=1 -o %t.out |& FileCheck %s
21+
# RUN: llvm-bolt %t.exe -v=1 -o %t.out 2>&1 | FileCheck %s
2222

2323
# CHECK: BOLT-WARNING: unclaimed data to code reference (possibly an unrecognized jump table entry) to .Ltmp[[#]] in main
2424
# CHECK: BOLT-WARNING: unclaimed data to code reference (possibly an unrecognized jump table entry) to .Ltmp[[#]] in main

bolt/test/X86/vararg.test

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
REQUIRES: x86_64-linux
66

77
RUN: %clangxx %cxxflags -no-pie %p/../Inputs/vararg.s -o %t -Wl,-q
8-
RUN: llvm-bolt %t -o %t.null --print-cfg --print-only=.*printf.* |& FileCheck %s
8+
RUN: llvm-bolt %t -o %t.null --print-cfg --print-only=.*printf.* 2>&1 | FileCheck %s
99

1010
CHECK: IsSimple : 0
1111
CHECK: Entry Point

bolt/test/runtime/X86/unclaimed-jt-entries.s

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818

1919
# RUN: llvm-mc -filetype=obj -triple x86_64-unknown-unknown %s -o %t.o
2020
# RUN: %clang %cflags %S/Inputs/unclaimed-jt-entries.c -no-pie %t.o -o %t.exe -Wl,-q
21-
# RUN: llvm-bolt %t.exe -v=1 -o %t.out --sequential-disassembly |& FileCheck %s
21+
# RUN: llvm-bolt %t.exe -v=1 -o %t.out --sequential-disassembly 2>&1 | FileCheck %s
2222

2323
# CHECK: BOLT-WARNING: unclaimed data to code reference (possibly an unrecognized jump table entry) to .Ltmp[[#]] in func
2424
# CHECK: BOLT-WARNING: unclaimed data to code reference (possibly an unrecognized jump table entry) to .Ltmp[[#]] in func

clang-tools-extra/clang-doc/HTMLGenerator.cpp

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -352,6 +352,7 @@ genHTML(const EnumInfo &I, const ClangDocContext &CDCtx);
352352
static std::vector<std::unique_ptr<TagNode>>
353353
genHTML(const FunctionInfo &I, const ClangDocContext &CDCtx,
354354
StringRef ParentInfoDir);
355+
static std::unique_ptr<TagNode> genHTML(const std::vector<CommentInfo> &C);
355356

356357
static std::vector<std::unique_ptr<TagNode>>
357358
genEnumsBlock(const std::vector<EnumInfo> &Enums,
@@ -418,9 +419,13 @@ genRecordMembersBlock(const llvm::SmallVector<MemberTypeInfo, 4> &Members,
418419
if (Access != "")
419420
Access = Access + " ";
420421
auto LIBody = std::make_unique<TagNode>(HTMLTag::TAG_LI);
421-
LIBody->Children.emplace_back(std::make_unique<TextNode>(Access));
422-
LIBody->Children.emplace_back(genReference(M.Type, ParentInfoDir));
423-
LIBody->Children.emplace_back(std::make_unique<TextNode>(" " + M.Name));
422+
auto MemberDecl = std::make_unique<TagNode>(HTMLTag::TAG_DIV);
423+
MemberDecl->Children.emplace_back(std::make_unique<TextNode>(Access));
424+
MemberDecl->Children.emplace_back(genReference(M.Type, ParentInfoDir));
425+
MemberDecl->Children.emplace_back(std::make_unique<TextNode>(" " + M.Name));
426+
if (!M.Description.empty())
427+
LIBody->Children.emplace_back(genHTML(M.Description));
428+
LIBody->Children.emplace_back(std::move(MemberDecl));
424429
ULBody->Children.emplace_back(std::move(LIBody));
425430
}
426431
return Out;

clang-tools-extra/test/clang-doc/basic-project.test

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -91,8 +91,10 @@
9191
// HTML-RECTANGLE: <a href="Shape.html">Shape</a>
9292
// HTML-RECTANGLE: </p>
9393
// HTML-RECTANGLE: <h2 id="Members">Members</h2>
94-
// HTML-RECTANGLE: <li>private double width_</li>
95-
// HTML-RECTANGLE: <li>private double height_</li>
94+
// HTML-RECTANGLE: <p> Width of the rectangle.</p>
95+
// HTML-RECTANGLE: <div>private double width_</div>
96+
// HTML-RECTANGLE: <p> Height of the rectangle.</p>
97+
// HTML-RECTANGLE: <div>private double height_</div>
9698
// HTML-RECTANGLE: <h2 id="Functions">Functions</h2>
9799
// HTML-RECTANGLE: <h3 id="{{([0-9A-F]{40})}}">Rectangle</h3>
98100
// HTML-RECTANGLE: <p>public void Rectangle(double width, double height)</p>
@@ -112,7 +114,8 @@
112114
// HTML-CIRCLE: <a href="Shape.html">Shape</a>
113115
// HTML-CIRCLE: </p>
114116
// HTML-CIRCLE: <h2 id="Members">Members</h2>
115-
// HTML-CIRCLE: <li>private double radius_</li>
117+
// HTML-CIRCLE: <p> Radius of the circle.</p>
118+
// HTML-CIRCLE: <div>private double radius_</div>
116119
// HTML-CIRCLE: <h2 id="Functions">Functions</h2>
117120
// HTML-CIRCLE: <h3 id="{{([0-9A-F]{40})}}">Circle</h3>
118121
// HTML-CIRCLE: <p>public void Circle(double radius)</p>

clang-tools-extra/unittests/clang-doc/HTMLGeneratorTest.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,9 @@ TEST(HTMLGeneratorTest, emitRecordHTML) {
197197
</p>
198198
<h2 id="Members">Members</h2>
199199
<ul>
200-
<li>private int X</li>
200+
<li>
201+
<div>private int X</div>
202+
</li>
201203
</ul>
202204
<h2 id="Records">Records</h2>
203205
<ul>

clang/docs/ReleaseNotes.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -217,6 +217,8 @@ Bug Fixes to C++ Support
217217
- Clang now preserves the unexpanded flag in a lambda transform used for pack expansion. (#GH56852), (#GH85667),
218218
(#GH99877).
219219
- Fixed a bug when diagnosing ambiguous explicit specializations of constrained member functions.
220+
- Fixed an assertion failure when selecting a function from an overload set that includes a
221+
specialization of a conversion function template.
220222

221223
Bug Fixes to AST Handling
222224
^^^^^^^^^^^^^^^^^^^^^^^^^

clang/include/clang/AST/ASTContext.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@
3434
#include "llvm/ADT/MapVector.h"
3535
#include "llvm/ADT/PointerIntPair.h"
3636
#include "llvm/ADT/PointerUnion.h"
37+
#include "llvm/ADT/SetVector.h"
3738
#include "llvm/ADT/SmallVector.h"
3839
#include "llvm/ADT/StringMap.h"
3940
#include "llvm/ADT/StringRef.h"
@@ -1194,8 +1195,8 @@ class ASTContext : public RefCountedBase<ASTContext> {
11941195
llvm::DenseSet<const VarDecl *> CUDADeviceVarODRUsedByHost;
11951196

11961197
/// Keep track of CUDA/HIP external kernels or device variables ODR-used by
1197-
/// host code.
1198-
llvm::DenseSet<const ValueDecl *> CUDAExternalDeviceDeclODRUsedByHost;
1198+
/// host code. SetVector is used to maintain the order.
1199+
llvm::SetVector<const ValueDecl *> CUDAExternalDeviceDeclODRUsedByHost;
11991200

12001201
/// Keep track of CUDA/HIP implicit host device functions used on device side
12011202
/// in device compilation.

clang/include/clang/Basic/DiagnosticASTKinds.td

Lines changed: 24 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -166,15 +166,22 @@ def note_constexpr_heap_alloc_limit_exceeded : Note<
166166
def note_constexpr_this : Note<
167167
"%select{|implicit }0use of 'this' pointer is only allowed within the "
168168
"evaluation of a call to a 'constexpr' member function">;
169-
def note_constexpr_lifetime_ended : Note<
169+
def access_kind : TextSubstitution<
170170
"%select{read of|read of|assignment to|increment of|decrement of|"
171171
"member call on|dynamic_cast of|typeid applied to|construction of|"
172-
"destruction of}0 %select{temporary|variable}1 whose "
173-
"%plural{8:storage duration|:lifetime}0 has ended">;
174-
def note_constexpr_access_uninit : Note<
172+
"destruction of}0">;
173+
def access_kind_subobject : TextSubstitution<
175174
"%select{read of|read of|assignment to|increment of|decrement of|"
176175
"member call on|dynamic_cast of|typeid applied to|"
177-
"construction of subobject of|destruction of}0 "
176+
"construction of subobject of|destruction of}0">;
177+
def access_kind_volatile : TextSubstitution<
178+
"%select{read of|read of|assignment to|increment of|decrement of|"
179+
"<ERROR>|<ERROR>|<ERROR>|<ERROR>|<ERROR>}0">;
180+
def note_constexpr_lifetime_ended : Note<
181+
"%sub{access_kind}0 %select{temporary|variable}1 whose "
182+
"%plural{8:storage duration|:lifetime}0 has ended">;
183+
def note_constexpr_access_uninit : Note<
184+
"%sub{access_kind_subobject}0 "
178185
"%select{object outside its lifetime|uninitialized object}1 "
179186
"is not allowed in a constant expression">;
180187
def note_constexpr_use_uninit_reference : Note<
@@ -184,20 +191,16 @@ def note_constexpr_modify_const_type : Note<
184191
"modification of object of const-qualified type %0 is not allowed "
185192
"in a constant expression">;
186193
def note_constexpr_access_volatile_type : Note<
187-
"%select{read of|read of|assignment to|increment of|decrement of|"
188-
"<ERROR>|<ERROR>|<ERROR>|<ERROR>}0 "
194+
"%sub{access_kind_volatile}0 "
189195
"volatile-qualified type %1 is not allowed in a constant expression">;
190196
def note_constexpr_access_volatile_obj : Note<
191-
"%select{read of|read of|assignment to|increment of|decrement of|"
192-
"<ERROR>|<ERROR>|<ERROR>|<ERROR>}0 "
197+
"%sub{access_kind_volatile}0 "
193198
"volatile %select{temporary|object %2|member %2}1 is not allowed in "
194199
"a constant expression">;
195200
def note_constexpr_volatile_here : Note<
196201
"volatile %select{temporary created|object declared|member declared}0 here">;
197202
def note_constexpr_access_mutable : Note<
198-
"%select{read of|read of|assignment to|increment of|decrement of|"
199-
"member call on|dynamic_cast of|typeid applied to|construction of|"
200-
"destruction of}0 "
203+
"%sub{access_kind}0 "
201204
"mutable member %1 is not allowed in a constant expression">;
202205
def note_constexpr_ltor_non_const_int : Note<
203206
"read of non-const variable %0 is not allowed in a constant expression">;
@@ -209,47 +212,28 @@ def note_constexpr_ltor_non_constexpr : Note<
209212
def note_constexpr_ltor_incomplete_type : Note<
210213
"read of incomplete type %0 is not allowed in a constant expression">;
211214
def note_constexpr_access_null : Note<
212-
"%select{read of|read of|assignment to|increment of|decrement of|"
213-
"member call on|dynamic_cast of|typeid applied to|construction of|"
214-
"destruction of}0 "
215+
"%sub{access_kind}0 "
215216
"dereferenced null pointer is not allowed in a constant expression">;
216217
def note_constexpr_access_past_end : Note<
217-
"%select{read of|read of|assignment to|increment of|decrement of|"
218-
"member call on|dynamic_cast of|typeid applied to|construction of|"
219-
"destruction of}0 "
220-
"dereferenced one-past-the-end pointer is not allowed "
221-
"in a constant expression">;
218+
"%sub{access_kind}0 dereferenced one-past-the-end pointer "
219+
"is not allowed in a constant expression">;
222220
def note_constexpr_access_unsized_array : Note<
223-
"%select{read of|read of|assignment to|increment of|decrement of|"
224-
"member call on|dynamic_cast of|typeid applied to|construction of|"
225-
"destruction of}0 "
226-
"element of array without known bound "
221+
"%sub{access_kind}0 element of array without known bound "
227222
"is not allowed in a constant expression">;
228223
def note_constexpr_access_inactive_union_member : Note<
229-
"%select{read of|read of|assignment to|increment of|decrement of|"
230-
"member call on|dynamic_cast of|typeid applied to|"
231-
"construction of subobject of|destruction of}0 "
224+
"%sub{access_kind_subobject}0 "
232225
"member %1 of union with %select{active member %3|no active member}2 "
233226
"is not allowed in a constant expression">;
234227
def note_constexpr_union_member_change_during_init : Note<
235228
"assignment would change active union member during the initialization of "
236229
"a different member of the same union">;
237230
def note_constexpr_access_static_temporary : Note<
238-
"%select{read of|read of|assignment to|increment of|decrement of|"
239-
"member call on|dynamic_cast of|typeid applied to|reconstruction of|"
240-
"destruction of}0 temporary "
241-
"is not allowed in a constant expression outside the expression that "
242-
"created the temporary">;
231+
"%sub{access_kind}0 temporary is not allowed in a constant expression "
232+
"outside the expression that created the temporary">;
243233
def note_constexpr_access_unreadable_object : Note<
244-
"%select{read of|read of|assignment to|increment of|decrement of|"
245-
"member call on|dynamic_cast of|typeid applied to|construction of|"
246-
"destruction of}0 "
247-
"object '%1' whose value is not known">;
234+
"%sub{access_kind}0 object '%1' whose value is not known">;
248235
def note_constexpr_access_deleted_object : Note<
249-
"%select{read of|read of|assignment to|increment of|decrement of|"
250-
"member call on|dynamic_cast of|typeid applied to|construction of|"
251-
"destruction of}0 "
252-
"heap allocated object that has been deleted">;
236+
"%sub{access_kind}0 heap allocated object that has been deleted">;
253237
def note_constexpr_modify_global : Note<
254238
"a constant expression cannot modify an object that is visible outside "
255239
"that expression">;

0 commit comments

Comments
 (0)