[all-commits] [llvm/llvm-project] 2ec7f6: [clang-cl] [Sema] Do not prefer integral conversio...

Marek Kurdej via All-commits all-commits at lists.llvm.org
Thu Apr 1 23:58:36 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 2ec7f639c49fdee8956a09994d1cf99ef4282746
      https://github.com/llvm/llvm-project/commit/2ec7f639c49fdee8956a09994d1cf99ef4282746
  Author: Marek Kurdej <marek.kurdej+llvm.org at gmail.com>
  Date:   2021-04-02 (Fri, 02 Apr 2021)

  Changed paths:
    M clang/include/clang/Basic/LangOptions.h
    M clang/lib/Sema/SemaOverload.cpp
    M clang/test/SemaCXX/MicrosoftCompatibility.cpp

  Log Message:
  -----------
  [clang-cl] [Sema] Do not prefer integral conversion over floating-to-integral for MS compatibility 19.28 and higher.

As of MSVC 19.28 (2019 Update 8), integral conversion is no longer preferred over floating-to-integral, and so MSVC is more standard conformant and will generate a compiler error on ambiguous call.
Cf. https://godbolt.org/z/E8xsdqKsb.
Initially found during the review of D99641.

Reviewed By: rnk

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




More information about the All-commits mailing list