Skip to content

Commit 89b3aba

Browse files
Merge branch 'llvm:main' into gh-101657
2 parents 96db5e3 + 3295970 commit 89b3aba

File tree

798 files changed

+27893
-14746
lines changed

Some content is hidden

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

798 files changed

+27893
-14746
lines changed

.ci/compute_projects.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -200,6 +200,11 @@ def _get_modified_projects(modified_files: list[str]) -> Set[str]:
200200
# documentation builds.
201201
if len(path_parts) > 2 and path_parts[1] == "docs":
202202
continue
203+
# Exclude files for the gn build. We do not test it within premerge
204+
# and changes occur often enough that they otherwise take up
205+
# capacity.
206+
if len(path_parts) > 3 and path_parts[:3] == ("llvm", "utils", "gn"):
207+
continue
203208
modified_projects.add(pathlib.Path(modified_file).parts[0])
204209
return modified_projects
205210

.ci/compute_projects_test.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -179,6 +179,15 @@ def test_exclude_docs(self):
179179
self.assertEqual(env_variables["runtimes_to_build"], "")
180180
self.assertEqual(env_variables["runtimes_check_targets"], "")
181181

182+
def test_exclude_gn(self):
183+
env_variables = compute_projects.get_env_variables(
184+
["llvm/utils/gn/build/BUILD.gn"], "Linux"
185+
)
186+
self.assertEqual(env_variables["projects_to_build"], "")
187+
self.assertEqual(env_variables["project_check_targets"], "")
188+
self.assertEqual(env_variables["runtimes_to_build"], "")
189+
self.assertEqual(env_variables["runtimes_check_targets"], "")
190+
182191

183192
if __name__ == "__main__":
184193
unittest.main()

clang-tools-extra/clang-tidy/modernize/UseConstraintsCheck.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -356,7 +356,7 @@ static std::vector<FixItHint> handleReturnType(const FunctionDecl *Function,
356356
if (!TypeText)
357357
return {};
358358

359-
SmallVector<const Expr *, 3> ExistingConstraints;
359+
SmallVector<AssociatedConstraint, 3> ExistingConstraints;
360360
Function->getAssociatedConstraints(ExistingConstraints);
361361
if (!ExistingConstraints.empty()) {
362362
// FIXME - Support adding new constraints to existing ones. Do we need to
@@ -404,7 +404,7 @@ handleTrailingTemplateType(const FunctionTemplateDecl *FunctionTemplate,
404404
if (!ConditionText)
405405
return {};
406406

407-
SmallVector<const Expr *, 3> ExistingConstraints;
407+
SmallVector<AssociatedConstraint, 3> ExistingConstraints;
408408
Function->getAssociatedConstraints(ExistingConstraints);
409409
if (!ExistingConstraints.empty()) {
410410
// FIXME - Support adding new constraints to existing ones. Do we need to

clang-tools-extra/clangd/AST.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -119,8 +119,7 @@ getQualification(ASTContext &Context, const DeclContext *DestContext,
119119
// There can't be any more tag parents after hitting a namespace.
120120
assert(!ReachedNS);
121121
(void)ReachedNS;
122-
NNS = NestedNameSpecifier::Create(Context, nullptr, false,
123-
TD->getTypeForDecl());
122+
NNS = NestedNameSpecifier::Create(Context, nullptr, TD->getTypeForDecl());
124123
} else if (auto *NSD = llvm::dyn_cast<NamespaceDecl>(CurContext)) {
125124
ReachedNS = true;
126125
NNS = NestedNameSpecifier::Create(Context, nullptr, NSD);

clang-tools-extra/clangd/CodeComplete.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1467,7 +1467,6 @@ bool allowIndex(CodeCompletionContext &CC) {
14671467
return true;
14681468
case NestedNameSpecifier::Super:
14691469
case NestedNameSpecifier::TypeSpec:
1470-
case NestedNameSpecifier::TypeSpecWithTemplate:
14711470
// Unresolved inside a template.
14721471
case NestedNameSpecifier::Identifier:
14731472
return false;

clang-tools-extra/clangd/DumpAST.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,6 @@ class DumpVisitor : public RecursiveASTVisitor<DumpVisitor> {
157157
NNS_KIND(Identifier);
158158
NNS_KIND(Namespace);
159159
NNS_KIND(TypeSpec);
160-
NNS_KIND(TypeSpecWithTemplate);
161160
NNS_KIND(Global);
162161
NNS_KIND(Super);
163162
NNS_KIND(NamespaceAlias);

clang-tools-extra/clangd/FindTarget.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -500,7 +500,6 @@ struct TargetFinder {
500500
}
501501
return;
502502
case NestedNameSpecifier::TypeSpec:
503-
case NestedNameSpecifier::TypeSpecWithTemplate:
504503
add(QualType(NNS->getAsType(), 0), Flags);
505504
return;
506505
case NestedNameSpecifier::Global:

clang-tools-extra/include-cleaner/lib/WalkAST.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,6 @@ class ASTWalker : public RecursiveASTVisitor<ASTWalker> {
144144
case NestedNameSpecifier::Global:
145145
return true;
146146
case NestedNameSpecifier::TypeSpec:
147-
case NestedNameSpecifier::TypeSpecWithTemplate:
148147
case NestedNameSpecifier::Super:
149148
case NestedNameSpecifier::Identifier:
150149
return false;

clang/bindings/python/tests/cindex/test_diagnostics.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ def test_diagnostic_category(self):
7979
self.assertEqual(d.location.line, 1)
8080
self.assertEqual(d.location.column, 11)
8181

82-
self.assertEqual(d.category_number, 2)
82+
self.assertEqual(d.category_number, 3)
8383
self.assertEqual(d.category_name, "Semantic Issue")
8484

8585
def test_diagnostic_option(self):
@@ -123,7 +123,7 @@ def test_diagnostic_string_format(self):
123123
self.assertEqual(str(d), "t.c:1:26: error: expected ';' after struct")
124124
self.assertEqual(
125125
d.format(0b111111),
126-
"t.c:1:26: error: expected ';' after struct [3, Parse Issue]",
126+
"t.c:1:26: error: expected ';' after struct [2, Parse Issue]",
127127
)
128128
with self.assertRaises(ValueError):
129129
d.format(0b1000000)

clang/docs/ReleaseNotes.rst

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -159,12 +159,15 @@ C23 Feature Support
159159
which clarified that a compound literal used within a function prototype is
160160
treated as if the compound literal were within the body rather than at file
161161
scope.
162+
- Fixed a bug where you could not cast a null pointer constant to type
163+
``nullptr_t``. Fixes #GH133644.
162164

163165
Non-comprehensive list of changes in this release
164166
-------------------------------------------------
165167

166168
- Support parsing the `cc` operand modifier and alias it to the `c` modifier (#GH127719).
167169
- Added `__builtin_elementwise_exp10`.
170+
- For AMDPGU targets, added `__builtin_v_cvt_off_f32_i4` that maps to the `v_cvt_off_f32_i4` instruction.
168171

169172
New Compiler Flags
170173
------------------
@@ -187,6 +190,8 @@ Modified Compiler Flags
187190

188191
- The compiler flag `-fbracket-depth` default value is increased from 256 to 2048. (#GH94728)
189192

193+
- `-Wpadded` option implemented for the `x86_64-windows-msvc` target. Fixes #61702
194+
190195
Removed Compiler Flags
191196
-------------------------
192197

@@ -275,6 +280,10 @@ Improvements to Clang's diagnostics
275280
- Diagnostics on chained comparisons (``a < b < c``) are now an error by default. This can be disabled with
276281
``-Wno-error=parentheses``.
277282
- Clang now better preserves the sugared types of pointers to member.
283+
- Clang now better preserves the presence of the template keyword with dependent
284+
prefixes.
285+
- When printing types for diagnostics, clang now doesn't suppress the scopes of
286+
template arguments contained within nested names.
278287
- The ``-Wshift-bool`` warning has been added to warn about shifting a boolean. (#GH28334)
279288
- Fixed diagnostics adding a trailing ``::`` when printing some source code
280289
constructs, like base classes.
@@ -307,6 +316,8 @@ Improvements to Clang's diagnostics
307316
308317
Fixes #GH61635
309318

319+
- Split diagnosing base class qualifiers from the ``-Wignored-Qualifiers`` diagnostic group into a new ``-Wignored-base-class-qualifiers`` diagnostic group (which is grouped under ``-Wignored-qualifiers``). Fixes #GH131935.
320+
310321
Improvements to Clang's time-trace
311322
----------------------------------
312323

@@ -333,6 +344,9 @@ Bug Fixes in This Version
333344
- Fixed a problematic case with recursive deserialization within ``FinishedDeserializing()`` where
334345
``PassInterestingDeclsToConsumer()`` was called before the declarations were safe to be passed. (#GH129982)
335346
- Fixed a modules crash where an explicit Constructor was deserialized. (#GH132794)
347+
- Defining an integer literal suffix (e.g., ``LL``) before including
348+
``<stdint.h>`` in a freestanding build no longer causes invalid token pasting
349+
when using the ``INTn_C`` macros. (#GH85995)
336350

337351
Bug Fixes to Compiler Builtins
338352
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -351,6 +365,7 @@ Bug Fixes to Attribute Support
351365
Bug Fixes to C++ Support
352366
^^^^^^^^^^^^^^^^^^^^^^^^
353367

368+
- Clang now supports implicitly defined comparison operators for friend declarations. (#GH132249)
354369
- Clang now diagnoses copy constructors taking the class by value in template instantiations. (#GH130866)
355370
- Clang is now better at keeping track of friend function template instance contexts. (#GH55509)
356371
- Clang now prints the correct instantiation context for diagnostics suppressed
@@ -366,6 +381,9 @@ Bug Fixes to C++ Support
366381
- Clang now uses the parameter location for abbreviated function templates in ``extern "C"``. (#GH46386)
367382
- Clang will emit an error instead of crash when use co_await or co_yield in
368383
C++26 braced-init-list template parameter initialization. (#GH78426)
384+
- Improved fix for an issue with pack expansions of type constraints, where this
385+
now also works if the constraint has non-type or template template parameters.
386+
(#GH131798)
369387
- Fixes matching of nested template template parameters. (#GH130362)
370388
- Correctly diagnoses template template paramters which have a pack parameter
371389
not in the last position.

0 commit comments

Comments
 (0)