Skip to content

Commit 77c8629

Browse files
authored
merge main into amd-staging (llvm#3099)
2 parents 96297ba + f778056 commit 77c8629

File tree

203 files changed

+6931
-1047
lines changed

Some content is hidden

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

203 files changed

+6931
-1047
lines changed

.github/workflows/libclang-python-tests.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,15 @@ on:
1010
- 'main'
1111
paths:
1212
- 'clang/bindings/python/**'
13+
- 'clang/test/bindings/python/**'
1314
- 'clang/tools/libclang/**'
14-
- 'clang/CMakeList.txt'
1515
- '.github/workflows/libclang-python-tests.yml'
1616
- '.github/workflows/llvm-project-tests.yml'
1717
pull_request:
1818
paths:
1919
- 'clang/bindings/python/**'
20+
- 'clang/test/bindings/python/**'
2021
- 'clang/tools/libclang/**'
21-
- 'clang/CMakeList.txt'
2222
- '.github/workflows/libclang-python-tests.yml'
2323
- '.github/workflows/llvm-project-tests.yml'
2424

clang/CMakeLists.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -561,7 +561,6 @@ if( CLANG_INCLUDE_TESTS )
561561
clang_unit_site_config=${CMAKE_CURRENT_BINARY_DIR}/test/Unit/lit.site.cfg
562562
)
563563
add_subdirectory(test)
564-
add_subdirectory(bindings/python/tests)
565564

566565
if(CLANG_BUILT_STANDALONE)
567566
umbrella_lit_testsuite_end(check-all)

clang/bindings/python/tests/CMakeLists.txt

Lines changed: 0 additions & 66 deletions
This file was deleted.

clang/docs/ReleaseNotes.rst

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -721,6 +721,11 @@ Improvements to Clang's diagnostics
721721
- Improve the diagnostics for placement new expression when const-qualified
722722
object was passed as the storage argument. (#GH143708)
723723

724+
- Clang now does not issue a warning about returning from a function declared with
725+
the ``[[noreturn]]`` attribute when the function body is ended with a call via
726+
pointer, provided it can be proven that the pointer only points to
727+
``[[noreturn]]`` functions.
728+
724729
Improvements to Clang's time-trace
725730
----------------------------------
726731

clang/include/clang/CIR/Dialect/Passes.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ std::unique_ptr<Pass> createCIRCanonicalizePass();
2424
std::unique_ptr<Pass> createCIRFlattenCFGPass();
2525
std::unique_ptr<Pass> createCIRSimplifyPass();
2626
std::unique_ptr<Pass> createHoistAllocasPass();
27+
std::unique_ptr<Pass> createLoweringPreparePass();
2728

2829
void populateCIRPreLoweringPasses(mlir::OpPassManager &pm);
2930

clang/include/clang/CIR/Dialect/Passes.td

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,14 +33,14 @@ def CIRSimplify : Pass<"cir-simplify"> {
3333
let summary = "Performs CIR simplification and code optimization";
3434
let description = [{
3535
The pass performs semantics-preserving code simplifications and optimizations
36-
on CIR while maintaining strict program correctness.
37-
36+
on CIR while maintaining strict program correctness.
37+
3838
Unlike the `cir-canonicalize` pass, these transformations may reduce the IR's
3939
structural similarity to the original source code as a trade-off for improved
4040
code quality. This can affect debugging fidelity by altering intermediate
41-
representations of folded expressions, hoisted operations, and other
41+
representations of folded expressions, hoisted operations, and other
4242
optimized constructs.
43-
43+
4444
Example transformations include ternary expression folding and code hoisting
4545
while preserving program semantics.
4646
}];
@@ -72,4 +72,15 @@ def CIRFlattenCFG : Pass<"cir-flatten-cfg"> {
7272
let dependentDialects = ["cir::CIRDialect"];
7373
}
7474

75+
def LoweringPrepare : Pass<"cir-lowering-prepare"> {
76+
let summary = "Lower to more fine-grained CIR operations before lowering to
77+
other dialects";
78+
let description = [{
79+
This pass does preparation work for lowering to other dialects. For example,
80+
it may expand the global variable initialziation in a more ABI-friendly form.
81+
}];
82+
let constructor = "mlir::createLoweringPreparePass()";
83+
let dependentDialects = ["cir::CIRDialect"];
84+
}
85+
7586
#endif // CLANG_CIR_DIALECT_PASSES_TD

clang/include/clang/Sema/Overload.h

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -350,6 +350,11 @@ class Sema;
350350
LLVM_PREFERRED_TYPE(bool)
351351
unsigned BindsToRvalue : 1;
352352

353+
/// Whether this was an identity conversion with qualification
354+
/// conversion for the implicit object argument.
355+
LLVM_PREFERRED_TYPE(bool)
356+
unsigned IsImplicitObjectArgumentQualificationConversion : 1;
357+
353358
/// Whether this binds an implicit object argument to a
354359
/// non-static member function without a ref-qualifier.
355360
LLVM_PREFERRED_TYPE(bool)
@@ -448,11 +453,11 @@ class Sema;
448453
#endif
449454
return true;
450455
}
451-
if (!C.hasSameType(getFromType(), getToType(2)))
452-
return false;
453456
if (BindsToRvalue && IsLvalueReference)
454457
return false;
455-
return true;
458+
if (IsImplicitObjectArgumentQualificationConversion)
459+
return C.hasSameUnqualifiedType(getFromType(), getToType(2));
460+
return C.hasSameType(getFromType(), getToType(2));
456461
}
457462

458463
ImplicitConversionRank getRank() const;

0 commit comments

Comments
 (0)