[all-commits] [llvm/llvm-project] 149f30: [include-cleaner] Ignore the ParmVarDecl itself in...

Haojian Wu via All-commits all-commits at lists.llvm.org
Tue Jun 20 05:33:50 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 149f309f50cd981ed320c948f772aa571eaa9afa
      https://github.com/llvm/llvm-project/commit/149f309f50cd981ed320c948f772aa571eaa9afa
  Author: Haojian Wu <hokein.wu at gmail.com>
  Date:   2023-06-20 (Tue, 20 Jun 2023)

  Changed paths:
    M clang-tools-extra/include-cleaner/lib/WalkAST.cpp
    M clang-tools-extra/include-cleaner/unittests/AnalysisTest.cpp

  Log Message:
  -----------
  [include-cleaner] Ignore the ParmVarDecl itself in WalkAST.cpp

This fixes a false positive where a ParamVarDecl happend to be the
same name of some C standard symbol and has a global namespace.

```
using A = int(int time); // we suggest <ctime> for the `int time`.
```

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




More information about the All-commits mailing list