Skip to content

Commit 02bf4c0

Browse files
authored
merge main into amd-staging (llvm#2658)
2 parents b99ae40 + 205cb36 commit 02bf4c0

File tree

50 files changed

+1318
-510
lines changed

Some content is hidden

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

50 files changed

+1318
-510
lines changed

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,7 @@ mergeInfos(std::vector<std::unique_ptr<Info>> &Values) {
147147
return llvm::createStringError(llvm::inconvertibleErrorCode(),
148148
"unexpected info type");
149149
}
150+
llvm_unreachable("unhandled enumerator");
150151
}
151152

152153
bool CommentInfo::operator==(const CommentInfo &Other) const {

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -392,6 +392,7 @@ std::string serialize(std::unique_ptr<Info> &I) {
392392
case InfoType::IT_default:
393393
return "";
394394
}
395+
llvm_unreachable("unhandled enumerator");
395396
}
396397

397398
static void parseFullComment(const FullComment *C, CommentInfo &CI) {

clang/docs/ReleaseNotes.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -720,6 +720,7 @@ Bug Fixes in This Version
720720
- Fixed a bug with constexpr evaluation for structs containing unions in case of C++ modules. (#GH143168)
721721
- Fixed incorrect token location when emitting diagnostics for tokens expanded from macros. (#GH143216)
722722
- Fixed an infinite recursion when checking constexpr destructors. (#GH141789)
723+
- Fixed a crash when a malformed using declaration appears in a ``constexpr`` function. (#GH144264)
723724

724725
Bug Fixes to Compiler Builtins
725726
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

clang/include/clang/Basic/DiagnosticGroups.td

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -815,19 +815,22 @@ changes to one object won't affect the others, the object's initializer will run
815815
once per copy, etc.
816816

817817
Specifically, this warning fires when it detects an object which:
818-
1. Is defined as ``inline`` in a header file (so it might get compiled into multiple libaries), and
819-
2. Has external linkage (otherwise it's supposed to be duplicated), and
820-
3. Has hidden visibility (posix) or lacks a dllimport/dllexport attribute (windows).
818+
819+
#. Is defined as ``inline`` in a header file (so it might get compiled into multiple libaries), and
820+
#. Has external linkage (otherwise it's supposed to be duplicated), and
821+
#. Has hidden visibility (posix) or lacks a dllimport/dllexport attribute (windows).
821822

822823
As well as one of the following:
823-
1. The object is mutable, or
824-
2. The object's initializer definitely has side effects.
824+
825+
#. The object is mutable, or
826+
#. The object's initializer definitely has side effects.
825827

826828
The warning can be resolved by removing one of the conditions above. In rough
827829
order of preference, this may be done by:
828-
1. Marking the object ``const`` (if possible)
829-
2. Moving the object's definition to a source file
830-
3. Making the object visible using ``__attribute((visibility("default")))``,
830+
831+
#. Marking the object ``const`` (if possible)
832+
#. Moving the object's definition to a source file
833+
#. Making the object visible using ``__attribute((visibility("default")))``,
831834
``__declspec(dllimport)``, or ``__declspec(dllexport)``.
832835

833836
When annotating an object with ``__declspec(dllimport)`` or ``__declspec(dllexport)``,

clang/lib/Parse/ParseDeclCXX.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -760,6 +760,10 @@ Parser::DeclGroupPtrTy Parser::ParseUsingDeclaration(
760760

761761
Decl *AD = ParseAliasDeclarationAfterDeclarator(
762762
TemplateInfo, UsingLoc, D, DeclEnd, AS, Attrs, &DeclFromDeclSpec);
763+
764+
if (!AD)
765+
return nullptr;
766+
763767
return Actions.ConvertDeclToDeclGroup(AD, DeclFromDeclSpec);
764768
}
765769

clang/test/Driver/print-enabled-extensions/riscv-andes-a25.c

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
// CHECK-NEXT: f 2.2 'F' (Single-Precision Floating-Point)
1111
// CHECK-NEXT: d 2.2 'D' (Double-Precision Floating-Point)
1212
// CHECK-NEXT: c 2.0 'C' (Compressed Instructions)
13+
// CHECK-NEXT: b 1.0 'B' (the collection of the Zba, Zbb, Zbs extensions)
1314
// CHECK-NEXT: zicsr 2.0 'Zicsr' (CSRs)
1415
// CHECK-NEXT: zifencei 2.0 'Zifencei' (fence.i)
1516
// CHECK-NEXT: zmmul 1.0 'Zmmul' (Integer Multiplication)
@@ -18,8 +19,12 @@
1819
// CHECK-NEXT: zca 1.0 'Zca' (part of the C extension, excluding compressed floating point loads/stores)
1920
// CHECK-NEXT: zcd 1.0 'Zcd' (Compressed Double-Precision Floating-Point Instructions)
2021
// CHECK-NEXT: zcf 1.0 'Zcf' (Compressed Single-Precision Floating-Point Instructions)
22+
// CHECK-NEXT: zba 1.0 'Zba' (Address Generation Instructions)
23+
// CHECK-NEXT: zbb 1.0 'Zbb' (Basic Bit-Manipulation)
24+
// CHECK-NEXT: zbc 1.0 'Zbc' (Carry-Less Multiplication)
25+
// CHECK-NEXT: zbs 1.0 'Zbs' (Single-Bit Instructions)
2126
// CHECK-NEXT: xandesperf 5.0 'XAndesPerf' (Andes Performance Extension)
2227
// CHECK-EMPTY:
2328
// CHECK-NEXT: Experimental extensions
2429
// CHECK-EMPTY:
25-
// CHECK-NEXT: ISA String: rv32i2p1_m2p0_a2p1_f2p2_d2p2_c2p0_zicsr2p0_zifencei2p0_zmmul1p0_zaamo1p0_zalrsc1p0_zca1p0_zcd1p0_zcf1p0_xandesperf5p0
30+
// CHECK-NEXT: ISA String: rv32i2p1_m2p0_a2p1_f2p2_d2p2_c2p0_b1p0_zicsr2p0_zifencei2p0_zmmul1p0_zaamo1p0_zalrsc1p0_zca1p0_zcd1p0_zcf1p0_zba1p0_zbb1p0_zbc1p0_zbs1p0_xandesperf5p0

clang/test/Driver/print-enabled-extensions/riscv-andes-a45.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
// CHECK-NEXT: f 2.2 'F' (Single-Precision Floating-Point)
1111
// CHECK-NEXT: d 2.2 'D' (Double-Precision Floating-Point)
1212
// CHECK-NEXT: c 2.0 'C' (Compressed Instructions)
13+
// CHECK-NEXT: b 1.0 'B' (the collection of the Zba, Zbb, Zbs extensions)
1314
// CHECK-NEXT: zicsr 2.0 'Zicsr' (CSRs)
1415
// CHECK-NEXT: zifencei 2.0 'Zifencei' (fence.i)
1516
// CHECK-NEXT: zmmul 1.0 'Zmmul' (Integer Multiplication)
@@ -18,8 +19,11 @@
1819
// CHECK-NEXT: zca 1.0 'Zca' (part of the C extension, excluding compressed floating point loads/stores)
1920
// CHECK-NEXT: zcd 1.0 'Zcd' (Compressed Double-Precision Floating-Point Instructions)
2021
// CHECK-NEXT: zcf 1.0 'Zcf' (Compressed Single-Precision Floating-Point Instructions)
22+
// CHECK-NEXT: zba 1.0 'Zba' (Address Generation Instructions)
23+
// CHECK-NEXT: zbb 1.0 'Zbb' (Basic Bit-Manipulation)
24+
// CHECK-NEXT: zbs 1.0 'Zbs' (Single-Bit Instructions)
2125
// CHECK-NEXT: xandesperf 5.0 'XAndesPerf' (Andes Performance Extension)
2226
// CHECK-EMPTY:
2327
// CHECK-NEXT: Experimental extensions
2428
// CHECK-EMPTY:
25-
// CHECK-NEXT: ISA String: rv32i2p1_m2p0_a2p1_f2p2_d2p2_c2p0_zicsr2p0_zifencei2p0_zmmul1p0_zaamo1p0_zalrsc1p0_zca1p0_zcd1p0_zcf1p0_xandesperf5p0
29+
// CHECK-NEXT: ISA String: rv32i2p1_m2p0_a2p1_f2p2_d2p2_c2p0_b1p0_zicsr2p0_zifencei2p0_zmmul1p0_zaamo1p0_zalrsc1p0_zca1p0_zcd1p0_zcf1p0_zba1p0_zbb1p0_zbs1p0_xandesperf5p0

clang/test/Driver/print-enabled-extensions/riscv-andes-ax25.c

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,20 @@
1010
// CHECK-NEXT: f 2.2 'F' (Single-Precision Floating-Point)
1111
// CHECK-NEXT: d 2.2 'D' (Double-Precision Floating-Point)
1212
// CHECK-NEXT: c 2.0 'C' (Compressed Instructions)
13+
// CHECK-NEXT: b 1.0 'B' (the collection of the Zba, Zbb, Zbs extensions)
1314
// CHECK-NEXT: zicsr 2.0 'Zicsr' (CSRs)
1415
// CHECK-NEXT: zifencei 2.0 'Zifencei' (fence.i)
1516
// CHECK-NEXT: zmmul 1.0 'Zmmul' (Integer Multiplication)
1617
// CHECK-NEXT: zaamo 1.0 'Zaamo' (Atomic Memory Operations)
1718
// CHECK-NEXT: zalrsc 1.0 'Zalrsc' (Load-Reserved/Store-Conditional)
1819
// CHECK-NEXT: zca 1.0 'Zca' (part of the C extension, excluding compressed floating point loads/stores)
1920
// CHECK-NEXT: zcd 1.0 'Zcd' (Compressed Double-Precision Floating-Point Instructions)
21+
// CHECK-NEXT: zba 1.0 'Zba' (Address Generation Instructions)
22+
// CHECK-NEXT: zbb 1.0 'Zbb' (Basic Bit-Manipulation)
23+
// CHECK-NEXT: zbc 1.0 'Zbc' (Carry-Less Multiplication)
24+
// CHECK-NEXT: zbs 1.0 'Zbs' (Single-Bit Instructions)
2025
// CHECK-NEXT: xandesperf 5.0 'XAndesPerf' (Andes Performance Extension)
2126
// CHECK-EMPTY:
2227
// CHECK-NEXT: Experimental extensions
2328
// CHECK-EMPTY:
24-
// CHECK-NEXT: ISA String: rv64i2p1_m2p0_a2p1_f2p2_d2p2_c2p0_zicsr2p0_zifencei2p0_zmmul1p0_zaamo1p0_zalrsc1p0_zca1p0_zcd1p0_xandesperf5p0
29+
// CHECK-NEXT: ISA String: rv64i2p1_m2p0_a2p1_f2p2_d2p2_c2p0_b1p0_zicsr2p0_zifencei2p0_zmmul1p0_zaamo1p0_zalrsc1p0_zca1p0_zcd1p0_zba1p0_zbb1p0_zbc1p0_zbs1p0_xandesperf5p0

clang/test/Driver/print-enabled-extensions/riscv-andes-ax45.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,19 @@
1010
// CHECK-NEXT: f 2.2 'F' (Single-Precision Floating-Point)
1111
// CHECK-NEXT: d 2.2 'D' (Double-Precision Floating-Point)
1212
// CHECK-NEXT: c 2.0 'C' (Compressed Instructions)
13+
// CHECK-NEXT: b 1.0 'B' (the collection of the Zba, Zbb, Zbs extensions)
1314
// CHECK-NEXT: zicsr 2.0 'Zicsr' (CSRs)
1415
// CHECK-NEXT: zifencei 2.0 'Zifencei' (fence.i)
1516
// CHECK-NEXT: zmmul 1.0 'Zmmul' (Integer Multiplication)
1617
// CHECK-NEXT: zaamo 1.0 'Zaamo' (Atomic Memory Operations)
1718
// CHECK-NEXT: zalrsc 1.0 'Zalrsc' (Load-Reserved/Store-Conditional)
1819
// CHECK-NEXT: zca 1.0 'Zca' (part of the C extension, excluding compressed floating point loads/stores)
1920
// CHECK-NEXT: zcd 1.0 'Zcd' (Compressed Double-Precision Floating-Point Instructions)
21+
// CHECK-NEXT: zba 1.0 'Zba' (Address Generation Instructions)
22+
// CHECK-NEXT: zbb 1.0 'Zbb' (Basic Bit-Manipulation)
23+
// CHECK-NEXT: zbs 1.0 'Zbs' (Single-Bit Instructions)
2024
// CHECK-NEXT: xandesperf 5.0 'XAndesPerf' (Andes Performance Extension)
2125
// CHECK-EMPTY:
2226
// CHECK-NEXT: Experimental extensions
2327
// CHECK-EMPTY:
24-
// CHECK-NEXT: ISA String: rv64i2p1_m2p0_a2p1_f2p2_d2p2_c2p0_zicsr2p0_zifencei2p0_zmmul1p0_zaamo1p0_zalrsc1p0_zca1p0_zcd1p0_xandesperf5p0
28+
// CHECK-NEXT: ISA String: rv64i2p1_m2p0_a2p1_f2p2_d2p2_c2p0_b1p0_zicsr2p0_zifencei2p0_zmmul1p0_zaamo1p0_zalrsc1p0_zca1p0_zcd1p0_zba1p0_zbb1p0_zbs1p0_xandesperf5p0

clang/test/Driver/print-enabled-extensions/riscv-andes-n45.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
// CHECK-NEXT: f 2.2 'F' (Single-Precision Floating-Point)
1111
// CHECK-NEXT: d 2.2 'D' (Double-Precision Floating-Point)
1212
// CHECK-NEXT: c 2.0 'C' (Compressed Instructions)
13+
// CHECK-NEXT: b 1.0 'B' (the collection of the Zba, Zbb, Zbs extensions)
1314
// CHECK-NEXT: zicsr 2.0 'Zicsr' (CSRs)
1415
// CHECK-NEXT: zifencei 2.0 'Zifencei' (fence.i)
1516
// CHECK-NEXT: zmmul 1.0 'Zmmul' (Integer Multiplication)
@@ -18,8 +19,11 @@
1819
// CHECK-NEXT: zca 1.0 'Zca' (part of the C extension, excluding compressed floating point loads/stores)
1920
// CHECK-NEXT: zcd 1.0 'Zcd' (Compressed Double-Precision Floating-Point Instructions)
2021
// CHECK-NEXT: zcf 1.0 'Zcf' (Compressed Single-Precision Floating-Point Instructions)
22+
// CHECK-NEXT: zba 1.0 'Zba' (Address Generation Instructions)
23+
// CHECK-NEXT: zbb 1.0 'Zbb' (Basic Bit-Manipulation)
24+
// CHECK-NEXT: zbs 1.0 'Zbs' (Single-Bit Instructions)
2125
// CHECK-NEXT: xandesperf 5.0 'XAndesPerf' (Andes Performance Extension)
2226
// CHECK-EMPTY:
2327
// CHECK-NEXT: Experimental extensions
2428
// CHECK-EMPTY:
25-
// CHECK-NEXT: ISA String: rv32i2p1_m2p0_a2p1_f2p2_d2p2_c2p0_zicsr2p0_zifencei2p0_zmmul1p0_zaamo1p0_zalrsc1p0_zca1p0_zcd1p0_zcf1p0_xandesperf5p0
29+
// CHECK-NEXT: ISA String: rv32i2p1_m2p0_a2p1_f2p2_d2p2_c2p0_b1p0_zicsr2p0_zifencei2p0_zmmul1p0_zaamo1p0_zalrsc1p0_zca1p0_zcd1p0_zcf1p0_zba1p0_zbb1p0_zbs1p0_xandesperf5p0

0 commit comments

Comments
 (0)