[clang] [Clang] add typo correction for unknown attribute names (PR #140629)
via cfe-commits
cfe-commits at lists.llvm.org
Mon May 19 14:50:26 PDT 2025
github-actions[bot] wrote:
<!--LLVM CODE FORMAT COMMENT: {clang-format}-->
:warning: C/C++ code formatter, clang-format found issues in your code. :warning:
<details>
<summary>
You can test this locally with the following command:
</summary>
``````````bash
git-clang-format --diff HEAD~1 HEAD --extensions h,cpp,c -- clang/include/clang/Basic/SimpleTypoCorrection.h clang/lib/Basic/SimpleTypoCorrection.cpp clang/include/clang/Basic/AttributeCommonInfo.h clang/include/clang/Basic/Attributes.h clang/include/clang/Sema/Sema.h clang/lib/AST/CommentSema.cpp clang/lib/Basic/Attributes.cpp clang/lib/Sema/SemaDeclAttr.cpp clang/lib/Sema/SemaType.cpp clang/test/Parser/cxx0x-attributes.cpp clang/test/Sema/attr-c2x.c clang/test/Sema/unknown-attributes.c clang/test/SemaCXX/cxx11-gnu-attrs.cpp clang/utils/TableGen/ClangAttrEmitter.cpp clang/utils/TableGen/TableGen.cpp clang/utils/TableGen/TableGenBackends.h
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/clang/lib/Basic/SimpleTypoCorrection.cpp b/clang/lib/Basic/SimpleTypoCorrection.cpp
index c98b89d9f..86b86eeea 100644
--- a/clang/lib/Basic/SimpleTypoCorrection.cpp
+++ b/clang/lib/Basic/SimpleTypoCorrection.cpp
@@ -37,9 +37,7 @@ void SimpleTypoCorrection::add(const IdentifierInfo *Candidate) {
add(Candidate->getName());
}
-unsigned SimpleTypoCorrection::getCorrectionIndex() const {
- return BestIndex;
-}
+unsigned SimpleTypoCorrection::getCorrectionIndex() const { return BestIndex; }
std::optional<StringRef> SimpleTypoCorrection::getCorrection() const {
if (hasCorrection())
``````````
</details>
https://github.com/llvm/llvm-project/pull/140629
More information about the cfe-commits
mailing list