[all-commits] [llvm/llvm-project] edd6a3: [clang-tidy] support unscoped enumerations in read...

Congcong Cai via All-commits all-commits at lists.llvm.org
Mon Apr 3 03:59:09 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: edd6a33984eeb57bd4e8d3459878cc7a66825389
      https://github.com/llvm/llvm-project/commit/edd6a33984eeb57bd4e8d3459878cc7a66825389
  Author: Congcong Cai <congcongcai0907 at 163.com>
  Date:   2023-04-03 (Mon, 03 Apr 2023)

  Changed paths:
    M clang-tools-extra/clang-tidy/readability/StaticAccessedThroughInstanceCheck.cpp
    M clang-tools-extra/docs/ReleaseNotes.rst
    M clang-tools-extra/docs/clang-tidy/checks/readability/static-accessed-through-instance.rst
    M clang-tools-extra/test/clang-tidy/checkers/readability/static-accessed-through-instance.cpp

  Log Message:
  -----------
  [clang-tidy] support unscoped enumerations in readability-static-accessed-through-instance

fixed [60810](https://github.com/llvm/llvm-project/issues/60810)
unscoped enumerations in class can also be checked by `readability-static-accessed-through-instance`
add matcher for `enumConstantDecl` to match format
```
struct {
    enum { E1 };
};
```
The filter of member expression and the fix hint should be same as other condition.

Reviewed By: PiotrZSL

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




More information about the All-commits mailing list