Skip to content

Commit 303fd45

Browse files
authored
Merge branch 'main' into compatible-gcc-align-empty-record
2 parents f7104c0 + 644b068 commit 303fd45

File tree

83 files changed

+1760
-1091
lines changed

Some content is hidden

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

83 files changed

+1760
-1091
lines changed

clang-tools-extra/clang-tidy/objc/PropertyDeclarationCheck.cpp

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,11 @@ static FixItHint generateFixItHint(const ObjCPropertyDecl *Decl,
3939
auto NewName = Decl->getName().str();
4040
size_t Index = 0;
4141
if (Style == CategoryProperty) {
42-
Index = Name.find_first_of('_') + 1;
43-
NewName.replace(0, Index - 1, Name.substr(0, Index - 1).lower());
42+
size_t UnderScorePos = Name.find_first_of('_');
43+
if (UnderScorePos != llvm::StringRef::npos) {
44+
Index = UnderScorePos + 1;
45+
NewName.replace(0, Index - 1, Name.substr(0, Index - 1).lower());
46+
}
4447
}
4548
if (Index < Name.size()) {
4649
NewName[Index] = tolower(NewName[Index]);

clang/docs/ReleaseNotes.rst

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -357,6 +357,11 @@ Improvements to Clang's diagnostics
357357
properly being rejected when used at compile-time. It was not implemented
358358
and caused assertion failures before (#GH158471).
359359

360+
- Closed a loophole in the diagnosis of function pointer conversions changing
361+
extended function type information in C mode (#GH41465). Function conversions
362+
that were previously incorrectly accepted in case of other irrelevant
363+
conditions are now consistently diagnosed, identical to C++ mode.
364+
360365
Improvements to Clang's time-trace
361366
----------------------------------
362367

@@ -455,6 +460,7 @@ Bug Fixes to C++ Support
455460
- Fix a crash when attempting to deduce a deduction guide from a non deducible template template parameter. (#130604)
456461
- Fix for clang incorrectly rejecting the default construction of a union with
457462
nontrivial member when another member has an initializer. (#GH81774)
463+
- Diagnose unresolved overload sets in non-dependent compound requirements. (#GH51246) (#GH97753)
458464

459465
Bug Fixes to AST Handling
460466
^^^^^^^^^^^^^^^^^^^^^^^^^

clang/include/clang/ASTMatchers/GtestMatchers.h

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

clang/include/clang/Sema/Sema.h

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -10208,15 +10208,12 @@ class Sema final : public SemaBase {
1020810208
bool CStyle, bool &ObjCLifetimeConversion);
1020910209

1021010210
/// Determine whether the conversion from FromType to ToType is a valid
10211-
/// conversion that strips "noexcept" or "noreturn" or "cfi_unchecked_callee"
10212-
/// off the nested function type. This also checks if "cfi_unchecked_callee"
10213-
/// was added to the function type. If "cfi_unchecked_callee" is added and
10214-
/// `AddingCFIUncheckedCallee` is provided, it will be set to true. The same
10215-
/// thing applies for `DiscardingCFIUncheckedCallee` if the attribute is
10216-
/// discarded.
10217-
bool IsFunctionConversion(QualType FromType, QualType ToType,
10218-
bool *DiscardingCFIUncheckedCallee = nullptr,
10219-
bool *AddingCFIUncheckedCallee = nullptr) const;
10211+
/// conversion of ExtInfo/ExtProtoInfo on the nested function type.
10212+
/// More precisely, this method checks whether FromType can be transformed
10213+
/// into an exact match for ToType, by transforming its extended function
10214+
/// type information in legal manner (e.g. by strictly stripping "noreturn"
10215+
/// or "noexcept", or by stripping "noescape" for arguments).
10216+
bool IsFunctionConversion(QualType FromType, QualType ToType) const;
1022010217

1022110218
/// Same as `IsFunctionConversion`, but if this would return true, it sets
1022210219
/// `ResultTy` to `ToType`.

clang/lib/ASTMatchers/CMakeLists.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ set(LLVM_LINK_COMPONENTS
88
add_clang_library(clangASTMatchers
99
ASTMatchFinder.cpp
1010
ASTMatchersInternal.cpp
11-
GtestMatchers.cpp
1211
LowLevelHelpers.cpp
1312

1413
LINK_LIBS

clang/lib/ASTMatchers/GtestMatchers.cpp

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

0 commit comments

Comments
 (0)