Skip to content

Commit e3eb2de

Browse files
authored
Merge branch 'main' into assume-filename-with-clang-format-ignore
2 parents 07ac17e + 6803062 commit e3eb2de

File tree

861 files changed

+28236
-16614
lines changed

Some content is hidden

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

861 files changed

+28236
-16614
lines changed

bolt/lib/Core/DIEBuilder.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -281,8 +281,7 @@ void DIEBuilder::buildTypeUnits(DebugStrOffsetsWriter *StrOffsetWriter,
281281
for (auto &Row : TUIndex.getRows()) {
282282
uint64_t Signature = Row.getSignature();
283283
// manually populate TypeUnit to UnitVector
284-
DwarfContext->getTypeUnitForHash(DwarfContext->getMaxVersion(), Signature,
285-
true);
284+
DwarfContext->getTypeUnitForHash(Signature, true);
286285
}
287286
}
288287
const unsigned int CUNum = getCUNum(DwarfContext, isDWO());

clang-tools-extra/clang-doc/Generators.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,4 +55,8 @@ std::string getTagType(TagTypeKind AS);
5555
} // namespace doc
5656
} // namespace clang
5757

58+
namespace llvm {
59+
extern template class Registry<clang::doc::Generator>;
60+
} // namespace llvm
61+
5862
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_DOC_GENERATOR_H

clang-tools-extra/clang-tidy/ClangTidyModuleRegistry.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,8 @@ using ClangTidyModuleRegistry = llvm::Registry<ClangTidyModule>;
1818

1919
} // namespace clang::tidy
2020

21+
namespace llvm {
22+
extern template class Registry<clang::tidy::ClangTidyModule>;
23+
} // namespace llvm
24+
2125
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_CLANGTIDYMODULEREGISTRY_H

clang-tools-extra/clangd/URI.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,4 +133,8 @@ typedef llvm::Registry<URIScheme> URISchemeRegistry;
133133
} // namespace clangd
134134
} // namespace clang
135135

136+
namespace llvm {
137+
extern template class Registry<clang::clangd::URIScheme>;
138+
} // namespace llvm
139+
136140
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANGD_URI_H

clang-tools-extra/clangd/refactor/Tweak.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -147,4 +147,8 @@ prepareTweak(StringRef ID, const Tweak::Selection &S,
147147
} // namespace clangd
148148
} // namespace clang
149149

150+
namespace llvm {
151+
extern template class Registry<clang::clangd::Tweak>;
152+
} // namespace llvm
153+
150154
#endif

clang-tools-extra/docs/clang-tidy/checks/bugprone/unchecked-optional-access.rst

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,16 @@ For example:
7676
}
7777
}
7878
79+
Exception: accessor methods
80+
```````````````````````````
81+
82+
The check assumes *accessor* methods of a class are stable, with a heuristic to
83+
determine which methods are accessors. Specifically, parameter-free ``const``
84+
methods are treated as accessors. Note that this is not guaranteed to be safe
85+
-- but, it is widely used (safely) in practice, and so we have chosen to treat
86+
it as generally safe. Calls to non ``const`` methods are assumed to modify
87+
the state of the object and affect the stability of earlier accessor calls.
88+
7989
Rely on invariants of uncommon APIs
8090
-----------------------------------
8191

clang-tools-extra/include-cleaner/include/clang-include-cleaner/IncludeSpeller.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,4 +46,8 @@ using IncludeSpellingStrategy = llvm::Registry<IncludeSpeller>;
4646
std::string spellHeader(const IncludeSpeller::Input &Input);
4747
} // namespace clang::include_cleaner
4848

49+
namespace llvm {
50+
extern template class Registry<clang::include_cleaner::IncludeSpeller>;
51+
} // namespace llvm
52+
4953
#endif

clang/docs/ReleaseNotes.rst

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -439,6 +439,7 @@ Bug Fixes in This Version
439439
- Fixed a crash when trying to transform a dependent address space type. Fixes #GH101685.
440440
- Fixed a crash when diagnosing format strings and encountering an empty
441441
delimited escape sequence (e.g., ``"\o{}"``). #GH102218
442+
- Fixed a crash using ``__array_rank`` on 64-bit targets. (#GH113044).
442443
- The warning emitted for an unsupported register variable type now points to
443444
the unsupported type instead of the ``register`` keyword (#GH109776).
444445

@@ -507,7 +508,7 @@ Bug Fixes to C++ Support
507508
- Clang no longer tries to capture non-odr used default arguments of template parameters of generic lambdas (#GH107048)
508509
- Fixed a bug where defaulted comparison operators would remove ``const`` from base classes. (#GH102588)
509510
- Fix a crash when using ``source_location`` in the trailing return type of a lambda expression. (#GH67134)
510-
- A follow-up fix was added for (#GH61460), as the previous fix was not entirely correct. (#GH86361)
511+
- A follow-up fix was added for (#GH61460), as the previous fix was not entirely correct. (#GH86361), (#GH112352)
511512
- Fixed a crash in the typo correction of an invalid CTAD guide. (#GH107887)
512513
- Fixed a crash when clang tries to subtitute parameter pack while retaining the parameter
513514
pack. (#GH63819), (#GH107560)
@@ -539,6 +540,9 @@ Bug Fixes to C++ Support
539540
- Fix erroneous templated array size calculation leading to crashes in generated code. (#GH41441)
540541
- During the lookup for a base class name, non-type names are ignored. (#GH16855)
541542
- Fix a crash when recovering an invalid expression involving an explicit object member conversion operator. (#GH112559)
543+
- Clang incorrectly considered a class with an anonymous union member to not be
544+
const-default-constructible even if a union member has a default member initializer.
545+
(#GH95854).
542546

543547
Bug Fixes to AST Handling
544548
^^^^^^^^^^^^^^^^^^^^^^^^^

clang/include/clang/AST/ExprCXX.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -876,13 +876,13 @@ class CXXTypeidExpr : public Expr {
876876

877877
/// Best-effort check if the expression operand refers to a most derived
878878
/// object. This is not a strong guarantee.
879-
bool isMostDerived(ASTContext &Context) const;
879+
bool isMostDerived(const ASTContext &Context) const;
880880

881881
bool isTypeOperand() const { return Operand.is<TypeSourceInfo *>(); }
882882

883883
/// Retrieves the type operand of this typeid() expression after
884884
/// various required adjustments (removing reference types, cv-qualifiers).
885-
QualType getTypeOperand(ASTContext &Context) const;
885+
QualType getTypeOperand(const ASTContext &Context) const;
886886

887887
/// Retrieve source information for the type operand.
888888
TypeSourceInfo *getTypeOperandSourceInfo() const {

clang/include/clang/ASTMatchers/ASTMatchersMacros.h

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,8 @@
4949
#ifndef LLVM_CLANG_ASTMATCHERS_ASTMATCHERSMACROS_H
5050
#define LLVM_CLANG_ASTMATCHERS_ASTMATCHERSMACROS_H
5151

52+
#include "clang/Support/Compiler.h"
53+
5254
/// AST_MATCHER_FUNCTION(ReturnType, DefineMatcher) { ... }
5355
/// defines a zero parameter function named DefineMatcher() that returns a
5456
/// ReturnType object.
@@ -367,7 +369,7 @@
367369
static QualType (T::*value())() const { return &T::FunctionName; } \
368370
}; \
369371
} \
370-
extern const ::clang::ast_matchers::internal:: \
372+
CLANG_ABI extern const ::clang::ast_matchers::internal:: \
371373
TypeTraversePolymorphicMatcher< \
372374
QualType, \
373375
::clang::ast_matchers::internal::TypeMatcher##MatcherName##Getter, \
@@ -407,7 +409,7 @@
407409
static TypeLoc (T::*value())() const { return &T::FunctionName##Loc; } \
408410
}; \
409411
} \
410-
extern const ::clang::ast_matchers::internal:: \
412+
CLANG_ABI extern const ::clang::ast_matchers::internal:: \
411413
TypeTraversePolymorphicMatcher< \
412414
TypeLoc, \
413415
::clang::ast_matchers::internal:: \

0 commit comments

Comments
 (0)