[PATCH] D31976: Avoid assert when a non-static member function is qualified with __unaligned

Roger Ferrer Ibanez via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Apr 18 00:53:48 PDT 2017


rogfer01 added a comment.

`clang::Sema::IsOverload` explicitly forbids the `__restrict` case for the qualifier of non-static member functions. I assume `__unaligned` is not forbidden because the MSVC ABI does encode this qualifier while the Itanium ABI currently does not.

This patch just makes the attached test case fail like the one below:

  // Compile with        "-target x86_64-unknown-linux-gnu -x c++ -fms-extensions" 
  // and compare it with "-target x86_64-pc-windows-msvc -x c++ -fms-extensions" 
  void foo(__unaligned int* a) { }
  void foo(int *a) { }

Regards.


https://reviews.llvm.org/D31976





More information about the cfe-commits mailing list