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/ClangTidyDiagnosticConsumer.cpp 
clang-tools-extra/clang-tidy/ClangTidyOptions.cpp 
clang-tools-extra/clang-tidy/ClangTidyOptions.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/tool/ClangTidyMain.cpp:664:15: warning: invalid 
case style for variable 'iter' [readability-identifier-naming]
  664 |     for (auto iter = PathList.begin() + 1; iter != PathList.end(); 
++iter) {
      |               ^~~~                         ~~~~                      
~~~~
      |               Iter                         Iter                      
Iter
  665 |       llvm::ErrorOr<ClangTidyOptions> Options =
  666 |           OptionsProvider->getOptions(*iter);
      |                                        ~~~~
      |                                        Iter
clang-tools-extra/clang-tidy/tool/ClangTidyMain.cpp:665:7: warning: variable 
'Options' of type 'llvm::ErrorOr<ClangTidyOptions>' can be declared 'const' 
[misc-const-correctness]
  665 |       llvm::ErrorOr<ClangTidyOptions> Options =
      |       ^
      |                                       const 

clang-tools-extra/clang-tidy/ClangTidyOptions.cpp:485:3: warning: variable 
'Err' of type 'std::error_code' can be declared 'const' [misc-const-correctness]
  485 |   std::error_code Err = addRawFileOptions(AbsoluteFilePath->str(), 
*RawOptions);
      |   ^
      |                   const 

clang-tools-extra/clang-tidy/ClangTidyDiagnosticConsumer.cpp:275:20: warning: 
invalid case style for variable 'defaultOptions' [readability-identifier-naming]
  275 |   ClangTidyOptions defaultOptions = ClangTidyOptions::getDefaults();
      |                    ^~~~~~~~~~~~~~
      |                    DefaultOptions
  276 |   llvm::ErrorOr<ClangTidyOptions> fileOptions =
  277 |       OptionsProvider->getOptions(File);
  278 | 
  279 |   // If there was an error parsing the options, just use the default 
options.
  280 |   // Ideally, the options for each file should be validated before this 
point.
  281 |   if (!fileOptions)
  282 |     return defaultOptions;
      |            ~~~~~~~~~~~~~~
      |            DefaultOptions
  283 | 
  284 |   return defaultOptions.merge(*fileOptions, 0);
      |          ~~~~~~~~~~~~~~
      |          DefaultOptions
clang-tools-extra/clang-tidy/ClangTidyDiagnosticConsumer.cpp:276:35: warning: 
invalid case style for variable 'fileOptions' [readability-identifier-naming]
  276 |   llvm::ErrorOr<ClangTidyOptions> fileOptions =
      |                                   ^~~~~~~~~~~
      |                                   FileOptions
  277 |       OptionsProvider->getOptions(File);
  278 | 
  279 |   // If there was an error parsing the options, just use the default 
options.
  280 |   // Ideally, the options for each file should be validated before this 
point.
  281 |   if (!fileOptions)
      |        ~~~~~~~~~~~
      |        FileOptions
  282 |     return defaultOptions;
  283 | 
  284 |   return defaultOptions.merge(*fileOptions, 0);
      |                                ~~~~~~~~~~~
      |                                FileOptions
```

</details>


https://github.com/llvm/llvm-project/pull/136167
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to