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

Reid Kleckner via cfe-commits cfe-commits at lists.llvm.org
Wed Apr 13 13:05:51 PDT 2016


rnk accepted this revision.
rnk added a comment.
This revision is now accepted and ready to land.

Thanks! This looks great.


================
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}}
----------------
andreybokhanko wrote:
> 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
> 
I think we can keep it as you have it for now. We can wait and see if users complain about the C++ mode error.


http://reviews.llvm.org/D18596





More information about the cfe-commits mailing list