<table border="1" cellspacing="0" cellpadding="8">
    <tr>
        <th>Issue</th>
        <td>
            <a href=https://github.com/llvm/llvm-project/issues/58944>58944</a>
        </td>
    </tr>

    <tr>
        <th>Summary</th>
        <td>
            No signed integer overflow warning reported in the call to constructor
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            new issue
      </td>
    </tr>

    <tr>
      <th>Assignees</th>
      <td>
      </td>
    </tr>

    <tr>
      <th>Reporter</th>
      <td>
          Fedr
      </td>
    </tr>
</table>

<pre>
    In the following program there are two similar signed integer overflows:
```
#include <cstdint>

void func(uint64_t) {}

struct A { 
    A(uint64_t){} 
};

int main() {
    func(1024 * 1024 * 1024 * 1024 * 1024ull); // warning, ok
    A a(1024 * 1024 * 1024 * 1024 * 1024ull); // no warning in Clang!
}
```
The one in calling `func` is detected by Clang.
But the other one in calling `A::A` does not, even with `-Wall -Wextra` flags. At the same time both GCC and MSVC reports the warning here as well. Online demo: https://gcc.godbolt.org/z/6vGT33q1W

Related discussion: https://stackoverflow.com/q/73962573/7325599
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJylU0tz0zAQ_jXyZaceW4rt-OCDk9IOB2AGGHpkZEt2RBWpleSE8utZ2UkboAwHPHpZu_vttw91Vjw1bw2EnYTBam2Pyozw4Ozo-D7eOgkcZzha8GqvNHe4j0YKUCbIUTqwB-kGNPSEtSS7JllLyuw0ll_KlOn1JCQQtu19EGhK2JuTdF4PVgkYJtMTup5QXK6-BkJrINWGVNeXmj64qQ_QRhEsV4Bf-6vhYneSRwS2uQRBRdhzZdDo7OUZ6cQiz-gKCG3hH4dJ6-iPIRl6gwOO3BlMIqFbsPcXBIH_D6qxZ2BMPGw1jx7yl_heS_xnLKo1Mhr0XOtoi7I5vjID5UHIIPuAteyeFsh0MdxMYe4IGxvgFYg2lpq10R8IKz2yCzFeeZAGjirsotLVHRrA1Z38HhyPmoPmo0-hXbA932NbKVw6dAO32y1wI-Ddpy9bcPLBuuBnvXPUSyt6OEqtU_hgkIvEAPYWicAuhIe5_-ZkjX2fjlZ0VofUOszTzQ-c5eH2M2OP-d1lI3yUmscECOX7yXtlzZ9wPvD-_tzlaW_3ePeIs2J1SYuKzUdaFHWdyCYvy3VeV5TWiWiYqFnNk6CCls17-7eX8xzjEvesMcceUw7BQm_N0vbWJZPTzW_hYsKn7kRM68N5u8Jn_A3ri7_K-0l6PBTrerVKdk2eDR3jPS8pG0pO8yrraS1Wa84lLwvBE807qX1Dig2h1MgjzBB4JsV1ohqaUZrjR7OsyupU0mpN61wMXcEGWuRklUl8XzqNPGINEtfMlLpp9CjUygf_IuR-zoyc3SE-n8LOuuZGCpfMfpuZ909kT2SA">