[all-commits] [llvm/llvm-project] 764c3a: [Tooling/Inclusion] Avoid narrowing conversions in...

Krzysztof Parzyszek via All-commits all-commits at lists.llvm.org
Fri Nov 17 08:53:57 PST 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 764c3afd43128f7ccddb070953c330b340ebe811
      https://github.com/llvm/llvm-project/commit/764c3afd43128f7ccddb070953c330b340ebe811
  Author: Krzysztof Parzyszek <Krzysztof.Parzyszek at amd.com>
  Date:   2023-11-17 (Fri, 17 Nov 2023)

  Changed paths:
    M clang/lib/Tooling/Inclusions/Stdlib/StandardLibrary.cpp

  Log Message:
  -----------
  [Tooling/Inclusion] Avoid narrowing conversions in macro expansion (#72664)

```
clang/lib/Tooling/Inclusions/Stdlib/StandardLibrary.cpp:144:65: warning:
 narrowing conversion of ‘llvm::StringRef(((const char*)"std::experiment
al::filesystem::")).llvm::StringRef::size()’ from ‘size_t’ {aka ‘long un
signed int’} to ‘unsigned int’ [-Wnarrowing]
  144 | #define SYMBOL(Name, NS, Header) {#NS #Name, StringRef(#NS).size
(), #Header},
      |                                              ~~~~~~~~~~~~~~~~~~~
^~
clang/lib/Tooling/Inclusions/Stdlib/StdTsSymbolMap.inc:51:1: note: in ex
pansion of macro ‘SYMBOL’
   51 | SYMBOL(temp_directory_path, std::experimental::filesystem::, <ex
perimental/filesystem>)
      | ^~~~~~
```




More information about the All-commits mailing list