Skip to content

Commit 8e11ee6

Browse files
authored
Merge branch 'main' into cir_aggre_unary_extension
2 parents ffc3a69 + 8243c36 commit 8e11ee6

File tree

519 files changed

+24421
-7506
lines changed

Some content is hidden

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

519 files changed

+24421
-7506
lines changed

.github/workflows/libcxx-build-and-test.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -281,6 +281,10 @@ jobs:
281281
- name: Set up the MSVC dev environment
282282
if: ${{ matrix.mingw != true }}
283283
uses: ilammy/msvc-dev-cmd@0b201ec74fa43914dc39ae48a89fd1d8cb592756 # v1.13.0
284+
- name: Add the installed Clang at the start of the path
285+
if: ${{ matrix.mingw != true }}
286+
run: |
287+
echo "c:\Program Files\LLVM\bin" | Out-File -FilePath $Env:GITHUB_PATH -Encoding utf8 -Append
284288
- name: Build and test
285289
run: |
286290
bash libcxx/utils/ci/run-buildbot ${{ matrix.config }}

bolt/utils/dot2html/d3-graphviz-template.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
<!DOCTYPE html>
22
<meta charset="utf-8">
33
<body>
4-
<script src="https://d3js.org/d3.v5.min.js"></script>
5-
<script src="https://unpkg.com/@hpcc-js/wasm@0.3.11/dist/index.min.js"></script>
6-
<script src="https://unpkg.com/d3-graphviz@3.0.5/build/d3-graphviz.js"></script>
4+
<script src="https://d3js.org/d3.v7.min.js"></script>
5+
<script src="https://unpkg.com/@hpcc-js/wasm@2.20.0/dist/graphviz.umd.js"></script>
6+
<script src="https://unpkg.com/d3-graphviz@5.6.0/build/d3-graphviz.js"></script>
77
<div id="graph" style="text-align: center;"></div>
88
<script>
99
var dotSrc = `

clang-tools-extra/clang-tidy/bugprone/SignedCharMisuseCheck.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,12 @@ static constexpr int UnsignedASCIIUpperBound = 127;
2121
SignedCharMisuseCheck::SignedCharMisuseCheck(StringRef Name,
2222
ClangTidyContext *Context)
2323
: ClangTidyCheck(Name, Context),
24-
CharTypdefsToIgnoreList(Options.get("CharTypdefsToIgnore", "")),
24+
CharTypedefsToIgnoreList(Options.get("CharTypedefsToIgnore", "")),
2525
DiagnoseSignedUnsignedCharComparisons(
2626
Options.get("DiagnoseSignedUnsignedCharComparisons", true)) {}
2727

2828
void SignedCharMisuseCheck::storeOptions(ClangTidyOptions::OptionMap &Opts) {
29-
Options.store(Opts, "CharTypdefsToIgnore", CharTypdefsToIgnoreList);
29+
Options.store(Opts, "CharTypedefsToIgnore", CharTypedefsToIgnoreList);
3030
Options.store(Opts, "DiagnoseSignedUnsignedCharComparisons",
3131
DiagnoseSignedUnsignedCharComparisons);
3232
}
@@ -39,7 +39,7 @@ BindableMatcher<clang::Stmt> SignedCharMisuseCheck::charCastExpression(
3939
// (e.g. typedef char sal_Int8). In this case, we don't need to
4040
// worry about the misinterpretation of char values.
4141
const auto IntTypedef = qualType(hasDeclaration(typedefDecl(
42-
hasAnyName(utils::options::parseStringList(CharTypdefsToIgnoreList)))));
42+
hasAnyName(utils::options::parseStringList(CharTypedefsToIgnoreList)))));
4343

4444
auto CharTypeExpr = expr();
4545
if (IsSigned) {

clang-tools-extra/clang-tidy/bugprone/SignedCharMisuseCheck.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ class SignedCharMisuseCheck : public ClangTidyCheck {
3535
const ast_matchers::internal::Matcher<clang::QualType> &IntegerType,
3636
const std::string &CastBindName) const;
3737

38-
const StringRef CharTypdefsToIgnoreList;
38+
const StringRef CharTypedefsToIgnoreList;
3939
const bool DiagnoseSignedUnsignedCharComparisons;
4040
};
4141

clang-tools-extra/docs/ReleaseNotes.rst

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -54,12 +54,17 @@ Potentially Breaking Changes
5454
:program:`clang-tidy-20`. Users should use the check-specific options of the
5555
same name instead.
5656

57-
- Renamed :program:`clang-tidy`'s option name of check
58-
:doc:`bugprone-easily-swappable-parameters
59-
<clang-tidy/checks/bugprone/easily-swappable-parameters>` from
60-
``NamePrefixSuffixSilenceDissimilarityTreshold`` to
61-
``NamePrefixSuffixSilenceDissimilarityThreshold``,
62-
correcting a spelling mistake.
57+
- Renamed a few :program:`clang-tidy` check options, as they
58+
were misspelled:
59+
60+
- `NamePrefixSuffixSilenceDissimilarityTreshold` to
61+
`NamePrefixSuffixSilenceDissimilarityThreshold` in
62+
:doc:`bugprone-easily-swappable-parameters
63+
<clang-tidy/checks/bugprone/easily-swappable-parameters>`
64+
65+
- `CharTypdefsToIgnore` to `CharTypedefsToIgnore` in
66+
:doc:`bugprone-signed-char-misuse
67+
<clang-tidy/checks/bugprone/signed-char-misuse>`
6368

6469
Improvements to clangd
6570
----------------------

clang-tools-extra/docs/clang-tidy/checks/bugprone/signed-char-misuse.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ so both arguments will have the same type.
107107
Options
108108
-------
109109

110-
.. option:: CharTypdefsToIgnore
110+
.. option:: CharTypedefsToIgnore
111111

112112
A semicolon-separated list of typedef names. In this list, we can list
113113
typedefs for ``char`` or ``signed char``, which will be ignored by the

clang-tools-extra/test/clang-tidy/checkers/bugprone/signed-char-misuse-with-option.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// RUN: %check_clang_tidy %s bugprone-signed-char-misuse %t \
22
// RUN: -config='{CheckOptions: \
3-
// RUN: {bugprone-signed-char-misuse.CharTypdefsToIgnore: "sal_Int8;int8_t"}}' \
3+
// RUN: {bugprone-signed-char-misuse.CharTypedefsToIgnore: "sal_Int8;int8_t"}}' \
44
// RUN: --
55

66
///////////////////////////////////////////////////////////////////

clang/docs/analyzer/developer-docs/DebugChecks.rst

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,22 @@ The analyzer contains a number of checkers which can aid in debugging. Enable
99
them by using the "-analyzer-checker=" flag, followed by the name of the
1010
checker.
1111

12+
These checkers are especially useful when analyzing a specific function, using
13+
the `-analyze-function` flag. The flag accepts the function name for C code,
14+
like `-analyze-function=myfunction`.
15+
For C++ code, due to overloading, the function name must include the
16+
parameter list, like `-analyze-function="myfunction(int, _Bool)"`.
17+
18+
Note that `bool` must be spelled as `_Bool` in the parameter list.
19+
Refer to the output of `-analyzer-display-progress` to find the fully qualified
20+
function name.
21+
22+
There are cases when this name can still collide. For example with template
23+
function instances with non-deducible (aka. explicit) template parameters.
24+
In such cases, prefer passing a USR instead of a function name can resolve this
25+
ambiguity, like this: `-analyze-function="c:@S@Window@F@overloaded#I#"`.
26+
27+
Use the `clang-extdef-mapping` tool to find the USR for different functions.
1228

1329
General Analysis Dumpers
1430
========================

clang/include/clang/Basic/BuiltinsX86.td

Lines changed: 25 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ def emms : X86Builtin<"void()"> {
5252
let Features = "mmx";
5353
}
5454

55-
let Attributes = [NoThrow, Const, RequiredVectorWidth<64>], Features = "sse" in {
55+
let Attributes = [NoThrow, Const, Constexpr, RequiredVectorWidth<64>], Features = "sse" in {
5656
def vec_ext_v4hi : X86Builtin<"short(_Vector<4, short>, _Constant int)">;
5757
def vec_set_v4hi : X86Builtin<"_Vector<4, short>(_Vector<4, short>, short, _Constant int)">;
5858
}
@@ -92,13 +92,6 @@ let Attributes = [Const, NoThrow, RequiredVectorWidth<128>] in {
9292
def cmpsd : X86Builtin<"_Vector<2, double>(_Vector<2, double>, _Vector<2, double>, _Constant char)">;
9393
}
9494

95-
let Features = "sse2" in {
96-
def vec_ext_v2di : X86Builtin<"long long int(_Vector<2, long long int>, _Constant int)">;
97-
def vec_ext_v4si : X86Builtin<"int(_Vector<4, int>, _Constant int)">;
98-
def vec_ext_v4sf : X86Builtin<"float(_Vector<4, float>, _Constant int)">;
99-
def vec_ext_v8hi : X86Builtin<"short(_Vector<8, short>, _Constant int)">;
100-
def vec_set_v8hi : X86Builtin<"_Vector<8, short>(_Vector<8, short>, short, _Constant int)">;
101-
}
10295

10396
let Features = "sse2", Attributes = [NoThrow, Const, Constexpr, RequiredVectorWidth<128>] in {
10497
def pavgb128 : X86Builtin<"_Vector<16, unsigned char>(_Vector<16, unsigned char>, _Vector<16, unsigned char>)">;
@@ -108,6 +101,12 @@ let Attributes = [Const, NoThrow, RequiredVectorWidth<128>] in {
108101
def packsswb128 : X86Builtin<"_Vector<16, char>(_Vector<8, short>, _Vector<8, short>)">;
109102
def packssdw128 : X86Builtin<"_Vector<8, short>(_Vector<4, int>, _Vector<4, int>)">;
110103
def packuswb128 : X86Builtin<"_Vector<16, char>(_Vector<8, short>, _Vector<8, short>)">;
104+
105+
def vec_ext_v2di : X86Builtin<"long long int(_Vector<2, long long int>, _Constant int)">;
106+
def vec_ext_v4si : X86Builtin<"int(_Vector<4, int>, _Constant int)">;
107+
def vec_ext_v4sf : X86Builtin<"float(_Vector<4, float>, _Constant int)">;
108+
def vec_ext_v8hi : X86Builtin<"short(_Vector<8, short>, _Constant int)">;
109+
def vec_set_v8hi : X86Builtin<"_Vector<8, short>(_Vector<8, short>, short, _Constant int)">;
111110
}
112111

113112
let Features = "sse3" in {
@@ -217,10 +216,13 @@ let Features = "sse2", Attributes = [NoThrow] in {
217216
def movnti : X86Builtin<"void(int *, int)">;
218217
}
219218

220-
let Features = "sse2", Attributes = [NoThrow, Const, RequiredVectorWidth<128>] in {
221-
def pshufd : X86Builtin<"_Vector<4, int>(_Vector<4, int>, _Constant int)">;
219+
let Features = "sse2", Attributes = [NoThrow, Const, Constexpr, RequiredVectorWidth<128>] in {
222220
def pshuflw : X86Builtin<"_Vector<8, short>(_Vector<8, short>, _Constant int)">;
221+
def pshufd : X86Builtin<"_Vector<4, int>(_Vector<4, int>, _Constant int)">;
223222
def pshufhw : X86Builtin<"_Vector<8, short>(_Vector<8, short>, _Constant int)">;
223+
}
224+
225+
let Features = "sse2", Attributes = [NoThrow, Const, RequiredVectorWidth<128>] in {
224226
def psadbw128 : X86Builtin<"_Vector<2, long long int>(_Vector<16, char>, _Vector<16, char>)">;
225227
def sqrtpd : X86Builtin<"_Vector<2, double>(_Vector<2, double>)">;
226228
def sqrtsd : X86Builtin<"_Vector<2, double>(_Vector<2, double>)">;
@@ -323,9 +325,6 @@ let Features = "sse4.1", Attributes = [NoThrow, Const, RequiredVectorWidth<128>]
323325
def ptestnzc128 : X86Builtin<"int(_Vector<2, long long int>, _Vector<2, long long int>)">;
324326
def mpsadbw128 : X86Builtin<"_Vector<16, char>(_Vector<16, char>, _Vector<16, char>, _Constant char)">;
325327
def phminposuw128 : X86Builtin<"_Vector<8, short>(_Vector<8, short>)">;
326-
def vec_ext_v16qi : X86Builtin<"char(_Vector<16, char>, _Constant int)">;
327-
def vec_set_v16qi : X86Builtin<"_Vector<16, char>(_Vector<16, char>, char, _Constant int)">;
328-
def vec_set_v4si : X86Builtin<"_Vector<4, int>(_Vector<4, int>, int, _Constant int)">;
329328
}
330329

331330
let Features = "sse4.1", Attributes = [NoThrow, Const, Constexpr, RequiredVectorWidth<128>] in {
@@ -338,6 +337,10 @@ let Features = "sse4.1", Attributes = [NoThrow, Const, Constexpr, RequiredVector
338337

339338
def pmuldq128 : X86Builtin<"_Vector<2, long long int>(_Vector<4, int>, _Vector<4, int>)">;
340339
def packusdw128 : X86Builtin<"_Vector<8, short>(_Vector<4, int>, _Vector<4, int>)">;
340+
341+
def vec_ext_v16qi : X86Builtin<"char(_Vector<16, char>, _Constant int)">;
342+
def vec_set_v16qi : X86Builtin<"_Vector<16, char>(_Vector<16, char>, char, _Constant int)">;
343+
def vec_set_v4si : X86Builtin<"_Vector<4, int>(_Vector<4, int>, int, _Constant int)">;
341344
}
342345

343346
let Features = "sse4.2", Attributes = [NoThrow, Const, RequiredVectorWidth<128>] in {
@@ -560,7 +563,7 @@ let Features = "avx", Attributes = [NoThrow, RequiredVectorWidth<128>] in {
560563
def maskstoreps : X86Builtin<"void(_Vector<4, float *>, _Vector<4, int>, _Vector<4, float>)">;
561564
}
562565

563-
let Features = "avx", Attributes = [NoThrow, Const, RequiredVectorWidth<256>] in {
566+
let Features = "avx", Attributes = [NoThrow, Const, Constexpr, RequiredVectorWidth<256>] in {
564567
def vec_ext_v32qi : X86Builtin<"char(_Vector<32, char>, _Constant int)">;
565568
def vec_ext_v16hi : X86Builtin<"short(_Vector<16, short>, _Constant int)">;
566569
def vec_ext_v8si : X86Builtin<"int(_Vector<8, int>, _Constant int)">;
@@ -584,9 +587,6 @@ let Features = "avx2", Attributes = [NoThrow, Const, RequiredVectorWidth<256>] i
584587
def pmulhrsw256 : X86Builtin<"_Vector<16, short>(_Vector<16, short>, _Vector<16, short>)">;
585588
def psadbw256 : X86Builtin<"_Vector<4, long long int>(_Vector<32, char>, _Vector<32, char>)">;
586589
def pshufb256 : X86Builtin<"_Vector<32, char>(_Vector<32, char>, _Vector<32, char>)">;
587-
def pshufd256 : X86Builtin<"_Vector<8, int>(_Vector<8, int>, _Constant int)">;
588-
def pshuflw256 : X86Builtin<"_Vector<16, short>(_Vector<16, short>, _Constant int)">;
589-
def pshufhw256 : X86Builtin<"_Vector<16, short>(_Vector<16, short>, _Constant int)">;
590590
def psignb256 : X86Builtin<"_Vector<32, char>(_Vector<32, char>, _Vector<32, char>)">;
591591
def psignw256 : X86Builtin<"_Vector<16, short>(_Vector<16, short>, _Vector<16, short>)">;
592592
def psignd256 : X86Builtin<"_Vector<8, int>(_Vector<8, int>, _Vector<8, int>)">;
@@ -647,6 +647,10 @@ let Features = "avx2", Attributes = [NoThrow, Const, Constexpr, RequiredVectorWi
647647
def packsswb256 : X86Builtin<"_Vector<32, char>(_Vector<16, short>, _Vector<16, short>)">;
648648
def packssdw256 : X86Builtin<"_Vector<16, short>(_Vector<8, int>, _Vector<8, int>)">;
649649
def packuswb256 : X86Builtin<"_Vector<32, char>(_Vector<16, short>, _Vector<16, short>)">;
650+
651+
def pshuflw256 : X86Builtin<"_Vector<16, short>(_Vector<16, short>, _Constant int)">;
652+
def pshufhw256 : X86Builtin<"_Vector<16, short>(_Vector<16, short>, _Constant int)">;
653+
def pshufd256 : X86Builtin<"_Vector<8, int>(_Vector<8, int>, _Constant int)">;
650654
}
651655

652656
let Features = "avx2", Attributes = [NoThrow, Const, Constexpr, RequiredVectorWidth<128>] in {
@@ -1017,6 +1021,7 @@ let Features = "avx512f", Attributes = [NoThrow, Const, RequiredVectorWidth<512>
10171021
let Features = "avx512f", Attributes = [NoThrow, Const, Constexpr, RequiredVectorWidth<512>] in {
10181022
def pmuldq512 : X86Builtin<"_Vector<8, long long int>(_Vector<16, int>, _Vector<16, int>)">;
10191023
def pmuludq512 : X86Builtin<"_Vector<8, long long int>(_Vector<16, int>, _Vector<16, int>)">;
1024+
def pshufd512 : X86Builtin<"_Vector<16, int>(_Vector<16, int>, _Constant int)">;
10201025
}
10211026

10221027
let Features = "avx512f", Attributes = [NoThrow, RequiredVectorWidth<512>] in {
@@ -1990,13 +1995,13 @@ let Features = "avx512vl", Attributes = [NoThrow, Const, Constexpr, RequiredVect
19901995
}
19911996

19921997
let Features = "avx512bw", Attributes = [NoThrow, Const, RequiredVectorWidth<512>] in {
1993-
def pshufhw512 : X86Builtin<"_Vector<32, short>(_Vector<32, short>, _Constant int)">;
1994-
def pshuflw512 : X86Builtin<"_Vector<32, short>(_Vector<32, short>, _Constant int)">;
19951998
def psllw512 : X86Builtin<"_Vector<32, short>(_Vector<32, short>, _Vector<8, short>)">;
19961999
}
19972000

19982001
let Features = "avx512bw", Attributes = [NoThrow, Const, Constexpr, RequiredVectorWidth<512>] in {
19992002
def psllv32hi : X86Builtin<"_Vector<32, short>(_Vector<32, short>, _Vector<32, short>)">;
2003+
def pshufhw512 : X86Builtin<"_Vector<32, short>(_Vector<32, short>, _Constant int)">;
2004+
def pshuflw512 : X86Builtin<"_Vector<32, short>(_Vector<32, short>, _Constant int)">;
20002005
}
20012006

20022007
let Features = "avx512bw,avx512vl", Attributes = [NoThrow, Const, Constexpr, RequiredVectorWidth<256>] in {
@@ -2026,8 +2031,7 @@ let Features = "avx512bw,avx512vl", Attributes = [NoThrow, Const, Constexpr, Req
20262031
def psrlv8hi : X86Builtin<"_Vector<8, short>(_Vector<8, short>, _Vector<8, short>)">;
20272032
}
20282033

2029-
let Features = "avx512f",
2030-
Attributes = [NoThrow, Const, Constexpr, RequiredVectorWidth<512>] in {
2034+
let Features = "avx512f", Attributes = [NoThrow, Const, Constexpr, RequiredVectorWidth<512>] in {
20312035
def psrlwi512 : X86Builtin<"_Vector<32, short>(_Vector<32, short>, int)">;
20322036
def psrldi512 : X86Builtin<"_Vector<16, int>(_Vector<16, int>, int)">;
20332037
def psrlqi512 : X86Builtin<"_Vector<8, long long int>(_Vector<8, long long int>, int)">;
@@ -3266,7 +3270,6 @@ let Features = "avx512f", Attributes = [NoThrow, Const, RequiredVectorWidth<128>
32663270
}
32673271

32683272
let Features = "avx512f", Attributes = [NoThrow, Const, RequiredVectorWidth<512>] in {
3269-
def pshufd512 : X86Builtin<"_Vector<16, int>(_Vector<16, int>, _Constant int)">;
32703273
def expanddf512_mask : X86Builtin<"_Vector<8, double>(_Vector<8, double>, _Vector<8, double>, unsigned char)">;
32713274
def expanddi512_mask : X86Builtin<"_Vector<8, long long int>(_Vector<8, long long int>, _Vector<8, long long int>, unsigned char)">;
32723275
}

clang/include/clang/Basic/BuiltinsX86_64.td

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,15 +56,15 @@ let Features = "sse2", Attributes = [NoThrow] in {
5656
def movnti64 : X86Builtin<"void(long long int *, long long int)">;
5757
}
5858

59-
let Features = "sse4.1", Attributes = [NoThrow, Const, RequiredVectorWidth<128>] in {
59+
let Features = "sse4.1", Attributes = [NoThrow, Const, Constexpr, RequiredVectorWidth<128>] in {
6060
def vec_set_v2di : X86Builtin<"_Vector<2, long long int>(_Vector<2, long long int>, long long int, _Constant int)">;
6161
}
6262

6363
let Features = "crc32", Attributes = [NoThrow, Const] in {
6464
def crc32di : X86Builtin<"unsigned long long int(unsigned long long int, unsigned long long int)">;
6565
}
6666

67-
let Features = "avx", Attributes = [NoThrow, Const, RequiredVectorWidth<256>] in {
67+
let Features = "avx", Attributes = [NoThrow, Const, Constexpr, RequiredVectorWidth<256>] in {
6868
def vec_ext_v4di : X86Builtin<"long long int(_Vector<4, long long int>, _Constant int)">;
6969
def vec_set_v4di : X86Builtin<"_Vector<4, long long int>(_Vector<4, long long int>, long long int, _Constant int)">;
7070
}

0 commit comments

Comments
 (0)