[all-commits] [llvm/llvm-project] 8edfc2: [clangd] Cleanup of readability-identifier-naming

ChristianKuehnel via All-commits all-commits at lists.llvm.org
Tue Feb 1 05:32:10 PST 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 8edfc2f814fe107bf31e3470478aa9bcacdf5aed
      https://github.com/llvm/llvm-project/commit/8edfc2f814fe107bf31e3470478aa9bcacdf5aed
  Author: Christian Kühnel <kuhnel at google.com>
  Date:   2022-02-01 (Tue, 01 Feb 2022)

  Changed paths:
    M .clang-tidy
    M clang-tools-extra/clangd/ClangdLSPServer.cpp
    M clang-tools-extra/clangd/SourceCode.cpp
    M clang-tools-extra/clangd/TUScheduler.cpp
    M clang-tools-extra/clangd/XRefs.cpp
    M clang-tools-extra/clangd/benchmarks/IndexBenchmark.cpp
    M clang-tools-extra/clangd/fuzzer/clangd-fuzzer.cpp
    M clang-tools-extra/clangd/index/YAMLSerialization.cpp
    M clang-tools-extra/clangd/unittests/BackgroundIndexTests.cpp
    M clang-tools-extra/clangd/unittests/CallHierarchyTests.cpp
    M clang-tools-extra/clangd/unittests/ClangdLSPServerTests.cpp
    M clang-tools-extra/clangd/unittests/CodeCompleteTests.cpp
    M clang-tools-extra/clangd/unittests/CompileCommandsTests.cpp
    M clang-tools-extra/clangd/unittests/ConfigCompileTests.cpp
    M clang-tools-extra/clangd/unittests/ConfigProviderTests.cpp
    M clang-tools-extra/clangd/unittests/ConfigTesting.h
    M clang-tools-extra/clangd/unittests/ConfigYAMLTests.cpp
    M clang-tools-extra/clangd/unittests/DiagnosticsTests.cpp
    M clang-tools-extra/clangd/unittests/DumpASTTests.cpp
    M clang-tools-extra/clangd/unittests/ExpectedTypeTest.cpp
    M clang-tools-extra/clangd/unittests/FileIndexTests.cpp
    M clang-tools-extra/clangd/unittests/FindSymbolsTests.cpp
    M clang-tools-extra/clangd/unittests/HeaderSourceSwitchTests.cpp
    M clang-tools-extra/clangd/unittests/HeadersTests.cpp
    M clang-tools-extra/clangd/unittests/IncludeCleanerTests.cpp
    M clang-tools-extra/clangd/unittests/IndexActionTests.cpp
    M clang-tools-extra/clangd/unittests/IndexTests.cpp
    M clang-tools-extra/clangd/unittests/JSONTransportTests.cpp
    M clang-tools-extra/clangd/unittests/ParsedASTTests.cpp
    M clang-tools-extra/clangd/unittests/QualityTests.cpp
    M clang-tools-extra/clangd/unittests/SerializationTests.cpp
    M clang-tools-extra/clangd/unittests/SourceCodeTests.cpp
    M clang-tools-extra/clangd/unittests/SymbolCollectorTests.cpp
    M clang-tools-extra/clangd/unittests/SymbolInfoTests.cpp
    M clang-tools-extra/clangd/unittests/TestIndex.cpp
    M clang-tools-extra/clangd/unittests/TypeHierarchyTests.cpp
    M clang-tools-extra/clangd/unittests/URITests.cpp
    M clang-tools-extra/clangd/unittests/XRefsTests.cpp
    M clang-tools-extra/clangd/unittests/support/ThreadingTests.cpp
    M clang-tools-extra/clangd/unittests/support/TraceTests.cpp

  Log Message:
  -----------
  [clangd] Cleanup of readability-identifier-naming

Auto-generated patch based on clang-tidy readability-identifier-naming.
Only some manual cleanup for `extern "C"` declarations and a GTest change was required.

I'm not sure if this cleanup is actually very useful. It cleans up clang-tidy findings to the number of warnings from clang-tidy should be lower.  Since it was easy to do and required only little cleanup I thought I'd upload it for discussion.

One pattern that keeps recurring: Test **matchers** are also supposed to start with a lowercase letter as per LLVM convention. However GTest naming convention for matchers start with upper case. I would propose to keep stay consistent with the GTest convention there. However that would imply a lot of `//NOLINT` throughout these files.

To re-product this patch run:
```
run-clang-tidy -checks="-*,readability-identifier-naming" -fix -format ./clang-tools-extra/clangd
```

To convert the macro names, I was using this script with some manual cleanup afterwards:
https://gist.github.com/ChristianKuehnel/a01cc4362b07c58281554ab46235a077

Differential Revision: https://reviews.llvm.org/D115634




More information about the All-commits mailing list