[PATCH] Implement CWG496: Is a volatile-qualified type really a POD?

Agustín Bergé kaballo86 at hotmail.com
Wed Jan 21 06:43:21 PST 2015


Any suggestions on what to do with the failing testcase (CodeGenCXX/no-opt-volatile-memcpy.cpp)? This test checks that the issued `@llvm.memcpy` has `isvolatile=true`, but after this patch `memcpy` is no longer issued as those operations are no longer considered trivial. This could suggest that `memcpy` with `isvolatile=true` should still be used in those cases (albeit the docs say "it is unwise to depend on it"), or that there is dead code out there looking for volatile members in trivial operations.


================
Comment at: test/SemaCXX/type-traits.cpp:1863-1865
@@ -1859,2 +1862,5 @@
   { int arr[T(__is_trivially_copyable(DerivesHasRef))]; }
+  { int arr[T(__is_trivially_copyable(NonTrivialDefault))]; }
+  { int arr[T(__is_trivially_copyable(NonTrivialDefault[]))]; }
+  { int arr[T(__is_trivially_copyable(NonTrivialDefault[3]))]; }
 
----------------
rsmith wrote:
> Please commit this test update and the bugfix for the array case of `QualType::isTriviallyCopyableType` separately from the rest of the patch.
I don't have commit rights, but I will take this out and prepare a new revision.

http://reviews.llvm.org/D7060

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/






More information about the cfe-commits mailing list