Skip to content

Commit 84a6769

Browse files
authored
merge main into amd-staging (llvm#1406)
2 parents 5e5c232 + 3279336 commit 84a6769

File tree

87 files changed

+752
-556
lines changed

Some content is hidden

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

87 files changed

+752
-556
lines changed

clang-tools-extra/clang-tidy/bugprone/SignalHandlerCheck.cpp

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -333,13 +333,10 @@ SignalHandlerCheck::SignalHandlerCheck(StringRef Name,
333333
: ClangTidyCheck(Name, Context),
334334
AsyncSafeFunctionSet(Options.get("AsyncSafeFunctionSet",
335335
AsyncSafeFunctionSetKind::POSIX)) {
336-
if (AsyncSafeFunctionSet == AsyncSafeFunctionSetKind::Minimal) {
337-
for (StringRef v : MinimalConformingFunctions)
338-
ConformingFunctions.insert(v);
339-
} else {
340-
for (StringRef v : POSIXConformingFunctions)
341-
ConformingFunctions.insert(v);
342-
}
336+
if (AsyncSafeFunctionSet == AsyncSafeFunctionSetKind::Minimal)
337+
ConformingFunctions.insert_range(MinimalConformingFunctions);
338+
else
339+
ConformingFunctions.insert_range(POSIXConformingFunctions);
343340
}
344341

345342
void SignalHandlerCheck::storeOptions(ClangTidyOptions::OptionMap &Opts) {

clang-tools-extra/clang-tidy/readability/InconsistentDeclarationParameterNameCheck.cpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -343,9 +343,7 @@ void InconsistentDeclarationParameterNameCheck::check(
343343

344344
void InconsistentDeclarationParameterNameCheck::markRedeclarationsAsVisited(
345345
const FunctionDecl *OriginalDeclaration) {
346-
for (const FunctionDecl *Redecl : OriginalDeclaration->redecls()) {
347-
VisitedDeclarations.insert(Redecl);
348-
}
346+
VisitedDeclarations.insert_range(OriginalDeclaration->redecls());
349347
}
350348

351349
} // namespace clang::tidy::readability

clang-tools-extra/clangd/ConfigCompile.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -439,8 +439,7 @@ struct FragmentCompiler {
439439
[Normalized(std::move(Normalized))](const Params &, Config &C) {
440440
if (C.Diagnostics.SuppressAll)
441441
return;
442-
for (llvm::StringRef N : Normalized)
443-
C.Diagnostics.Suppress.insert(N);
442+
C.Diagnostics.Suppress.insert_range(Normalized);
444443
});
445444

446445
if (F.UnusedIncludes) {

clang-tools-extra/clangd/index/dex/Dex.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -181,8 +181,7 @@ std::unique_ptr<Iterator> Dex::createFileProximityIterator(
181181
Sources[Path] = SourceParams();
182182
auto PathURI = URI::create(Path).toString();
183183
const auto PathProximityURIs = generateProximityURIs(PathURI.c_str());
184-
for (const auto &ProximityURI : PathProximityURIs)
185-
ParentURIs.insert(ProximityURI);
184+
ParentURIs.insert_range(PathProximityURIs);
186185
}
187186
// Use SymbolRelevanceSignals for symbol relevance evaluation: use defaults
188187
// for all parameters except for Proximity Path distance signal.

clang/docs/BoundsSafety.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,7 @@ meaning they do not have ABI implications.
227227
annotated with ``__ended_by(Q)``. In this case, the end of the range extends
228228
to the pointer ``Q``. This is used for "iterator" support in C where you're
229229
iterating from one pointer value to another until a final pointer value is
230-
reached (and the final pointer value is not dereferencable).
230+
reached (and the final pointer value is not dereferenceable).
231231

232232
Accessing a pointer outside the specified bounds causes a run-time trap or a
233233
compile-time error. Also, the model maintains correctness of bounds annotations
@@ -507,7 +507,7 @@ Default pointer types in ``typeof()``
507507
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
508508

509509
When ``typeof()`` takes an expression, it respects the bounds annotation on
510-
the expression type, including the bounds annotation is implcit. For example,
510+
the expression type, including the bounds annotation is implicit. For example,
511511
the global variable ``g`` in the following code is implicitly ``__single`` so
512512
``typeof(g)`` gets ``char *__single``. The similar is true for the parameter
513513
``p``, so ``typeof(p)`` returns ``void *__single``. The local variable ``l`` is

clang/docs/ConstantInterpreter.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -293,4 +293,4 @@ TypeInfoPointer
293293

294294
``TypeInfoPointer`` tracks two types: the type assigned to
295295
``std::type_info`` and the type which was passed to ``typeinfo``.
296-
It is part of the taged union in ``Pointer``.
296+
It is part of the tagged union in ``Pointer``.

clang/docs/HIPSupport.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -704,7 +704,7 @@ Open Questions / Future Developments
704704
SPIR-V Support on HIPAMD ToolChain
705705
==================================
706706

707-
The HIPAMD ToolChain supports targetting
707+
The HIPAMD ToolChain supports targeting
708708
`AMDGCN Flavoured SPIR-V <https://llvm.org/docs/SPIRVUsage.html#target-triples>`_.
709709
The support for SPIR-V in the ROCm and HIPAMD ToolChain is under active
710710
development.

clang/docs/HLSL/AvailabilityDiagnostics.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ Strict Diagnostic Mode
4848

4949
When strict HLSL availability diagnostic mode is enabled the compiler must report all HLSL API availability issues regardless of code reachability. The implementation of this mode takes advantage of an existing diagnostic scan in ``DiagnoseUnguardedAvailability`` class which is already traversing AST of each function as soon as the function body has been parsed. For HLSL, this pass was only slightly modified, such as making sure diagnostic messages are in the ``hlsl-availability`` group and that availability checks based on shader stage are not included if the shader stage context is unknown.
5050

51-
If the compilation target is a shader library, only availability based on shader model version can be diagnosed during this scan. To diagnose availability based on shader stage, the compiler needs to run the AST traversals implementated in ``DiagnoseHLSLAvailability`` at the end of the translation unit as described above.
51+
If the compilation target is a shader library, only availability based on shader model version can be diagnosed during this scan. To diagnose availability based on shader stage, the compiler needs to run the AST traversals implemented in ``DiagnoseHLSLAvailability`` at the end of the translation unit as described above.
5252

5353
As a result, availability based on specific shader stage will only be diagnosed in code that is reachable from a shader entry point or library export function. It also means that function bodies might be scanned multiple time. When that happens, care should be taken not to produce duplicated diagnostics.
5454

clang/docs/MSVCCompatibility.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -240,7 +240,7 @@ In the above example ``hwPopCnt`` will not be inlined into ``PopCnt`` since ``Po
240240
With a larger function that does real work the function call overhead is negligible. However in our popcnt example there is the function call
241241
overhead. There is no analog for this specific MSVC behavior in clang.
242242

243-
For clang we effectively have to create the dispatch function ourselves to each specfic implementation.
243+
For clang we effectively have to create the dispatch function ourselves to each specific implementation.
244244

245245
SIMD vector types
246246
=================

clang/docs/SanitizerCoverage.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -314,7 +314,7 @@ will not be instrumented.
314314
void __sanitizer_cov_trace_div4(uint32_t Val);
315315
void __sanitizer_cov_trace_div8(uint64_t Val);
316316

317-
// Called before a GetElemementPtr (GEP) instruction
317+
// Called before a GetElementPtr (GEP) instruction
318318
// for every non-constant array index.
319319
void __sanitizer_cov_trace_gep(uintptr_t Idx);
320320

0 commit comments

Comments
 (0)