[all-commits] [llvm/llvm-project] f31b19: [analyzer] Fix a test issue in mingw configuration...

Martin Storsjö via All-commits all-commits at lists.llvm.org
Mon May 27 00:18:26 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: f31b197d9df141effd439de8be51ce24f3e8f200
      https://github.com/llvm/llvm-project/commit/f31b197d9df141effd439de8be51ce24f3e8f200
  Author: Martin Storsjö <martin at martin.st>
  Date:   2024-05-27 (Mon, 27 May 2024)

  Changed paths:
    M clang/unittests/StaticAnalyzer/MemRegionDescriptiveNameTest.cpp

  Log Message:
  -----------
  [analyzer] Fix a test issue in mingw configurations (#92737)

On Windows, long is always 32 bit, thus one can't use long for casting
pointers to integers, on 64 bit architectures.

Instead use long long, which should be large enough.

This avoids errors like "error: cast from pointer to smaller type 'long'
loses information" in this testcase.

This condition only seems to be an error in mingw mode; in MSVC mode
(clang-cl), this is only a warning.



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list