[PATCH] D18596: [MSVC] PR27132: Proper mangling for __unaligned qualifier

Andrey Bokhanko via cfe-commits cfe-commits at lists.llvm.org
Tue Apr 12 19:06:35 PDT 2016


andreybokhanko marked an inline comment as done.

================
Comment at: test/SemaCXX/MicrosoftExtensions.cpp:89
@@ +88,3 @@
+void foo_unaligned(int *arg) {}
+void foo_unaligned(__unaligned int *arg) {}
+void foo_unaligned(int arg) {} // expected-note {{previous definition is here}}
----------------
Reid, thanks for looking into this patch!

I added more comprehensive overloading tests.

As for printing a warning, I added it -- in C mode. In C++ mode we don't allow types conversion that loses qualifiers. I do the same for __unaligned. If you want me to implement printing a warning in C++ mode as well (as MS compiler does), I would appreciate any hints on where the best place to do it. Putting it directly into code that verifies qualifiers compatibility seems to be odd.

Andrey



http://reviews.llvm.org/D18596





More information about the cfe-commits mailing list