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

Akira Hatanaka via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Sun Apr 16 20:23:37 PDT 2017


ahatanak added inline comments.


================
Comment at: test/CodeGenCXX/unaligned-duplicated-mangle-name.cpp:15
+
+void A::foo() // expected-error {{definition with same mangled name as another definition}}
+              // expected-note at -6 {{previous definition is here}}
----------------
Do you know why clang doesn't error out until it reaches IRGen when compiling this test? I found it interesting that Sema detects the redeclaration and errors out when the function is marked "restrict", but doesn't do so when it's marked "unaligned".


https://reviews.llvm.org/D31976





More information about the cfe-commits mailing list