[llvm-branch-commits] [cfe-branch] r322676 - Merging r321777:

Hans Wennborg via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Wed Jan 17 08:13:22 PST 2018


Author: hans
Date: Wed Jan 17 08:13:22 2018
New Revision: 322676

URL: http://llvm.org/viewvc/llvm-project?rev=322676&view=rev
Log:
Merging r321777:
------------------------------------------------------------------------
r321777 | rsmith | 2018-01-03 17:02:18 -0800 (Wed, 03 Jan 2018) | 2 lines

PR35028: Retain duplicate alignas attributes in template instantiation.

------------------------------------------------------------------------

Modified:
    cfe/branches/release_60/   (props changed)
    cfe/branches/release_60/include/clang/Basic/Attr.td
    cfe/branches/release_60/test/SemaTemplate/alignas.cpp

Propchange: cfe/branches/release_60/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Wed Jan 17 08:13:22 2018
@@ -1,4 +1,4 @@
 /cfe/branches/type-system-rewrite:134693-134817
-/cfe/trunk:321754,321771,321933,322018,322236,322350,322390,322405,322420,322518,322593
+/cfe/trunk:321754,321771,321777,321933,322018,322236,322350,322390,322405,322420,322518,322593
 /cfe/trunk/test:170344
 /cfe/trunk/test/SemaTemplate:126920

Modified: cfe/branches/release_60/include/clang/Basic/Attr.td
URL: http://llvm.org/viewvc/llvm-project/cfe/branches/release_60/include/clang/Basic/Attr.td?rev=322676&r1=322675&r2=322676&view=diff
==============================================================================
--- cfe/branches/release_60/include/clang/Basic/Attr.td (original)
+++ cfe/branches/release_60/include/clang/Basic/Attr.td Wed Jan 17 08:13:22 2018
@@ -549,6 +549,7 @@ def Aligned : InheritableAttr {
                                           Keyword<"_Alignas">]>,
                    Accessor<"isDeclspec",[Declspec<"align">]>];
   let Documentation = [Undocumented];
+  let DuplicatesAllowedWhileMerging = 1;
 }
 
 def AlignValue : Attr {

Modified: cfe/branches/release_60/test/SemaTemplate/alignas.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/branches/release_60/test/SemaTemplate/alignas.cpp?rev=322676&r1=322675&r2=322676&view=diff
==============================================================================
--- cfe/branches/release_60/test/SemaTemplate/alignas.cpp (original)
+++ cfe/branches/release_60/test/SemaTemplate/alignas.cpp Wed Jan 17 08:13:22 2018
@@ -21,3 +21,14 @@ struct C { char a[16]; };
 
 static_assert(sizeof(my_union<A, B, C>) == 16, "");
 static_assert(alignof(my_union<A, B, C>) == 8, "");
+
+namespace PR35028 {
+  template<class X, int Alignment> struct alignas(X) alignas(long long) alignas(long double) alignas(Alignment) Aligned {
+    union {
+      long long align1;
+      long double align2;
+      char data[sizeof(X)];
+    };
+  };
+  Aligned<int, 1> a;
+}




More information about the llvm-branch-commits mailing list