[all-commits] [llvm/llvm-project] 27a574: [Sema][Windows] Don't special-case void* in __unal...

Eli Friedman via All-commits all-commits at lists.llvm.org
Thu Mar 10 14:49:44 PST 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 27a574962567224d3a36a70cf8abf0ad3d751ec5
      https://github.com/llvm/llvm-project/commit/27a574962567224d3a36a70cf8abf0ad3d751ec5
  Author: Eli Friedman <efriedma at quicinc.com>
  Date:   2022-03-10 (Thu, 10 Mar 2022)

  Changed paths:
    M clang/include/clang/Basic/DiagnosticSemaKinds.td
    M clang/lib/Sema/SemaExprCXX.cpp
    M clang/lib/Sema/SemaOverload.cpp
    M clang/test/SemaCXX/MicrosoftExtensions.cpp

  Log Message:
  -----------
  [Sema][Windows] Don't special-case void* in __unaligned conversions.

As far as I can tell, MSVC allows the relevant conversions for all
pointer types. Found compiling a Windows SDK header.

I've verified that the updated errors in MicrosoftExtensions.cpp match
the ones that MSVC actually emits, except for the one with a FIXME. (Not
sure why this wasn't done for the patch that added the tests.)

To make up for the missing error, add a warning that triggers on
conversions that drop the __unaligned qualfier.

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




More information about the All-commits mailing list