[all-commits] [llvm/llvm-project] c2e9ba: [clang-tidy] Fix cppcoreguidelines-pro-type-vararg...

Georgiy Komarov via All-commits all-commits at lists.llvm.org
Tue May 4 03:49:46 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: c2e9baf2e8dafe92f57fe4171d4b6a5f50d5999e
      https://github.com/llvm/llvm-project/commit/c2e9baf2e8dafe92f57fe4171d4b6a5f50d5999e
  Author: Georgy Komarov <jubnzv at gmail.com>
  Date:   2021-05-04 (Tue, 04 May 2021)

  Changed paths:
    M clang-tools-extra/clang-tidy/cppcoreguidelines/ProTypeVarargCheck.cpp
    A clang-tools-extra/test/clang-tidy/checkers/cppcoreguidelines-pro-type-vararg-ms.cpp
    M clang-tools-extra/test/clang-tidy/checkers/cppcoreguidelines-pro-type-vararg.cpp

  Log Message:
  -----------
  [clang-tidy] Fix cppcoreguidelines-pro-type-vararg false positives with __builtin_ms_va_list

This commit fixes cppcoreguidelines-pro-type-vararg false positives on
'char *' variables.

The incorrect warnings generated by clang-tidy can be illustrated with
the following minimal example:

```
goid foo(char* in) {
  char *tmp = in;
}
```

The problem is that __builtin_ms_va_list desugared as 'char *', which
leads to false positives.

Fixes bugzilla issue 48042.

Reviewed By: aaron.ballman

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




More information about the All-commits mailing list