Author: Qinkun Bao Date: 2025-03-29T20:54:15+01:00 New Revision: 0cd82327ff71282b2bfc51090074a3fd63e4842d
URL: https://github.com/llvm/llvm-project/commit/0cd82327ff71282b2bfc51090074a3fd63e4842d DIFF: https://github.com/llvm/llvm-project/commit/0cd82327ff71282b2bfc51090074a3fd63e4842d.diff LOG: Fix some typos (NFC) (#133558) Added: Modified: clang/docs/BoundsSafety.rst clang/docs/ConstantInterpreter.rst clang/docs/HIPSupport.rst clang/docs/HLSL/AvailabilityDiagnostics.rst clang/docs/MSVCCompatibility.rst clang/docs/SanitizerCoverage.rst clang/unittests/Analysis/FlowSensitive/MultiVarConstantPropagationTest.cpp clang/unittests/Analysis/FlowSensitive/TransferTest.cpp clang/unittests/StaticAnalyzer/CallEventTest.cpp clang/unittests/StaticAnalyzer/RegisterCustomCheckersTest.cpp clang/unittests/Tooling/ExecutionTest.cpp Removed: ################################################################################ diff --git a/clang/docs/BoundsSafety.rst b/clang/docs/BoundsSafety.rst index cf5b0c75c0387..4b70b34eb4100 100644 --- a/clang/docs/BoundsSafety.rst +++ b/clang/docs/BoundsSafety.rst @@ -227,7 +227,7 @@ meaning they do not have ABI implications. annotated with ``__ended_by(Q)``. In this case, the end of the range extends to the pointer ``Q``. This is used for "iterator" support in C where you're iterating from one pointer value to another until a final pointer value is - reached (and the final pointer value is not dereferencable). + reached (and the final pointer value is not dereferenceable). Accessing a pointer outside the specified bounds causes a run-time trap or a compile-time error. Also, the model maintains correctness of bounds annotations @@ -507,7 +507,7 @@ Default pointer types in ``typeof()`` ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ When ``typeof()`` takes an expression, it respects the bounds annotation on -the expression type, including the bounds annotation is implcit. For example, +the expression type, including the bounds annotation is implicit. For example, the global variable ``g`` in the following code is implicitly ``__single`` so ``typeof(g)`` gets ``char *__single``. The similar is true for the parameter ``p``, so ``typeof(p)`` returns ``void *__single``. The local variable ``l`` is diff --git a/clang/docs/ConstantInterpreter.rst b/clang/docs/ConstantInterpreter.rst index b08cb1ce353be..a71ee4b430a6e 100644 --- a/clang/docs/ConstantInterpreter.rst +++ b/clang/docs/ConstantInterpreter.rst @@ -293,4 +293,4 @@ TypeInfoPointer ``TypeInfoPointer`` tracks two types: the type assigned to ``std::type_info`` and the type which was passed to ``typeinfo``. -It is part of the taged union in ``Pointer``. +It is part of the tagged union in ``Pointer``. diff --git a/clang/docs/HIPSupport.rst b/clang/docs/HIPSupport.rst index 8f473c21e1918..b2ac53843aeed 100644 --- a/clang/docs/HIPSupport.rst +++ b/clang/docs/HIPSupport.rst @@ -704,7 +704,7 @@ Open Questions / Future Developments SPIR-V Support on HIPAMD ToolChain ================================== -The HIPAMD ToolChain supports targetting +The HIPAMD ToolChain supports targeting `AMDGCN Flavoured SPIR-V <https://llvm.org/docs/SPIRVUsage.html#target-triples>`_. The support for SPIR-V in the ROCm and HIPAMD ToolChain is under active development. diff --git a/clang/docs/HLSL/AvailabilityDiagnostics.rst b/clang/docs/HLSL/AvailabilityDiagnostics.rst index c2f260f268e7b..0db94f4b15a86 100644 --- a/clang/docs/HLSL/AvailabilityDiagnostics.rst +++ b/clang/docs/HLSL/AvailabilityDiagnostics.rst @@ -48,7 +48,7 @@ Strict Diagnostic Mode 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. -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. +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. 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. diff --git a/clang/docs/MSVCCompatibility.rst b/clang/docs/MSVCCompatibility.rst index 0b6fea597f8d3..b4a7d23e1b2c6 100644 --- a/clang/docs/MSVCCompatibility.rst +++ b/clang/docs/MSVCCompatibility.rst @@ -240,7 +240,7 @@ In the above example ``hwPopCnt`` will not be inlined into ``PopCnt`` since ``Po With a larger function that does real work the function call overhead is negligible. However in our popcnt example there is the function call overhead. There is no analog for this specific MSVC behavior in clang. -For clang we effectively have to create the dispatch function ourselves to each specfic implementation. +For clang we effectively have to create the dispatch function ourselves to each specific implementation. SIMD vector types ================= diff --git a/clang/docs/SanitizerCoverage.rst b/clang/docs/SanitizerCoverage.rst index 6ea1d14829005..f952198295ebc 100644 --- a/clang/docs/SanitizerCoverage.rst +++ b/clang/docs/SanitizerCoverage.rst @@ -314,7 +314,7 @@ will not be instrumented. void __sanitizer_cov_trace_div4(uint32_t Val); void __sanitizer_cov_trace_div8(uint64_t Val); - // Called before a GetElemementPtr (GEP) instruction + // Called before a GetElementPtr (GEP) instruction // for every non-constant array index. void __sanitizer_cov_trace_gep(uintptr_t Idx); diff --git a/clang/unittests/Analysis/FlowSensitive/MultiVarConstantPropagationTest.cpp b/clang/unittests/Analysis/FlowSensitive/MultiVarConstantPropagationTest.cpp index ed95887a45f1a..290139f5a85ce 100644 --- a/clang/unittests/Analysis/FlowSensitive/MultiVarConstantPropagationTest.cpp +++ b/clang/unittests/Analysis/FlowSensitive/MultiVarConstantPropagationTest.cpp @@ -167,8 +167,8 @@ class ConstantPropagationAnalysis ? ValueLattice(R.Val.getInt().getExtValue()) : ValueLattice::top(); } else { - // An unitialized variable holds *some* value, but we don't know what it - // is (it is implementation defined), so we set it to top. + // An uninitialized variable holds *some* value, but we don't know what + // it is (it is implementation defined), so we set it to top. Vars[Var] = ValueLattice::top(); } } else if (Nodes.getNodeAs<clang::Expr>(kJustAssignment)) { diff --git a/clang/unittests/Analysis/FlowSensitive/TransferTest.cpp b/clang/unittests/Analysis/FlowSensitive/TransferTest.cpp index f52b73dbbdc57..214aaee9f97f6 100644 --- a/clang/unittests/Analysis/FlowSensitive/TransferTest.cpp +++ b/clang/unittests/Analysis/FlowSensitive/TransferTest.cpp @@ -4888,7 +4888,7 @@ TEST(TransferTest, PointerEquality) { // We won't duplicate all of the tests above with `!=`, as we know that // the implementation simply negates the result of the `==` comparison. - // Instaed, just spot-check one case. + // Instead, just spot-check one case. bool p1_ne_p1 = (p1 != p1); (void)0; // [[p]] diff --git a/clang/unittests/StaticAnalyzer/CallEventTest.cpp b/clang/unittests/StaticAnalyzer/CallEventTest.cpp index d5ca72acaca29..2843572e5f800 100644 --- a/clang/unittests/StaticAnalyzer/CallEventTest.cpp +++ b/clang/unittests/StaticAnalyzer/CallEventTest.cpp @@ -61,7 +61,7 @@ void addCXXDeallocatorChecker(AnalysisASTConsumer &AnalysisConsumer, } // TODO: What we should really be testing here is all the diff erent varieties -// of delete operators, and wether the retrieval of their arguments works as +// of delete operators, and whether the retrieval of their arguments works as // intended. At the time of writing this file, CXXDeallocatorCall doesn't pick // up on much of those due to the AST not containing CXXDeleteExpr for most of // the standard/custom deletes. diff --git a/clang/unittests/StaticAnalyzer/RegisterCustomCheckersTest.cpp b/clang/unittests/StaticAnalyzer/RegisterCustomCheckersTest.cpp index cd46efc8ad762..454eee9cf7e0a 100644 --- a/clang/unittests/StaticAnalyzer/RegisterCustomCheckersTest.cpp +++ b/clang/unittests/StaticAnalyzer/RegisterCustomCheckersTest.cpp @@ -418,8 +418,8 @@ TEST(RegisterDeps, DependencyInteraction) { // Weak dependencies are registered before strong dependencies. This is most // important for purely diagnostic checkers that are implemented as a part of - // purely modeling checkers, becuse the checker callback order will have to be - // established in between the modeling portion and the weak dependency. + // purely modeling checkers, because the checker callback order will have to + // be established in between the modeling portion and the weak dependency. EXPECT_TRUE( runCheckerOnCode<addWeakDepAndStrongDep>("void f() {int i;}", Diags)); EXPECT_EQ(Diags, "test.RegistrationOrder: test.WeakDep\ntest." diff --git a/clang/unittests/Tooling/ExecutionTest.cpp b/clang/unittests/Tooling/ExecutionTest.cpp index b0fd7ccb950ff..c81049308f706 100644 --- a/clang/unittests/Tooling/ExecutionTest.cpp +++ b/clang/unittests/Tooling/ExecutionTest.cpp @@ -214,7 +214,7 @@ TEST(StandaloneToolTest, SimpleActionWithResult) { auto KVs = Executor.getToolResults()->AllKVResults(); ASSERT_EQ(KVs.size(), 1u); EXPECT_EQ("f", KVs[0].first); - // Currently the standlone executor returns empty corpus, revision, and + // Currently the standalone executor returns empty corpus, revision, and // compilation unit. EXPECT_EQ("::/1", KVs[0].second); _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits