Skip to content

Commit 5be42ea

Browse files
committed
test comment
Created using spr 1.3.5-bogner
2 parents d0c4824 + ae26f50 commit 5be42ea

File tree

746 files changed

+12233
-2874
lines changed

Some content is hidden

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

746 files changed

+12233
-2874
lines changed

.github/workflows/libc-fullbuild-tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ jobs:
4444
- name: Prepare dependencies (Ubuntu)
4545
run: |
4646
sudo apt-get update
47-
sudo apt-get install -y libmpfr-dev libgmp-dev libmpc-dev ninja-build linux-headers-generic linux-libc-dev
47+
sudo apt-get install -y libmpfr-dev libgmp-dev libmpc-dev ninja-build linux-libc-dev
4848
sudo ln -sf /usr/include/$(uname -p)-linux-gnu/asm /usr/include/asm
4949
5050
- name: Set reusable strings

clang-tools-extra/clang-tidy/bugprone/CMakeLists.txt

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ add_clang_library(clangTidyBugproneModule STATIC
1616
ChainedComparisonCheck.cpp
1717
ComparePointerToMemberVirtualFunctionCheck.cpp
1818
CopyConstructorInitCheck.cpp
19+
CrtpConstructorAccessibilityCheck.cpp
1920
DanglingHandleCheck.cpp
2021
DynamicStaticInitializersCheck.cpp
2122
EasilySwappableParametersCheck.cpp
@@ -26,11 +27,8 @@ add_clang_library(clangTidyBugproneModule STATIC
2627
ForwardingReferenceOverloadCheck.cpp
2728
ImplicitWideningOfMultiplicationResultCheck.cpp
2829
InaccurateEraseCheck.cpp
29-
IncorrectEnableIfCheck.cpp
30-
ReturnConstRefFromParameterCheck.cpp
31-
SuspiciousStringviewDataUsageCheck.cpp
32-
SwitchMissingDefaultCaseCheck.cpp
3330
IncDecInConditionsCheck.cpp
31+
IncorrectEnableIfCheck.cpp
3432
IncorrectRoundingsCheck.cpp
3533
InfiniteLoopCheck.cpp
3634
IntegerDivisionCheck.cpp
@@ -45,15 +43,16 @@ add_clang_library(clangTidyBugproneModule STATIC
4543
MultipleNewInOneExpressionCheck.cpp
4644
MultipleStatementMacroCheck.cpp
4745
NoEscapeCheck.cpp
48-
NondeterministicPointerIterationOrderCheck.cpp
4946
NonZeroEnumToBoolConversionCheck.cpp
47+
NondeterministicPointerIterationOrderCheck.cpp
5048
NotNullTerminatedResultCheck.cpp
5149
OptionalValueConversionCheck.cpp
5250
ParentVirtualCallCheck.cpp
5351
PointerArithmeticOnPolymorphicObjectCheck.cpp
5452
PosixReturnCheck.cpp
5553
RedundantBranchConditionCheck.cpp
5654
ReservedIdentifierCheck.cpp
55+
ReturnConstRefFromParameterCheck.cpp
5756
SharedPtrArrayMismatchCheck.cpp
5857
SignalHandlerCheck.cpp
5958
SignedCharMisuseCheck.cpp
@@ -74,7 +73,9 @@ add_clang_library(clangTidyBugproneModule STATIC
7473
SuspiciousReallocUsageCheck.cpp
7574
SuspiciousSemicolonCheck.cpp
7675
SuspiciousStringCompareCheck.cpp
76+
SuspiciousStringviewDataUsageCheck.cpp
7777
SwappedArgumentsCheck.cpp
78+
SwitchMissingDefaultCaseCheck.cpp
7879
TaggedUnionMemberCountCheck.cpp
7980
TerminatingContinueCheck.cpp
8081
ThrowKeywordMissingCheck.cpp
@@ -85,7 +86,6 @@ add_clang_library(clangTidyBugproneModule STATIC
8586
UnhandledExceptionAtNewCheck.cpp
8687
UnhandledSelfAssignmentCheck.cpp
8788
UniquePtrArrayMismatchCheck.cpp
88-
CrtpConstructorAccessibilityCheck.cpp
8989
UnsafeFunctionsCheck.cpp
9090
UnusedLocalNonTrivialVariableCheck.cpp
9191
UnusedRaiiCheck.cpp

clang/include/clang/AST/DeclTemplate.h

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -735,6 +735,7 @@ class RedeclarableTemplateDecl : public TemplateDecl,
735735
}
736736

737737
void anchor() override;
738+
738739
protected:
739740
template <typename EntryType> struct SpecEntryTraits {
740741
using DeclType = EntryType;
@@ -775,13 +776,22 @@ class RedeclarableTemplateDecl : public TemplateDecl,
775776
return SpecIterator<EntryType>(isEnd ? Specs.end() : Specs.begin());
776777
}
777778

778-
void loadLazySpecializationsImpl() const;
779+
void loadLazySpecializationsImpl(bool OnlyPartial = false) const;
780+
781+
bool loadLazySpecializationsImpl(llvm::ArrayRef<TemplateArgument> Args,
782+
TemplateParameterList *TPL = nullptr) const;
779783

780784
template <class EntryType, typename ...ProfileArguments>
781785
typename SpecEntryTraits<EntryType>::DeclType*
782786
findSpecializationImpl(llvm::FoldingSetVector<EntryType> &Specs,
783787
void *&InsertPos, ProfileArguments &&...ProfileArgs);
784788

789+
template <class EntryType, typename... ProfileArguments>
790+
typename SpecEntryTraits<EntryType>::DeclType *
791+
findSpecializationLocally(llvm::FoldingSetVector<EntryType> &Specs,
792+
void *&InsertPos,
793+
ProfileArguments &&...ProfileArgs);
794+
785795
template <class Derived, class EntryType>
786796
void addSpecializationImpl(llvm::FoldingSetVector<EntryType> &Specs,
787797
EntryType *Entry, void *InsertPos);
@@ -796,13 +806,6 @@ class RedeclarableTemplateDecl : public TemplateDecl,
796806
/// was explicitly specialized.
797807
llvm::PointerIntPair<RedeclarableTemplateDecl *, 1, bool>
798808
InstantiatedFromMember;
799-
800-
/// If non-null, points to an array of specializations (including
801-
/// partial specializations) known only by their external declaration IDs.
802-
///
803-
/// The first value in the array is the number of specializations/partial
804-
/// specializations that follow.
805-
GlobalDeclID *LazySpecializations = nullptr;
806809
};
807810

808811
/// Pointer to the common data shared by all declarations of this
@@ -2283,7 +2286,7 @@ class ClassTemplateDecl : public RedeclarableTemplateDecl {
22832286
friend class TemplateDeclInstantiator;
22842287

22852288
/// Load any lazily-loaded specializations from the external source.
2286-
void LoadLazySpecializations() const;
2289+
void LoadLazySpecializations(bool OnlyPartial = false) const;
22872290

22882291
/// Get the underlying class declarations of the template.
22892292
CXXRecordDecl *getTemplatedDecl() const {
@@ -3033,7 +3036,7 @@ class VarTemplateDecl : public RedeclarableTemplateDecl {
30333036
friend class ASTDeclWriter;
30343037

30353038
/// Load any lazily-loaded specializations from the external source.
3036-
void LoadLazySpecializations() const;
3039+
void LoadLazySpecializations(bool OnlyPartial = false) const;
30373040

30383041
/// Get the underlying variable declarations of the template.
30393042
VarDecl *getTemplatedDecl() const {

clang/include/clang/AST/ExternalASTSource.h

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,21 @@ class ExternalASTSource : public RefCountedBase<ExternalASTSource> {
152152
virtual bool
153153
FindExternalVisibleDeclsByName(const DeclContext *DC, DeclarationName Name);
154154

155+
/// Load all the external specializations for the Decl \param D if \param
156+
/// OnlyPartial is false. Otherwise, load all the external **partial**
157+
/// specializations for the \param D.
158+
///
159+
/// Return true if any new specializations get loaded. Return false otherwise.
160+
virtual bool LoadExternalSpecializations(const Decl *D, bool OnlyPartial);
161+
162+
/// Load all the specializations for the Decl \param D with the same template
163+
/// args specified by \param TemplateArgs.
164+
///
165+
/// Return true if any new specializations get loaded. Return false otherwise.
166+
virtual bool
167+
LoadExternalSpecializations(const Decl *D,
168+
ArrayRef<TemplateArgument> TemplateArgs);
169+
155170
/// Ensures that the table of all visible declarations inside this
156171
/// context is up to date.
157172
///

clang/include/clang/Basic/Attr.td

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4651,6 +4651,13 @@ def HLSLNumThreads: InheritableAttr {
46514651
let Documentation = [NumThreadsDocs];
46524652
}
46534653

4654+
def HLSLSV_GroupThreadID: HLSLAnnotationAttr {
4655+
let Spellings = [HLSLAnnotation<"SV_GroupThreadID">];
4656+
let Subjects = SubjectList<[ParmVar, Field]>;
4657+
let LangOpts = [HLSL];
4658+
let Documentation = [HLSLSV_GroupThreadIDDocs];
4659+
}
4660+
46544661
def HLSLSV_GroupID: HLSLAnnotationAttr {
46554662
let Spellings = [HLSLAnnotation<"SV_GroupID">];
46564663
let Subjects = SubjectList<[ParmVar, Field]>;

clang/include/clang/Basic/AttrDocs.td

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7941,6 +7941,17 @@ randomized.
79417941
}];
79427942
}
79437943

7944+
def HLSLSV_GroupThreadIDDocs : Documentation {
7945+
let Category = DocCatFunction;
7946+
let Content = [{
7947+
The ``SV_GroupThreadID`` semantic, when applied to an input parameter, specifies which
7948+
individual thread within a thread group is executing in. This attribute is
7949+
only supported in compute shaders.
7950+
7951+
The full documentation is available here: https://docs.microsoft.com/en-us/windows/win32/direct3dhlsl/sv-groupthreadid
7952+
}];
7953+
}
7954+
79447955
def HLSLSV_GroupIDDocs : Documentation {
79457956
let Category = DocCatFunction;
79467957
let Content = [{

clang/include/clang/CIR/CIRGenerator.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,22 +37,22 @@ namespace cir {
3737
class CIRGenerator : public clang::ASTConsumer {
3838
virtual void anchor();
3939
clang::DiagnosticsEngine &diags;
40-
clang::ASTContext *astCtx;
40+
clang::ASTContext *astContext;
4141
// Only used for debug info.
4242
llvm::IntrusiveRefCntPtr<llvm::vfs::FileSystem> fs;
4343

4444
const clang::CodeGenOptions &codeGenOpts;
4545

4646
protected:
47-
std::unique_ptr<mlir::MLIRContext> mlirCtx;
47+
std::unique_ptr<mlir::MLIRContext> mlirContext;
4848
std::unique_ptr<clang::CIRGen::CIRGenModule> cgm;
4949

5050
public:
5151
CIRGenerator(clang::DiagnosticsEngine &diags,
5252
llvm::IntrusiveRefCntPtr<llvm::vfs::FileSystem> fs,
5353
const clang::CodeGenOptions &cgo);
5454
~CIRGenerator() override;
55-
void Initialize(clang::ASTContext &astCtx) override;
55+
void Initialize(clang::ASTContext &astContext) override;
5656
bool HandleTopLevelDecl(clang::DeclGroupRef group) override;
5757
mlir::ModuleOp getModule() const;
5858
};
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
//===----------------------------------------------------------------------===//
2+
//
3+
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4+
// See https://llvm.org/LICENSE.txt for license information.
5+
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6+
//
7+
//===----------------------------------------------------------------------===//
8+
9+
#ifndef LLVM_CLANG_CIR_DIALECT_BUILDER_CIRBASEBUILDER_H
10+
#define LLVM_CLANG_CIR_DIALECT_BUILDER_CIRBASEBUILDER_H
11+
12+
#include "mlir/IR/Builders.h"
13+
14+
namespace cir {
15+
16+
class CIRBaseBuilderTy : public mlir::OpBuilder {
17+
18+
public:
19+
CIRBaseBuilderTy(mlir::MLIRContext &mlirContext)
20+
: mlir::OpBuilder(&mlirContext) {}
21+
};
22+
23+
} // namespace cir
24+
25+
#endif

clang/include/clang/Sema/MultiplexExternalSemaSource.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,12 @@ class MultiplexExternalSemaSource : public ExternalSemaSource {
9797
bool FindExternalVisibleDeclsByName(const DeclContext *DC,
9898
DeclarationName Name) override;
9999

100+
bool LoadExternalSpecializations(const Decl *D, bool OnlyPartial) override;
101+
102+
bool
103+
LoadExternalSpecializations(const Decl *D,
104+
ArrayRef<TemplateArgument> TemplateArgs) override;
105+
100106
/// Ensures that the table of all visible declarations inside this
101107
/// context is up to date.
102108
void completeVisibleDeclsMap(const DeclContext *DC) override;

clang/include/clang/Sema/SemaHLSL.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,7 @@ class SemaHLSL : public SemaBase {
119119
void handleNumThreadsAttr(Decl *D, const ParsedAttr &AL);
120120
void handleWaveSizeAttr(Decl *D, const ParsedAttr &AL);
121121
void handleSV_DispatchThreadIDAttr(Decl *D, const ParsedAttr &AL);
122+
void handleSV_GroupThreadIDAttr(Decl *D, const ParsedAttr &AL);
122123
void handleSV_GroupIDAttr(Decl *D, const ParsedAttr &AL);
123124
void handlePackOffsetAttr(Decl *D, const ParsedAttr &AL);
124125
void handleShaderAttr(Decl *D, const ParsedAttr &AL);

0 commit comments

Comments
 (0)