github-actions[bot] wrote:
<!--LLVM CODE LINT COMMENT: clang-tidy-->
:warning: C/C++ code linter, clang-tidy found issues in your code. :warning:
<details>
<summary>
You can test this locally with the following command:
</summary>
```bash
git diff -U0 origin/main...HEAD -- clang-tools-extra/clang-tidy/ClangTidy.cpp
clang-tools-extra/clang-tidy/ClangTidy.h
clang-tools-extra/clang-tidy/tool/ClangTidyMain.cpp |
python3 clang-tools-extra/clang-tidy/tool/clang-tidy-diff.py -path build -p1
-quiet
```
</details>
<details>
<summary>
View the output from clang-tidy here.
</summary>
```
clang-tools-extra/clang-tidy/ClangTidy.cpp:251:5: warning: variable
'RuleIndexEntryIt' of type 'llvm::StringMap<size_t>::iterator' (aka
'StringMapIterBase<unsigned long, false>') can be declared 'const'
[misc-const-correctness]
251 | llvm::StringMap<size_t>::iterator RuleIndexEntryIt =
RuleIndexEntry.first;
| ^
| const
clang-tools-extra/clang-tidy/ClangTidy.cpp:252:5: warning: variable 'Inserted'
of type 'bool' can be declared 'const' [misc-const-correctness]
252 | bool Inserted = RuleIndexEntry.second;
| ^
| const
clang-tools-extra/clang-tidy/ClangTidy.cpp:270:19: warning: unchecked access to
optional value [bugprone-unchecked-optional-access]
270 | RuleIndex = SarifWriter->createRule(Rule);
| ^~~~~~~~~~~
clang-tools-extra/clang-tidy/ClangTidy.cpp:273:5: warning: variable 'Result' of
type 'SarifResult' can be declared 'const' [misc-const-correctness]
273 | SarifResult Result =
| ^
| const
clang-tools-extra/clang-tidy/ClangTidy.cpp:280:5: warning: unchecked access to
optional value [bugprone-unchecked-optional-access]
280 | SarifWriter->appendResult(Result);
| ^~~~~~~~~~~
clang-tools-extra/clang-tidy/ClangTidy.cpp:381:34: warning: unchecked access to
optional value [bugprone-unchecked-optional-access]
381 | llvm::json::Value Document = SarifWriter->createDocument();
| ^~~~~~~~~~~
```
</details>
https://github.com/llvm/llvm-project/pull/219182
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits