<div dir="ltr">This commit seems to have some substantial downsides... for example, it now flags calls like this<span style="text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"><span> </span>as warnings</span>:<div><a href="http://git.savannah.gnu.org/cgit/gettext.git/tree/gettext-tools/src/msgl-check.c?id=05ecefa943f339019b7127aa92cbb09f6fd49ed3#n478">http://git.savannah.gnu.org/cgit/gettext.git/tree/gettext-tools/src/msgl-check.c?id=05ecefa943f339019b7127aa92cbb09f6fd49ed3#n478</a><br></div><div><br></div><div>Previously, the reverse order meant that the plural format string was examined, but now it is only the singular string. Since the singular string doesn't include a substitution, the unused format variable warning fires after this revision.</div><div><br></div><div>I don't see a strong argument for why one order is more correct than the other; however, given that this is in conflict with real code found in the wild, I think this needs to be addressed.</div><div><br></div><div>Since the semantics of the ordering of multiple format args seems somewhat ill-defined, it seems to me like reverting may be the best near-term choice. I can imagine other ways to fix the diagnostic, but the only behaviour that I would believe to be expected by existing code is the old one, so a change like this one probably needs to be more carefully vetted before being (re-)committed.</div><div><br></div><div>Please let me know your plan. (If I don't hear back in a day or so, I'll go ahead and revert for you as the safe default course of action.)</div></div><br><div class="gmail_quote"><div dir="ltr">On Wed, Jun 20, 2018 at 7:34 AM Michael Kruse via cfe-commits <<a href="mailto:cfe-commits@lists.llvm.org">cfe-commits@lists.llvm.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Author: meinersbur<br>
Date: Tue Jun 19 16:46:52 2018<br>
New Revision: 335084<br>
<br>
URL: <a href="http://llvm.org/viewvc/llvm-project?rev=335084&view=rev" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project?rev=335084&view=rev</a><br>
Log:<br>
Append new attributes to the end of an AttributeList.<br>
<br>
... instead of prepending it at the beginning (the original behavior<br>
since implemented in r122535 2010-12-23). This builds up an<br>
AttributeList in the the order in which the attributes appear in the<br>
source.<br>
<br>
The reverse order caused nodes for attributes in the AST (e.g. LoopHint)<br>
to be in the reverse, and therefore printed in the wrong order by<br>
-ast-dump. Some TODO comments mention this. The order was explicitly<br>
reversed for enable_if attribute overload resolution and name mangling,<br>
which is not necessary anymore with this patch.<br>
<br>
The change unfortunately has some secondary effects, especially for<br>
diagnostic output. In the simplest cases, the CHECK lines or expected<br>
diagnostic were changed to the the new output. If the kind of<br>
error/warning changed, the attribute's order was changed instead.<br>
<br>
It also causes some 'previous occurrence here' hints to be textually<br>
after the main marker. This typically happens when attributes are<br>
merged, but are incompatible. Interchanging the role of the the main<br>
and note SourceLocation will also cause the case where two different<br>
declaration's attributes (in contrast to multiple attributes of the<br>
same declaration) are merged to be reversed. There is no easy fix<br>
because sometimes previous attributes are merged into a new<br>
declaration's attribute list, sometimes new attributes are added to a<br>
previous declaration's attribute list. Since 'previous occurrence here'<br>
pointing to locations after the main marker is not rare, I left the<br>
markers as-is; it is only relevant when the attributes are declared in<br>
the same declaration anyway, which often is on the same line.<br>
<br>
Differential Revision: <a href="https://reviews.llvm.org/D48100" rel="noreferrer" target="_blank">https://reviews.llvm.org/D48100</a><br>
<br>
Modified:<br>
    cfe/trunk/include/clang/Sema/AttributeList.h<br>
    cfe/trunk/lib/AST/ItaniumMangle.cpp<br>
    cfe/trunk/lib/Parse/ParseDecl.cpp<br>
    cfe/trunk/lib/Sema/SemaOverload.cpp<br>
    cfe/trunk/lib/Serialization/ASTReaderDecl.cpp<br>
    cfe/trunk/test/Index/annotate-comments-availability-attrs.cpp<br>
    cfe/trunk/test/Index/complete-with-annotations.cpp<br>
    cfe/trunk/test/Misc/ast-print-pragmas.cpp<br>
    cfe/trunk/test/PCH/pragma-loop.cpp<br>
    cfe/trunk/test/Parser/pragma-loop-safety.cpp<br>
    cfe/trunk/test/Parser/pragma-loop.cpp<br>
    cfe/trunk/test/Parser/pragma-unroll.cpp<br>
    cfe/trunk/test/Sema/attr-availability-tvos.c<br>
    cfe/trunk/test/Sema/attr-availability.c<br>
    cfe/trunk/test/Sema/attr-coldhot.c<br>
    cfe/trunk/test/Sema/attr-disable-tail-calls.c<br>
    cfe/trunk/test/Sema/attr-long-call.c<br>
    cfe/trunk/test/Sema/attr-micromips.c<br>
    cfe/trunk/test/Sema/attr-notail.c<br>
    cfe/trunk/test/Sema/attr-ownership.c<br>
    cfe/trunk/test/Sema/attr-ownership.cpp<br>
    cfe/trunk/test/Sema/attr-print.c<br>
    cfe/trunk/test/Sema/attr-swiftcall.c<br>
    cfe/trunk/test/Sema/attr-target-mv.c<br>
    cfe/trunk/test/Sema/attr-visibility.c<br>
    cfe/trunk/test/Sema/internal_linkage.c<br>
    cfe/trunk/test/Sema/mips-interrupt-attr.c<br>
    cfe/trunk/test/Sema/ms_abi-sysv_abi.c<br>
    cfe/trunk/test/Sema/nullability.c<br>
    cfe/trunk/test/Sema/stdcall-fastcall.c<br>
    cfe/trunk/test/SemaCXX/attr-print.cpp<br>
    cfe/trunk/test/SemaCXX/attr-swiftcall.cpp<br>
    cfe/trunk/test/SemaCXX/decl-microsoft-call-conv.cpp<br>
    cfe/trunk/test/SemaCXX/ms-uuid.cpp<br>
    cfe/trunk/test/SemaOpenCL/<a href="http://address-spaces.cl" rel="noreferrer" target="_blank">address-spaces.cl</a><br>
    cfe/trunk/test/SemaTemplate/attributes.cpp<br>
<br>
Modified: cfe/trunk/include/clang/Sema/AttributeList.h<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Sema/AttributeList.h?rev=335084&r1=335083&r2=335084&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Sema/AttributeList.h?rev=335084&r1=335083&r2=335084&view=diff</a><br>
==============================================================================<br>
--- cfe/trunk/include/clang/Sema/AttributeList.h (original)<br>
+++ cfe/trunk/include/clang/Sema/AttributeList.h Tue Jun 19 16:46:52 2018<br>
@@ -764,8 +764,11 @@ public:<br>
   void add(AttributeList *newAttr) {<br>
     assert(newAttr);<br>
     assert(newAttr->getNext() == nullptr);<br>
-    newAttr->setNext(list);<br>
-    list = newAttr;<br>
+<br>
+    // FIXME: AttributeList is a singly linked list, i.e. appending to the end<br>
+    // requires walking to the last element. For adding n attributes, this<br>
+    // requires O(n^2) time. However, AttributeLists should be very short.<br>
+    addAllAtEnd(newAttr);<br>
   }<br>
<br>
   void addAll(AttributeList *newList) {<br>
<br>
Modified: cfe/trunk/lib/AST/ItaniumMangle.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/AST/ItaniumMangle.cpp?rev=335084&r1=335083&r2=335084&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/AST/ItaniumMangle.cpp?rev=335084&r1=335083&r2=335084&view=diff</a><br>
==============================================================================<br>
--- cfe/trunk/lib/AST/ItaniumMangle.cpp (original)<br>
+++ cfe/trunk/lib/AST/ItaniumMangle.cpp Tue Jun 19 16:46:52 2018<br>
@@ -707,10 +707,8 @@ void CXXNameMangler::mangleFunctionEncod<br>
   if (FD->hasAttr<EnableIfAttr>()) {<br>
     FunctionTypeDepthState Saved = FunctionTypeDepth.push();<br>
     Out << "Ua9enable_ifI";<br>
-    // FIXME: specific_attr_iterator iterates in reverse order. Fix that and use<br>
-    // it here.<br>
-    for (AttrVec::const_reverse_iterator I = FD->getAttrs().rbegin(),<br>
-                                         E = FD->getAttrs().rend();<br>
+    for (AttrVec::const_iterator I = FD->getAttrs().begin(),<br>
+                                 E = FD->getAttrs().end();<br>
          I != E; ++I) {<br>
       EnableIfAttr *EIA = dyn_cast<EnableIfAttr>(*I);<br>
       if (!EIA)<br>
<br>
Modified: cfe/trunk/lib/Parse/ParseDecl.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Parse/ParseDecl.cpp?rev=335084&r1=335083&r2=335084&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Parse/ParseDecl.cpp?rev=335084&r1=335083&r2=335084&view=diff</a><br>
==============================================================================<br>
--- cfe/trunk/lib/Parse/ParseDecl.cpp (original)<br>
+++ cfe/trunk/lib/Parse/ParseDecl.cpp Tue Jun 19 16:46:52 2018<br>
@@ -1649,9 +1649,7 @@ void Parser::stripTypeAttributesOffDeclS<br>
   }<br>
<br>
   // Find end of type attributes Attrs and add NewTypeAttributes in the same<br>
-  // order they were in originally.  (Remember, in AttributeList things earlier<br>
-  // in source order are later in the list, since new attributes are added to<br>
-  // the front of the list.)<br>
+  // order they were in originally.<br>
   Attrs.addAllAtEnd(TypeAttrHead);<br>
 }<br>
<br>
<br>
Modified: cfe/trunk/lib/Sema/SemaOverload.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaOverload.cpp?rev=335084&r1=335083&r2=335084&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaOverload.cpp?rev=335084&r1=335083&r2=335084&view=diff</a><br>
==============================================================================<br>
--- cfe/trunk/lib/Sema/SemaOverload.cpp (original)<br>
+++ cfe/trunk/lib/Sema/SemaOverload.cpp Tue Jun 19 16:46:52 2018<br>
@@ -6189,24 +6189,6 @@ Sema::SelectBestMethod(Selector Sel, Mul<br>
   return nullptr;<br>
 }<br>
<br>
-// specific_attr_iterator iterates over enable_if attributes in reverse, and<br>
-// enable_if is order-sensitive. As a result, we need to reverse things<br>
-// sometimes. Size of 4 elements is arbitrary.<br>
-static SmallVector<EnableIfAttr *, 4><br>
-getOrderedEnableIfAttrs(const FunctionDecl *Function) {<br>
-  SmallVector<EnableIfAttr *, 4> Result;<br>
-  if (!Function->hasAttrs())<br>
-    return Result;<br>
-<br>
-  const auto &FuncAttrs = Function->getAttrs();<br>
-  for (Attr *Attr : FuncAttrs)<br>
-    if (auto *EnableIf = dyn_cast<EnableIfAttr>(Attr))<br>
-      Result.push_back(EnableIf);<br>
-<br>
-  std::reverse(Result.begin(), Result.end());<br>
-  return Result;<br>
-}<br>
-<br>
 static bool<br>
 convertArgsForAvailabilityChecks(Sema &S, FunctionDecl *Function, Expr *ThisArg,<br>
                                  ArrayRef<Expr *> Args, Sema::SFINAETrap &Trap,<br>
@@ -6280,9 +6262,9 @@ convertArgsForAvailabilityChecks(Sema &S<br>
<br>
 EnableIfAttr *Sema::CheckEnableIf(FunctionDecl *Function, ArrayRef<Expr *> Args,<br>
                                   bool MissingImplicitThis) {<br>
-  SmallVector<EnableIfAttr *, 4> EnableIfAttrs =<br>
-      getOrderedEnableIfAttrs(Function);<br>
-  if (EnableIfAttrs.empty())<br>
+  auto EnableIfAttrs = Function->specific_attrs<EnableIfAttr>();<br>
+<br>
+  if (EnableIfAttrs.begin() == EnableIfAttrs.end())<br>
     return nullptr;<br>
<br>
   SFINAETrap Trap(*this);<br>
@@ -6292,7 +6274,7 @@ EnableIfAttr *Sema::CheckEnableIf(Functi<br>
   if (!convertArgsForAvailabilityChecks(<br>
           *this, Function, /*ThisArg=*/nullptr, Args, Trap,<br>
           /*MissingImplicitThis=*/true, DiscardedThis, ConvertedArgs))<br>
-    return EnableIfAttrs[0];<br>
+    return *EnableIfAttrs.begin();<br>
<br>
   for (auto *EIA : EnableIfAttrs) {<br>
     APValue Result;<br>
@@ -8943,24 +8925,21 @@ static Comparison compareEnableIfAttrs(c<br>
     return Cand1Attr ? Comparison::Better : Comparison::Worse;<br>
   }<br>
<br>
-  // FIXME: The next several lines are just<br>
-  // specific_attr_iterator<EnableIfAttr> but going in declaration order,<br>
-  // instead of reverse order which is how they're stored in the AST.<br>
-  auto Cand1Attrs = getOrderedEnableIfAttrs(Cand1);<br>
-  auto Cand2Attrs = getOrderedEnableIfAttrs(Cand2);<br>
-<br>
-  // It's impossible for Cand1 to be better than (or equal to) Cand2 if Cand1<br>
-  // has fewer enable_if attributes than Cand2.<br>
-  if (Cand1Attrs.size() < Cand2Attrs.size())<br>
-    return Comparison::Worse;<br>
+  auto Cand1Attrs = Cand1->specific_attrs<EnableIfAttr>();<br>
+  auto Cand2Attrs = Cand2->specific_attrs<EnableIfAttr>();<br>
<br>
   auto Cand1I = Cand1Attrs.begin();<br>
   llvm::FoldingSetNodeID Cand1ID, Cand2ID;<br>
-  for (auto &Cand2A : Cand2Attrs) {<br>
+  for (auto Cand2A : Cand2Attrs) {<br>
     Cand1ID.clear();<br>
     Cand2ID.clear();<br>
<br>
-    auto &Cand1A = *Cand1I++;<br>
+    // It's impossible for Cand1 to be better than (or equal to) Cand2 if Cand1<br>
+    // has fewer enable_if attributes than Cand2.<br>
+    if (Cand1I == Cand1Attrs.end())<br>
+      return Comparison::Worse;<br>
+    auto Cand1A = Cand1I++;<br>
+<br>
     Cand1A->getCond()->Profile(Cand1ID, S.getASTContext(), true);<br>
     Cand2A->getCond()->Profile(Cand2ID, S.getASTContext(), true);<br>
     if (Cand1ID != Cand2ID)<br>
<br>
Modified: cfe/trunk/lib/Serialization/ASTReaderDecl.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Serialization/ASTReaderDecl.cpp?rev=335084&r1=335083&r2=335084&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Serialization/ASTReaderDecl.cpp?rev=335084&r1=335083&r2=335084&view=diff</a><br>
==============================================================================<br>
--- cfe/trunk/lib/Serialization/ASTReaderDecl.cpp (original)<br>
+++ cfe/trunk/lib/Serialization/ASTReaderDecl.cpp Tue Jun 19 16:46:52 2018<br>
@@ -2804,36 +2804,25 @@ static bool hasSameOverloadableAttrs(con<br>
   // Note that pass_object_size attributes are represented in the function's<br>
   // ExtParameterInfo, so we don't need to check them here.<br>
<br>
-  SmallVector<const EnableIfAttr *, 4> AEnableIfs;<br>
-  // Since this is an equality check, we can ignore that enable_if attrs show up<br>
-  // in reverse order.<br>
-  for (const auto *EIA : A->specific_attrs<EnableIfAttr>())<br>
-    AEnableIfs.push_back(EIA);<br>
-<br>
-  SmallVector<const EnableIfAttr *, 4> BEnableIfs;<br>
-  for (const auto *EIA : B->specific_attrs<EnableIfAttr>())<br>
-    BEnableIfs.push_back(EIA);<br>
-<br>
-  // Two very common cases: either we have 0 enable_if attrs, or we have an<br>
-  // unequal number of enable_if attrs.<br>
-  if (AEnableIfs.empty() && BEnableIfs.empty())<br>
-    return true;<br>
-<br>
-  if (AEnableIfs.size() != BEnableIfs.size())<br>
-    return false;<br>
-<br>
+  // Return false if any of the enable_if expressions of A and B are different.<br>
   llvm::FoldingSetNodeID Cand1ID, Cand2ID;<br>
-  for (unsigned I = 0, E = AEnableIfs.size(); I != E; ++I) {<br>
+  auto AEnableIfAttrs = A->specific_attrs<EnableIfAttr>();<br>
+  auto BEnableIfAttrs = B->specific_attrs<EnableIfAttr>();<br>
+  auto AEnableIf = AEnableIfAttrs.begin();<br>
+  auto BEnableIf = BEnableIfAttrs.begin();<br>
+  for (; AEnableIf != AEnableIfAttrs.end() && BEnableIf != BEnableIfAttrs.end();<br>
+       ++BEnableIf, ++AEnableIf) {<br>
     Cand1ID.clear();<br>
     Cand2ID.clear();<br>
<br>
-    AEnableIfs[I]->getCond()->Profile(Cand1ID, A->getASTContext(), true);<br>
-    BEnableIfs[I]->getCond()->Profile(Cand2ID, B->getASTContext(), true);<br>
+    AEnableIf->getCond()->Profile(Cand1ID, A->getASTContext(), true);<br>
+    BEnableIf->getCond()->Profile(Cand2ID, B->getASTContext(), true);<br>
     if (Cand1ID != Cand2ID)<br>
       return false;<br>
   }<br>
<br>
-  return true;<br>
+  // Return false if the number of enable_if attributes was different.<br>
+  return AEnableIf == AEnableIfAttrs.end() && BEnableIf == BEnableIfAttrs.end();<br>
 }<br>
<br>
 /// Determine whether the two declarations refer to the same entity.<br>
<br>
Modified: cfe/trunk/test/Index/annotate-comments-availability-attrs.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Index/annotate-comments-availability-attrs.cpp?rev=335084&r1=335083&r2=335084&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Index/annotate-comments-availability-attrs.cpp?rev=335084&r1=335083&r2=335084&view=diff</a><br>
==============================================================================<br>
--- cfe/trunk/test/Index/annotate-comments-availability-attrs.cpp (original)<br>
+++ cfe/trunk/test/Index/annotate-comments-availability-attrs.cpp Tue Jun 19 16:46:52 2018<br>
@@ -13,7 +13,7 @@<br>
 void attr_availability_1() __attribute__((availability(macosx,obsoleted=10.0,introduced=8.0,deprecated=9.0, message="use availability_test in <foo.h>")))<br>
                            __attribute__((availability(ios,unavailable, message="not for iOS")));<br>
<br>
-// CHECK: FullCommentAsXML=[<Function file="{{[^"]+}}annotate-comments-availability-attrs.cpp" line="[[@LINE-3]]" column="6"><Name>attr_availability_1</Name><USR>c:@F@attr_availability_1#</USR><Declaration>void attr_availability_1()</Declaration><Abstract><Para> Aaa.</Para></Abstract><Availability distribution="iOS"><DeprecationSummary>not for iOS</DeprecationSummary><Unavailable/></Availability><Availability distribution="macOS"><IntroducedInVersion>8.0</IntroducedInVersion><DeprecatedInVersion>9.0</DeprecatedInVersion><RemovedAfterVersion>10.0</RemovedAfterVersion><DeprecationSummary>use availability_test in &lt;foo.h&gt;</DeprecationSummary></Availability></Function>]<br>
+// CHECK: FullCommentAsXML=[<Function file="{{[^"]+}}annotate-comments-availability-attrs.cpp" line="[[@LINE-3]]" column="6"><Name>attr_availability_1</Name><USR>c:@F@attr_availability_1#</USR><Declaration>void attr_availability_1()</Declaration><Abstract><Para> Aaa.</Para></Abstract><Availability distribution="macOS"><IntroducedInVersion>8.0</IntroducedInVersion><DeprecatedInVersion>9.0</DeprecatedInVersion><RemovedAfterVersion>10.0</RemovedAfterVersion><DeprecationSummary>use availability_test in &lt;foo.h&gt;</DeprecationSummary></Availability><Availability distribution="iOS"><DeprecationSummary>not for iOS</DeprecationSummary><Unavailable/></Availability></Function>]<br>
<br>
 /// Aaa.<br>
 void attr_availability_2() __attribute__((availability(macosx,obsoleted=10.0.1,introduced=8.0.1,deprecated=9.0.1)));<br>
<br>
Modified: cfe/trunk/test/Index/complete-with-annotations.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Index/complete-with-annotations.cpp?rev=335084&r1=335083&r2=335084&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Index/complete-with-annotations.cpp?rev=335084&r1=335083&r2=335084&view=diff</a><br>
==============================================================================<br>
--- cfe/trunk/test/Index/complete-with-annotations.cpp (original)<br>
+++ cfe/trunk/test/Index/complete-with-annotations.cpp Tue Jun 19 16:46:52 2018<br>
@@ -14,7 +14,7 @@ void X::doSomething() {<br>
 }<br>
<br>
 // CHECK: CXXMethod:{ResultType void}{TypedText doSomething}{LeftParen (}{RightParen )} (34)<br>
-// CHECK: FieldDecl:{ResultType int}{TypedText field} (35) ("three", "two", "one")<br>
+// CHECK: FieldDecl:{ResultType int}{TypedText field} (35) ("one", "two", "three")<br>
 // CHECK: CXXMethod:{ResultType void}{TypedText func2}{LeftParen (}{RightParen )} (34) ("some annotation")<br>
 // CHECK: FieldDecl:{ResultType int}{TypedText member2} (35) ("another annotation", "some annotation")<br>
 // CHECK: CXXMethod:{ResultType X &}{TypedText operator=}{LeftParen (}{Placeholder const X &}{RightParen )} (79)<br>
<br>
Modified: cfe/trunk/test/Misc/ast-print-pragmas.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Misc/ast-print-pragmas.cpp?rev=335084&r1=335083&r2=335084&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Misc/ast-print-pragmas.cpp?rev=335084&r1=335083&r2=335084&view=diff</a><br>
==============================================================================<br>
--- cfe/trunk/test/Misc/ast-print-pragmas.cpp (original)<br>
+++ cfe/trunk/test/Misc/ast-print-pragmas.cpp Tue Jun 19 16:46:52 2018<br>
@@ -1,11 +1,8 @@<br>
 // RUN: %clang_cc1 -ast-print %s -o - | FileCheck %s<br>
 // RUN: %clang_cc1 -DMS_EXT -fsyntax-only -fms-extensions %s -triple x86_64-pc-win32 -ast-print | FileCheck %s --check-prefix=MS-EXT<br>
<br>
-// FIXME: A bug in ParsedAttributes causes the order of the attributes to be<br>
-// reversed. The checks are consequently in the reverse order below.<br>
-<br>
-// CHECK: #pragma clang loop interleave_count(8){{$}}<br>
-// CHECK-NEXT: #pragma clang loop vectorize_width(4)<br>
+// CHECK: #pragma clang loop vectorize_width(4)<br>
+// CHECK-NEXT: #pragma clang loop interleave_count(8){{$}}<br>
<br>
 void test(int *List, int Length) {<br>
   int i = 0;<br>
@@ -17,9 +14,9 @@ void test(int *List, int Length) {<br>
     i++;<br>
   }<br>
<br>
-// CHECK: #pragma clang loop interleave(disable)<br>
+// CHECK: #pragma clang loop distribute(disable)<br>
 // CHECK-NEXT: #pragma clang loop vectorize(enable)<br>
-// CHECK-NEXT: #pragma clang loop distribute(disable)<br>
+// CHECK-NEXT: #pragma clang loop interleave(disable)<br>
<br>
 #pragma clang loop distribute(disable)<br>
 #pragma clang loop vectorize(enable)<br>
@@ -30,9 +27,9 @@ void test(int *List, int Length) {<br>
     i++;<br>
   }<br>
<br>
-// CHECK: #pragma clang loop interleave(enable)<br>
+// CHECK: #pragma clang loop distribute(enable)<br>
 // CHECK-NEXT: #pragma clang loop vectorize(disable)<br>
-// CHECK-NEXT: #pragma clang loop distribute(enable)<br>
+// CHECK-NEXT: #pragma clang loop interleave(enable)<br>
<br>
 #pragma clang loop distribute(enable)<br>
 #pragma clang loop vectorize(disable)<br>
@@ -52,8 +49,8 @@ void test_nontype_template_param(int *Li<br>
   }<br>
 }<br>
<br>
-// CHECK: #pragma clang loop interleave_count(I)<br>
 // CHECK: #pragma clang loop vectorize_width(V)<br>
+// CHECK: #pragma clang loop interleave_count(I)<br>
<br>
 void test_templates(int *List, int Length) {<br>
   test_nontype_template_param<2, 4>(List, Length);<br>
<br>
Modified: cfe/trunk/test/PCH/pragma-loop.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/test/PCH/pragma-loop.cpp?rev=335084&r1=335083&r2=335084&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/cfe/trunk/test/PCH/pragma-loop.cpp?rev=335084&r1=335083&r2=335084&view=diff</a><br>
==============================================================================<br>
--- cfe/trunk/test/PCH/pragma-loop.cpp (original)<br>
+++ cfe/trunk/test/PCH/pragma-loop.cpp Tue Jun 19 16:46:52 2018<br>
@@ -1,26 +1,23 @@<br>
 // RUN: %clang_cc1 -emit-pch -o %t.a %s<br>
 // RUN: %clang_cc1 -include-pch %t.a %s -ast-print -o - | FileCheck %s<br>
<br>
-// FIXME: A bug in ParsedAttributes causes the order of the attributes to be<br>
-// reversed. The checks are consequently in the reverse order below.<br>
-<br>
-// CHECK: #pragma clang loop unroll_count(16){{$}}<br>
-// CHECK: #pragma clang loop interleave_count(8)<br>
 // CHECK: #pragma clang loop vectorize_width(4)<br>
-// CHECK: #pragma clang loop distribute(enable)<br>
-// CHECK: #pragma clang loop unroll(disable)<br>
-// CHECK: #pragma clang loop interleave(disable)<br>
+// CHECK: #pragma clang loop interleave_count(8)<br>
+// CHECK: #pragma clang loop unroll_count(16){{$}}<br>
 // CHECK: #pragma clang loop vectorize(enable)<br>
-// CHECK: #pragma clang loop distribute(disable)<br>
-// CHECK: #pragma clang loop unroll(full)<br>
-// CHECK: #pragma clang loop interleave(enable)<br>
+// CHECK: #pragma clang loop interleave(disable)<br>
+// CHECK: #pragma clang loop unroll(disable)<br>
+// CHECK: #pragma clang loop distribute(enable)<br>
 // CHECK: #pragma clang loop vectorize(disable)<br>
+// CHECK: #pragma clang loop interleave(enable)<br>
+// CHECK: #pragma clang loop unroll(full)<br>
+// CHECK: #pragma clang loop distribute(disable)<br>
 // FIXME: "#pragma unroll (enable)" is invalid and is not the input source.<br>
 // CHECK: #pragma unroll (enable){{$}}<br>
 // CHECK: #pragma unroll (32){{$}}<br>
 // CHECK: #pragma nounroll{{$}}<br>
-// CHECK: #pragma clang loop interleave_count(I)<br>
 // CHECK: #pragma clang loop vectorize_width(V)<br>
+// CHECK: #pragma clang loop interleave_count(I)<br>
<br>
 #ifndef HEADER<br>
 #define HEADER<br>
<br>
Modified: cfe/trunk/test/Parser/pragma-loop-safety.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Parser/pragma-loop-safety.cpp?rev=335084&r1=335083&r2=335084&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Parser/pragma-loop-safety.cpp?rev=335084&r1=335083&r2=335084&view=diff</a><br>
==============================================================================<br>
--- cfe/trunk/test/Parser/pragma-loop-safety.cpp (original)<br>
+++ cfe/trunk/test/Parser/pragma-loop-safety.cpp Tue Jun 19 16:46:52 2018<br>
@@ -25,10 +25,10 @@ void test(int *List, int Length) {<br>
     List[i] = i;<br>
   }<br>
<br>
-/* expected-error {{duplicate directives 'vectorize(assume_safety)' and 'vectorize(enable)'}} */ #pragma clang loop vectorize(enable)<br>
-#pragma clang loop vectorize(assume_safety)<br>
-/* expected-error {{duplicate directives 'interleave(assume_safety)' and 'interleave(enable)'}} */ #pragma clang loop interleave(enable)<br>
-#pragma clang loop interleave(assume_safety)<br>
+#pragma clang loop vectorize(enable)<br>
+/* expected-error {{duplicate directives 'vectorize(enable)' and 'vectorize(assume_safety)'}} */ #pragma clang loop vectorize(assume_safety)<br>
+#pragma clang loop interleave(enable)<br>
+/* expected-error {{duplicate directives 'interleave(enable)' and 'interleave(assume_safety)'}} */ #pragma clang loop interleave(assume_safety)<br>
   while (i-9 < Length) {<br>
     List[i] = i;<br>
   }<br>
<br>
Modified: cfe/trunk/test/Parser/pragma-loop.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Parser/pragma-loop.cpp?rev=335084&r1=335083&r2=335084&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Parser/pragma-loop.cpp?rev=335084&r1=335083&r2=335084&view=diff</a><br>
==============================================================================<br>
--- cfe/trunk/test/Parser/pragma-loop.cpp (original)<br>
+++ cfe/trunk/test/Parser/pragma-loop.cpp Tue Jun 19 16:46:52 2018<br>
@@ -231,51 +231,50 @@ const int VV = 4;<br>
 // of the next three tests rather than the last, and the order of the kinds<br>
 // is also reversed.<br>
<br>
-/* expected-error {{incompatible directives 'vectorize(disable)' and 'vectorize_width(4)'}} */ #pragma clang loop vectorize_width(4)<br>
-#pragma clang loop vectorize(disable)<br>
-/* expected-error {{incompatible directives 'interleave(disable)' and 'interleave_count(4)'}} */ #pragma clang loop interleave_count(4)<br>
-#pragma clang loop interleave(disable)<br>
-/* expected-error {{incompatible directives 'unroll(disable)' and 'unroll_count(4)'}} */ #pragma clang loop unroll_count(4)<br>
-#pragma clang loop unroll(disable)<br>
+#pragma clang loop vectorize_width(4)<br>
+/* expected-error {{incompatible directives 'vectorize(disable)' and 'vectorize_width(4)'}} */ #pragma clang loop vectorize(disable)<br>
+#pragma clang loop interleave_count(4)<br>
+/* expected-error {{incompatible directives 'interleave(disable)' and 'interleave_count(4)'}} */ #pragma clang loop interleave(disable)<br>
+#pragma clang loop unroll_count(4)<br>
+/* expected-error {{incompatible directives 'unroll(disable)' and 'unroll_count(4)'}} */ #pragma clang loop unroll(disable)<br>
   while (i-8 < Length) {<br>
     List[i] = i;<br>
   }<br>
<br>
-/* expected-error {{duplicate directives 'vectorize(disable)' and 'vectorize(enable)'}} */ #pragma clang loop vectorize(enable)<br>
-#pragma clang loop vectorize(disable)<br>
-/* expected-error {{duplicate directives 'interleave(disable)' and 'interleave(enable)'}} */ #pragma clang loop interleave(enable)<br>
-#pragma clang loop interleave(disable)<br>
-/* expected-error {{duplicate directives 'unroll(disable)' and 'unroll(full)'}} */ #pragma clang loop unroll(full)<br>
-#pragma clang loop unroll(disable)<br>
-/* expected-error {{duplicate directives 'distribute(disable)' and 'distribute(enable)'}} */ #pragma clang loop distribute(enable)<br>
-#pragma clang loop distribute(disable)<br>
+#pragma clang loop vectorize(enable)<br>
+/* expected-error {{duplicate directives 'vectorize(enable)' and 'vectorize(disable)'}} */ #pragma clang loop vectorize(disable)<br>
+#pragma clang loop interleave(enable)<br>
+/* expected-error {{duplicate directives 'interleave(enable)' and 'interleave(disable)'}} */ #pragma clang loop interleave(disable)<br>
+#pragma clang loop unroll(full)<br>
+/* expected-error {{duplicate directives 'unroll(full)' and 'unroll(disable)'}} */ #pragma clang loop unroll(disable)<br>
+#pragma clang loop distribute(enable)<br>
+/* expected-error {{duplicate directives 'distribute(enable)' and 'distribute(disable)'}} */ #pragma clang loop distribute(disable)<br>
   while (i-9 < Length) {<br>
     List[i] = i;<br>
   }<br>
<br>
-/* expected-error {{incompatible directives 'vectorize(disable)' and 'vectorize_width(4)'}} */ #pragma clang loop vectorize(disable)<br>
-#pragma clang loop vectorize_width(4)<br>
-/* expected-error {{incompatible directives 'interleave(disable)' and 'interleave_count(4)'}} */ #pragma clang loop interleave(disable)<br>
-#pragma clang loop interleave_count(4)<br>
-/* expected-error {{incompatible directives 'unroll(disable)' and 'unroll_count(4)'}} */ #pragma clang loop unroll(disable)<br>
-#pragma clang loop unroll_count(4)<br>
+#pragma clang loop vectorize(disable)<br>
+/* expected-error {{incompatible directives 'vectorize(disable)' and 'vectorize_width(4)'}} */ #pragma clang loop vectorize_width(4)<br>
+#pragma clang loop interleave(disable)<br>
+/* expected-error {{incompatible directives 'interleave(disable)' and 'interleave_count(4)'}} */ #pragma clang loop interleave_count(4)<br>
+#pragma clang loop unroll(disable)<br>
+/* expected-error {{incompatible directives 'unroll(disable)' and 'unroll_count(4)'}} */ #pragma clang loop unroll_count(4)<br>
   while (i-10 < Length) {<br>
     List[i] = i;<br>
   }<br>
<br>
-/* expected-error {{duplicate directives 'vectorize_width(4)' and 'vectorize_width(8)'}} */ #pragma clang loop vectorize_width(8)<br>
-#pragma clang loop vectorize_width(4)<br>
-/* expected-error {{duplicate directives 'interleave_count(4)' and 'interleave_count(8)'}} */ #pragma clang loop interleave_count(8)<br>
-#pragma clang loop interleave_count(4)<br>
-/* expected-error {{duplicate directives 'unroll_count(4)' and 'unroll_count(8)'}} */ #pragma clang loop unroll_count(8)<br>
-#pragma clang loop unroll_count(4)<br>
+#pragma clang loop vectorize_width(8)<br>
+/* expected-error {{duplicate directives 'vectorize_width(8)' and 'vectorize_width(4)'}} */ #pragma clang loop vectorize_width(4)<br>
+#pragma clang loop interleave_count(8)<br>
+/* expected-error {{duplicate directives 'interleave_count(8)' and 'interleave_count(4)'}} */ #pragma clang loop interleave_count(4)<br>
+#pragma clang loop unroll_count(8)<br>
+/* expected-error {{duplicate directives 'unroll_count(8)' and 'unroll_count(4)'}} */ #pragma clang loop unroll_count(4)<br>
   while (i-11 < Length) {<br>
     List[i] = i;<br>
   }<br>
<br>
-<br>
-/* expected-error {{incompatible directives 'unroll(full)' and 'unroll_count(4)'}} */ #pragma clang loop unroll(full)<br>
-#pragma clang loop unroll_count(4)<br>
+#pragma clang loop unroll(full)<br>
+/* expected-error {{incompatible directives 'unroll(full)' and 'unroll_count(4)'}} */ #pragma clang loop unroll_count(4)<br>
   while (i-11 < Length) {<br>
     List[i] = i;<br>
   }<br>
<br>
Modified: cfe/trunk/test/Parser/pragma-unroll.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Parser/pragma-unroll.cpp?rev=335084&r1=335083&r2=335084&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Parser/pragma-unroll.cpp?rev=335084&r1=335083&r2=335084&view=diff</a><br>
==============================================================================<br>
--- cfe/trunk/test/Parser/pragma-unroll.cpp (original)<br>
+++ cfe/trunk/test/Parser/pragma-unroll.cpp Tue Jun 19 16:46:52 2018<br>
@@ -55,56 +55,56 @@ void test(int *List, int Length) {<br>
 #pragma nounroll<br>
 /* expected-error {{expected a for, while, or do-while loop to follow '#pragma nounroll'}} */ int l = Length;<br>
<br>
-/* expected-error {{incompatible directives 'unroll(disable)' and '#pragma unroll(4)'}} */ #pragma unroll 4<br>
-#pragma clang loop unroll(disable)<br>
+#pragma unroll 4<br>
+/* expected-error {{incompatible directives 'unroll(disable)' and '#pragma unroll(4)'}} */ #pragma clang loop unroll(disable)<br>
   while (i-10 < Length) {<br>
     List[i] = i;<br>
   }<br>
<br>
-/* expected-error {{incompatible directives 'unroll(full)' and '#pragma unroll(4)'}} */ #pragma unroll(4)<br>
-#pragma clang loop unroll(full)<br>
+#pragma unroll(4)<br>
+/* expected-error {{incompatible directives 'unroll(full)' and '#pragma unroll(4)'}} */ #pragma clang loop unroll(full)<br>
   while (i-11 < Length) {<br>
     List[i] = i;<br>
   }<br>
<br>
-/* expected-error {{incompatible directives 'unroll(enable)' and '#pragma unroll(4)'}} */ #pragma unroll(4)<br>
-#pragma clang loop unroll(enable)<br>
+#pragma unroll(4)<br>
+/* expected-error {{incompatible directives 'unroll(enable)' and '#pragma unroll(4)'}} */ #pragma clang loop unroll(enable)<br>
   while (i-11 < Length) {<br>
     List[i] = i;<br>
   }<br>
<br>
-/* expected-error {{incompatible directives '#pragma unroll' and '#pragma unroll(4)'}} */ #pragma unroll(4)<br>
-#pragma unroll<br>
+#pragma unroll(4)<br>
+/* expected-error {{incompatible directives '#pragma unroll' and '#pragma unroll(4)'}} */ #pragma unroll<br>
   while (i-11 < Length) {<br>
     List[i] = i;<br>
   }<br>
<br>
-/* expected-error {{incompatible directives '#pragma nounroll' and 'unroll_count(4)'}} */ #pragma clang loop unroll_count(4)<br>
-#pragma nounroll<br>
+#pragma clang loop unroll_count(4)<br>
+/* expected-error {{incompatible directives '#pragma nounroll' and 'unroll_count(4)'}} */ #pragma nounroll<br>
   while (i-12 < Length) {<br>
     List[i] = i;<br>
   }<br>
<br>
-/* expected-error {{duplicate directives '#pragma nounroll' and '#pragma nounroll'}} */ #pragma nounroll<br>
 #pragma nounroll<br>
+/* expected-error {{duplicate directives '#pragma nounroll' and '#pragma nounroll'}} */ #pragma nounroll<br>
   while (i-13 < Length) {<br>
     List[i] = i;<br>
   }<br>
<br>
-/* expected-error {{duplicate directives '#pragma unroll' and '#pragma unroll'}} */ #pragma unroll<br>
 #pragma unroll<br>
+/* expected-error {{duplicate directives '#pragma unroll' and '#pragma unroll'}} */ #pragma unroll<br>
   while (i-14 < Length) {<br>
     List[i] = i;<br>
   }<br>
<br>
-/* expected-error {{duplicate directives 'unroll(full)' and '#pragma unroll'}} */ #pragma unroll<br>
-#pragma clang loop unroll(full)<br>
+#pragma unroll<br>
+/* expected-error {{duplicate directives '#pragma unroll' and 'unroll(full)'}} */ #pragma clang loop unroll(full)<br>
   while (i-15 < Length) {<br>
     List[i] = i;<br>
   }<br>
<br>
-/* expected-error {{duplicate directives '#pragma unroll(4)' and '#pragma unroll(4)'}} */ #pragma unroll 4<br>
-#pragma unroll(4)<br>
+#pragma unroll 4<br>
+/* expected-error {{duplicate directives '#pragma unroll(4)' and '#pragma unroll(4)'}} */ #pragma unroll(4)<br>
   while (i-16 < Length) {<br>
     List[i] = i;<br>
   }<br>
<br>
Modified: cfe/trunk/test/Sema/attr-availability-tvos.c<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Sema/attr-availability-tvos.c?rev=335084&r1=335083&r2=335084&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Sema/attr-availability-tvos.c?rev=335084&r1=335083&r2=335084&view=diff</a><br>
==============================================================================<br>
--- cfe/trunk/test/Sema/attr-availability-tvos.c (original)<br>
+++ cfe/trunk/test/Sema/attr-availability-tvos.c Tue Jun 19 16:46:52 2018<br>
@@ -27,10 +27,8 @@ void test_transcribed_availability() {<br>
   f9(0);<br>
 }<br>
<br>
-__attribute__((availability(ios,introduced=9_0,deprecated=9_0,message="" ))) // expected-note{{previous attribute is here}} \<br>
-  // expected-note{{previous attribute is here}}<br>
-__attribute__((availability(ios,introduced=7_0))) // expected-warning{{availability does not match previous declaration}} \<br>
-  // expected-warning{{availability does not match previous declaration}}<br>
+__attribute__((availability(ios,introduced=9_0,deprecated=9_0,message="" ))) // expected-warning 2{{availability does not match previous declaration}}<br>
+__attribute__((availability(ios,introduced=7_0)))                            // expected-note 2{{previous attribute is here}}<br>
 void f10(int);<br>
<br>
 // Test tvOS specific attributes.<br>
<br>
Modified: cfe/trunk/test/Sema/attr-availability.c<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Sema/attr-availability.c?rev=335084&r1=335083&r2=335084&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Sema/attr-availability.c?rev=335084&r1=335083&r2=335084&view=diff</a><br>
==============================================================================<br>
--- cfe/trunk/test/Sema/attr-availability.c (original)<br>
+++ cfe/trunk/test/Sema/attr-availability.c Tue Jun 19 16:46:52 2018<br>
@@ -64,8 +64,8 @@ enum {<br>
 void f4(int) __attribute__((availability(ios,deprecated=3.0)));<br>
 void f4(int) __attribute__((availability(ios,introduced=4.0))); // expected-warning {{feature cannot be deprecated in iOS version 3.0 before it was introduced in version 4.0; attribute ignored}}<br>
<br>
-void f5(int) __attribute__((availability(ios,deprecated=3.0),<br>
-                            availability(ios,introduced=4.0)));  // expected-warning {{feature cannot be deprecated in iOS version 3.0 before it was introduced in version 4.0; attribute ignored}}<br>
+void f5(int) __attribute__((availability(ios,deprecated=3.0),   // expected-warning {{feature cannot be deprecated in iOS version 3.0 before it was introduced in version 4.0; attribute ignored}}<br>
+                            availability(ios,introduced=4.0)));<br>
<br>
 void f6(int) __attribute__((availability(ios,deprecated=3.0))); // expected-note {{previous attribute is here}}<br>
 void f6(int) __attribute__((availability(ios,deprecated=4.0))); // expected-warning {{availability does not match previous declaration}}<br>
<br>
Modified: cfe/trunk/test/Sema/attr-coldhot.c<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Sema/attr-coldhot.c?rev=335084&r1=335083&r2=335084&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Sema/attr-coldhot.c?rev=335084&r1=335083&r2=335084&view=diff</a><br>
==============================================================================<br>
--- cfe/trunk/test/Sema/attr-coldhot.c (original)<br>
+++ cfe/trunk/test/Sema/attr-coldhot.c Tue Jun 19 16:46:52 2018<br>
@@ -6,7 +6,7 @@ int bar() __attribute__((__cold__));<br>
 int var1 __attribute__((__cold__)); // expected-warning{{'__cold__' attribute only applies to functions}}<br>
 int var2 __attribute__((__hot__)); // expected-warning{{'__hot__' attribute only applies to functions}}<br>
<br>
-int qux() __attribute__((__hot__)) __attribute__((__cold__)); // expected-error{{'__hot__' and 'cold' attributes are not compatible}} \<br>
+int qux() __attribute__((__hot__)) __attribute__((__cold__)); // expected-error{{'__cold__' and 'hot' attributes are not compatible}} \<br>
 // expected-note{{conflicting attribute is here}}<br>
-int baz() __attribute__((__cold__)) __attribute__((__hot__)); // expected-error{{'__cold__' and 'hot' attributes are not compatible}} \<br>
+int baz() __attribute__((__cold__)) __attribute__((__hot__)); // expected-error{{'__hot__' and 'cold' attributes are not compatible}} \<br>
 // expected-note{{conflicting attribute is here}}<br>
<br>
Modified: cfe/trunk/test/Sema/attr-disable-tail-calls.c<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Sema/attr-disable-tail-calls.c?rev=335084&r1=335083&r2=335084&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Sema/attr-disable-tail-calls.c?rev=335084&r1=335083&r2=335084&view=diff</a><br>
==============================================================================<br>
--- cfe/trunk/test/Sema/attr-disable-tail-calls.c (original)<br>
+++ cfe/trunk/test/Sema/attr-disable-tail-calls.c Tue Jun 19 16:46:52 2018<br>
@@ -1,10 +1,10 @@<br>
 // RUN: %clang_cc1 -fsyntax-only -verify %s<br>
<br>
-void __attribute__((disable_tail_calls,naked)) foo1(int a) { // expected-error {{'disable_tail_calls' and 'naked' attributes are not compatible}} expected-note {{conflicting attribute is here}}<br>
+void __attribute__((disable_tail_calls,naked)) foo1(int a) { // expected-error {{'naked' and 'disable_tail_calls' attributes are not compatible}} expected-note {{conflicting attribute is here}}<br>
   __asm__("");<br>
 }<br>
<br>
-void __attribute__((naked,disable_tail_calls)) foo2(int a) { // expected-error {{'naked' and 'disable_tail_calls' attributes are not compatible}} expected-note {{conflicting attribute is here}}<br>
+void __attribute__((naked,disable_tail_calls)) foo2(int a) { // expected-error {{'disable_tail_calls' and 'naked' attributes are not compatible}} expected-note {{conflicting attribute is here}}<br>
   __asm__("");<br>
 }<br>
<br>
<br>
Modified: cfe/trunk/test/Sema/attr-long-call.c<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Sema/attr-long-call.c?rev=335084&r1=335083&r2=335084&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Sema/attr-long-call.c?rev=335084&r1=335083&r2=335084&view=diff</a><br>
==============================================================================<br>
--- cfe/trunk/test/Sema/attr-long-call.c (original)<br>
+++ cfe/trunk/test/Sema/attr-long-call.c Tue Jun 19 16:46:52 2018<br>
@@ -19,8 +19,8 @@ __attribute((near)) void foo6();<br>
 __attribute((long_call, far)) void foo7();<br>
 __attribute((short_call, near)) void foo11();<br>
<br>
-__attribute((far, near)) void foo8(); // expected-error {{'far' and 'near' attributes are not compatible}} \<br>
+__attribute((far, near)) void foo8(); // expected-error {{'near' and 'far' attributes are not compatible}} \<br>
                                       // expected-note {{conflicting attribute is here}}<br>
<br>
-__attribute((short_call, long_call)) void foo12(); // expected-error {{'short_call' and 'long_call' attributes are not compatible}} \<br>
+__attribute((short_call, long_call)) void foo12(); // expected-error {{'long_call' and 'short_call' attributes are not compatible}} \<br>
                                                    // expected-note {{conflicting attribute is here}}<br>
<br>
Modified: cfe/trunk/test/Sema/attr-micromips.c<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Sema/attr-micromips.c?rev=335084&r1=335083&r2=335084&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Sema/attr-micromips.c?rev=335084&r1=335083&r2=335084&view=diff</a><br>
==============================================================================<br>
--- cfe/trunk/test/Sema/attr-micromips.c (original)<br>
+++ cfe/trunk/test/Sema/attr-micromips.c Tue Jun 19 16:46:52 2018<br>
@@ -6,9 +6,9 @@ __attribute__((micromips(1))) void foo2(<br>
 __attribute((nomicromips)) int a; // expected-error {{attribute only applies to functions}}<br>
 __attribute((micromips)) int b;   // expected-error {{attribute only applies to functions}}<br>
<br>
-__attribute__((micromips,mips16)) void foo5();  // expected-error {{'micromips' and 'mips16' attributes are not compatible}} \<br>
+__attribute__((micromips,mips16)) void foo5();  // expected-error {{'mips16' and 'micromips' attributes are not compatible}} \<br>
                                                 // expected-note {{conflicting attribute is here}}<br>
-__attribute__((mips16,micromips)) void foo6();  // expected-error {{'mips16' and 'micromips' attributes are not compatible}} \<br>
+__attribute__((mips16,micromips)) void foo6();  // expected-error {{'micromips' and 'mips16' attributes are not compatible}} \<br>
                                                 // expected-note {{conflicting attribute is here}}<br>
<br>
 __attribute((micromips)) void foo7();<br>
<br>
Modified: cfe/trunk/test/Sema/attr-notail.c<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Sema/attr-notail.c?rev=335084&r1=335083&r2=335084&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Sema/attr-notail.c?rev=335084&r1=335083&r2=335084&view=diff</a><br>
==============================================================================<br>
--- cfe/trunk/test/Sema/attr-notail.c (original)<br>
+++ cfe/trunk/test/Sema/attr-notail.c Tue Jun 19 16:46:52 2018<br>
@@ -1,8 +1,8 @@<br>
 // RUN: %clang_cc1 -fsyntax-only -verify %s<br>
<br>
-int callee0() __attribute__((not_tail_called,always_inline)); // expected-error{{'not_tail_called' and 'always_inline' attributes are not compatible}} \<br>
+int callee0() __attribute__((not_tail_called,always_inline)); // expected-error{{'always_inline' and 'not_tail_called' attributes are not compatible}} \<br>
 // expected-note{{conflicting attribute is here}}<br>
-int callee1() __attribute__((always_inline,not_tail_called)); // expected-error{{'always_inline' and 'not_tail_called' attributes are not compatible}} \<br>
+int callee1() __attribute__((always_inline,not_tail_called)); // expected-error{{'not_tail_called' and 'always_inline' attributes are not compatible}} \<br>
 // expected-note{{conflicting attribute is here}}<br>
<br>
 int foo(int a) {<br>
<br>
Modified: cfe/trunk/test/Sema/attr-ownership.c<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Sema/attr-ownership.c?rev=335084&r1=335083&r2=335084&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Sema/attr-ownership.c?rev=335084&r1=335083&r2=335084&view=diff</a><br>
==============================================================================<br>
--- cfe/trunk/test/Sema/attr-ownership.c (original)<br>
+++ cfe/trunk/test/Sema/attr-ownership.c Tue Jun 19 16:46:52 2018<br>
@@ -16,11 +16,11 @@ void *f11(float i) __attribute__((owners<br>
 void *f12(float i, int k, int f, int *j) __attribute__((ownership_returns(foo, 4)));  // expected-error {{'ownership_returns' attribute only applies to integer arguments}}<br>
<br>
 void f13(int *i, int *j) __attribute__((ownership_holds(foo, 1))) __attribute__((ownership_takes(foo, 2)));<br>
-void f14(int i, int j, int *k) __attribute__((ownership_holds(foo, 3))) __attribute__((ownership_takes(foo, 3)));  // expected-error {{'ownership_holds' and 'ownership_takes' attributes are not compatible}}<br>
+void f14(int i, int j, int *k) __attribute__((ownership_holds(foo, 3))) __attribute__((ownership_takes(foo, 3)));  // expected-error {{'ownership_takes' and 'ownership_holds' attributes are not compatible}}<br>
<br>
 void f15(int, int)<br>
-  __attribute__((ownership_returns(foo, 1)))  // expected-note {{declared with index 1 here}}<br>
-  __attribute__((ownership_returns(foo, 2))); // expected-error {{'ownership_returns' attribute index does not match; here it is 2}}<br>
+  __attribute__((ownership_returns(foo, 1)))  // expected-error {{'ownership_returns' attribute index does not match; here it is 1}}<br>
+  __attribute__((ownership_returns(foo, 2))); // expected-note {{declared with index 2 here}}<br>
 void f16(int *i, int *j) __attribute__((ownership_holds(foo, 1))) __attribute__((ownership_holds(foo, 1))); // OK, same index<br>
 void f17(void*) __attribute__((ownership_takes(__, 1)));<br>
 void f18() __attribute__((ownership_takes(foo, 1)));  // expected-warning {{'ownership_takes' attribute only applies to non-K&R-style functions}}<br>
<br>
Modified: cfe/trunk/test/Sema/attr-ownership.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Sema/attr-ownership.cpp?rev=335084&r1=335083&r2=335084&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Sema/attr-ownership.cpp?rev=335084&r1=335083&r2=335084&view=diff</a><br>
==============================================================================<br>
--- cfe/trunk/test/Sema/attr-ownership.cpp (original)<br>
+++ cfe/trunk/test/Sema/attr-ownership.cpp Tue Jun 19 16:46:52 2018<br>
@@ -2,6 +2,6 @@<br>
<br>
 class C {<br>
   void f(int, int)<br>
-      __attribute__((ownership_returns(foo, 2)))  // expected-note {{declared with index 2 here}}<br>
-      __attribute__((ownership_returns(foo, 3))); // expected-error {{'ownership_returns' attribute index does not match; here it is 3}}<br>
+      __attribute__((ownership_returns(foo, 2)))  // expected-error {{'ownership_returns' attribute index does not match; here it is 2}}<br>
+      __attribute__((ownership_returns(foo, 3))); // expected-note {{declared with index 3 here}}<br>
 };<br>
<br>
Modified: cfe/trunk/test/Sema/attr-print.c<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Sema/attr-print.c?rev=335084&r1=335083&r2=335084&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Sema/attr-print.c?rev=335084&r1=335083&r2=335084&view=diff</a><br>
==============================================================================<br>
--- cfe/trunk/test/Sema/attr-print.c (original)<br>
+++ cfe/trunk/test/Sema/attr-print.c Tue Jun 19 16:46:52 2018<br>
@@ -24,13 +24,13 @@ int * __ptr64 p64;<br>
<br>
 // TODO: the Type Printer has no way to specify the order to print attributes<br>
 // in, and so it currently always prints them in reverse order. Fix this.<br>
-// CHECK: int * __ptr32 __uptr p32_2;<br>
+// CHECK: int * __uptr __ptr32 p32_2;<br>
 int * __uptr __ptr32 p32_2;<br>
<br>
-// CHECK: int * __ptr64 __sptr p64_2;<br>
+// CHECK: int * __sptr __ptr64 p64_2;<br>
 int * __sptr __ptr64 p64_2;<br>
<br>
-// CHECK: int * __ptr32 __uptr p32_3;<br>
+// CHECK: int * __uptr __ptr32 p32_3;<br>
 int * __uptr __ptr32 p32_3;<br>
<br>
 // CHECK: int * __sptr * __ptr32 ppsp32;<br>
<br>
Modified: cfe/trunk/test/Sema/attr-swiftcall.c<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Sema/attr-swiftcall.c?rev=335084&r1=335083&r2=335084&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Sema/attr-swiftcall.c?rev=335084&r1=335083&r2=335084&view=diff</a><br>
==============================================================================<br>
--- cfe/trunk/test/Sema/attr-swiftcall.c (original)<br>
+++ cfe/trunk/test/Sema/attr-swiftcall.c Tue Jun 19 16:46:52 2018<br>
@@ -9,7 +9,7 @@<br>
 int notAFunction SWIFTCALL; // expected-warning {{'swiftcall' only applies to function types; type here is 'int'}}<br>
 void variadic(int x, ...) SWIFTCALL; // expected-error {{variadic function cannot use swiftcall calling convention}}<br>
 void unprototyped() SWIFTCALL; // expected-error {{function with no prototype cannot use the swiftcall calling convention}}<br>
-void multiple_ccs(int x) SWIFTCALL __attribute__((vectorcall)); // expected-error {{vectorcall and swiftcall attributes are not compatible}}<br>
+void multiple_ccs(int x) SWIFTCALL __attribute__((vectorcall)); // expected-error {{swiftcall and vectorcall attributes are not compatible}}<br>
 void (*functionPointer)(void) SWIFTCALL;<br>
<br>
 void indirect_result_nonswift(INDIRECT_RESULT void *out); // expected-error {{'swift_indirect_result' parameter can only be used with swiftcall calling convention}}<br>
<br>
Modified: cfe/trunk/test/Sema/attr-target-mv.c<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Sema/attr-target-mv.c?rev=335084&r1=335083&r2=335084&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Sema/attr-target-mv.c?rev=335084&r1=335083&r2=335084&view=diff</a><br>
==============================================================================<br>
--- cfe/trunk/test/Sema/attr-target-mv.c (original)<br>
+++ cfe/trunk/test/Sema/attr-target-mv.c Tue Jun 19 16:46:52 2018<br>
@@ -95,7 +95,7 @@ void __attribute__((target("arch=sandybr<br>
 void __attribute__((used,target("arch=ivybridge")))  addtl_attrs4(void);<br>
<br>
 int __attribute__((target("sse4.2"))) diff_cc(void);<br>
-// expected-error@+1 {{multiversioned function declaration has a different calling convention}}<br>
+// expected-error@+1 {{attribute 'target' multiversioning cannot be combined with other attributes}}<br>
 __vectorcall int __attribute__((target("arch=sandybridge")))  diff_cc(void);<br>
<br>
 int __attribute__((target("sse4.2"))) diff_ret(void);<br>
<br>
Modified: cfe/trunk/test/Sema/attr-visibility.c<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Sema/attr-visibility.c?rev=335084&r1=335083&r2=335084&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Sema/attr-visibility.c?rev=335084&r1=335083&r2=335084&view=diff</a><br>
==============================================================================<br>
--- cfe/trunk/test/Sema/attr-visibility.c (original)<br>
+++ cfe/trunk/test/Sema/attr-visibility.c Tue Jun 19 16:46:52 2018<br>
@@ -15,8 +15,8 @@ struct test5;<br>
 struct __attribute__((visibility("hidden"))) test5; // expected-note {{previous attribute is here}}<br>
 struct __attribute__((visibility("default"))) test5; // expected-error {{visibility does not match previous declaration}}<br>
<br>
-void test6() __attribute__((visibility("hidden"), // expected-note {{previous attribute is here}}<br>
-                            visibility("default"))); // expected-error {{visibility does not match previous declaration}}<br>
+void test6() __attribute__((visibility("default"), // expected-error {{visibility does not match previous declaration}}<br>
+                            visibility("hidden"))); // expected-note {{previous attribute is here}}<br>
<br>
 extern int test7 __attribute__((visibility("default"))); // expected-note {{previous attribute is here}}<br>
 extern int test7 __attribute__((visibility("hidden"))); // expected-error {{visibility does not match previous declaration}}<br>
<br>
Modified: cfe/trunk/test/Sema/internal_linkage.c<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Sema/internal_linkage.c?rev=335084&r1=335083&r2=335084&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Sema/internal_linkage.c?rev=335084&r1=335083&r2=335084&view=diff</a><br>
==============================================================================<br>
--- cfe/trunk/test/Sema/internal_linkage.c (original)<br>
+++ cfe/trunk/test/Sema/internal_linkage.c Tue Jun 19 16:46:52 2018<br>
@@ -1,9 +1,9 @@<br>
 // RUN: %clang_cc1 -fsyntax-only -verify -fdouble-square-bracket-attributes %s<br>
<br>
 int var __attribute__((internal_linkage));<br>
-int var2 __attribute__((internal_linkage,common)); // expected-error{{'internal_linkage' and 'common' attributes are not compatible}} \<br>
+int var2 __attribute__((internal_linkage,common)); // expected-error{{'common' and 'internal_linkage' attributes are not compatible}} \<br>
                                                    // expected-note{{conflicting attribute is here}}<br>
-int var3 __attribute__((common,internal_linkage)); // expected-error{{'common' and 'internal_linkage' attributes are not compatible}} \<br>
+int var3 __attribute__((common,internal_linkage)); // expected-error{{'internal_linkage' and 'common' attributes are not compatible}} \<br>
                                                    // expected-note{{conflicting attribute is here}}<br>
<br>
 int var4 __attribute__((common)); // expected-error{{'common' and 'internal_linkage' attributes are not compatible}} \<br>
<br>
Modified: cfe/trunk/test/Sema/mips-interrupt-attr.c<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Sema/mips-interrupt-attr.c?rev=335084&r1=335083&r2=335084&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Sema/mips-interrupt-attr.c?rev=335084&r1=335083&r2=335084&view=diff</a><br>
==============================================================================<br>
--- cfe/trunk/test/Sema/mips-interrupt-attr.c (original)<br>
+++ cfe/trunk/test/Sema/mips-interrupt-attr.c Tue Jun 19 16:46:52 2018<br>
@@ -19,11 +19,11 @@ __attribute__((interrupt(""))) void food<br>
<br>
 __attribute__((interrupt)) int foob() {return 0;} // expected-warning {{MIPS 'interrupt' attribute only applies to functions that have a 'void' return type}}<br>
 __attribute__((interrupt())) void fooc(int a) {} // expected-warning {{MIPS 'interrupt' attribute only applies to functions that have no parameters}}<br>
-__attribute__((interrupt,mips16)) void fooe() {} // expected-error {{'interrupt' and 'mips16' attributes are not compatible}} \<br>
+__attribute__((interrupt,mips16)) void fooe() {} // expected-error {{'mips16' and 'interrupt' attributes are not compatible}} \<br>
                                                  // expected-note {{conflicting attribute is here}}<br>
-__attribute__((mips16,interrupt)) void foof() {} // expected-error {{'mips16' and 'interrupt' attributes are not compatible}} \<br>
+__attribute__((mips16,interrupt)) void foof() {} // expected-error {{'interrupt' and 'mips16' attributes are not compatible}} \<br>
                                                  // expected-note {{conflicting attribute is here}}<br>
-__attribute__((interrupt)) __attribute__ ((mips16)) void foo10() {} // expected-error {{'interrupt' and 'mips16' attributes are not compatible}} \<br>
+__attribute__((interrupt)) __attribute__ ((mips16)) void foo10() {} // expected-error {{'mips16' and 'interrupt' attributes are not compatible}} \<br>
                                                                     // expected-note {{conflicting attribute is here}}<br>
-__attribute__((mips16)) __attribute ((interrupt)) void foo11() {} // expected-error {{'mips16' and 'interrupt' attributes are not compatible}} \<br>
+__attribute__((mips16)) __attribute ((interrupt)) void foo11() {} // expected-error {{'interrupt' and 'mips16' attributes are not compatible}} \<br>
                                                                   // expected-note {{conflicting attribute is here}}<br>
<br>
Modified: cfe/trunk/test/Sema/ms_abi-sysv_abi.c<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Sema/ms_abi-sysv_abi.c?rev=335084&r1=335083&r2=335084&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Sema/ms_abi-sysv_abi.c?rev=335084&r1=335083&r2=335084&view=diff</a><br>
==============================================================================<br>
--- cfe/trunk/test/Sema/ms_abi-sysv_abi.c (original)<br>
+++ cfe/trunk/test/Sema/ms_abi-sysv_abi.c Tue Jun 19 16:46:52 2018<br>
@@ -6,9 +6,9 @@ int __attribute__((sysv_abi)) var2; // e<br>
<br>
 // Different CC qualifiers are not compatible<br>
 // FIXME: Should say 'sysv_abi' instead of 'cdecl'<br>
-void __attribute__((ms_abi, sysv_abi)) foo3(void); // expected-error{{cdecl and ms_abi attributes are not compatible}}<br>
+void __attribute__((ms_abi, sysv_abi)) foo3(void); // expected-error{{ms_abi and cdecl attributes are not compatible}}<br>
 void __attribute__((ms_abi)) foo4(); // expected-note{{previous declaration is here}}<br>
 void __attribute__((sysv_abi)) foo4(void); // expected-error{{function declared 'cdecl' here was previously declared 'ms_abi'}}<br>
<br>
-void bar(int i, int j) __attribute__((ms_abi, cdecl)); // expected-error{{cdecl and ms_abi attributes are not compatible}}<br>
+void bar(int i, int j) __attribute__((ms_abi, cdecl)); // expected-error{{ms_abi and cdecl attributes are not compatible}}<br>
 void bar2(int i, int j) __attribute__((sysv_abi, cdecl)); // no-error<br>
<br>
Modified: cfe/trunk/test/Sema/nullability.c<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Sema/nullability.c?rev=335084&r1=335083&r2=335084&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Sema/nullability.c?rev=335084&r1=335083&r2=335084&view=diff</a><br>
==============================================================================<br>
--- cfe/trunk/test/Sema/nullability.c (original)<br>
+++ cfe/trunk/test/Sema/nullability.c Tue Jun 19 16:46:52 2018<br>
@@ -20,8 +20,8 @@ typedef int * _Null_unspecified null_uns<br>
 typedef int * _Nonnull _Nonnull redundant_1; // expected-warning{{duplicate nullability specifier '_Nonnull'}}<br>
<br>
 // Conflicting nullability type specifiers.<br>
-typedef int * _Nonnull _Nullable conflicting_1; // expected-error{{nullability specifier '_Nonnull' conflicts with existing specifier '_Nullable'}}<br>
-typedef int * _Null_unspecified _Nonnull conflicting_2; // expected-error{{nullability specifier '_Null_unspecified' conflicts with existing specifier '_Nonnull'}}<br>
+typedef int *_Nonnull _Nullable conflicting_1; // expected-error{{nullability specifier '_Nullable' conflicts with existing specifier '_Nonnull'}}<br>
+typedef int *_Null_unspecified _Nonnull conflicting_2; // expected-error{{nullability specifier '_Nonnull' conflicts with existing specifier '_Null_unspecified'}}<br>
<br>
 // Redundant nullability specifiers via a typedef are okay.<br>
 typedef nonnull_int_ptr _Nonnull redundant_okay_1;<br>
<br>
Modified: cfe/trunk/test/Sema/stdcall-fastcall.c<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Sema/stdcall-fastcall.c?rev=335084&r1=335083&r2=335084&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Sema/stdcall-fastcall.c?rev=335084&r1=335083&r2=335084&view=diff</a><br>
==============================================================================<br>
--- cfe/trunk/test/Sema/stdcall-fastcall.c (original)<br>
+++ cfe/trunk/test/Sema/stdcall-fastcall.c Tue Jun 19 16:46:52 2018<br>
@@ -5,7 +5,7 @@ int __attribute__((stdcall)) var1; // ex<br>
 int __attribute__((fastcall)) var2; // expected-warning{{'fastcall' only applies to function types; type here is 'int'}}<br>
<br>
 // Different CC qualifiers are not compatible<br>
-void __attribute__((stdcall, fastcall)) foo3(void); // expected-error{{fastcall and stdcall attributes are not compatible}}<br>
+void __attribute__((stdcall, fastcall)) foo3(void); // expected-error{{stdcall and fastcall attributes are not compatible}}<br>
 void __attribute__((stdcall)) foo4(); // expected-note{{previous declaration is here}} expected-warning{{function with no prototype cannot use the stdcall calling convention}}<br>
 void __attribute__((fastcall)) foo4(void); // expected-error{{function declared 'fastcall' here was previously declared 'stdcall'}}<br>
<br>
<br>
Modified: cfe/trunk/test/SemaCXX/attr-print.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaCXX/attr-print.cpp?rev=335084&r1=335083&r2=335084&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaCXX/attr-print.cpp?rev=335084&r1=335083&r2=335084&view=diff</a><br>
==============================================================================<br>
--- cfe/trunk/test/SemaCXX/attr-print.cpp (original)<br>
+++ cfe/trunk/test/SemaCXX/attr-print.cpp Tue Jun 19 16:46:52 2018<br>
@@ -14,7 +14,7 @@ void foo() __attribute__((const));<br>
 void bar() __attribute__((__const));<br>
<br>
 // FIXME: Print this with correct format and order.<br>
-// CHECK: void foo1() __attribute__((pure)) __attribute__((noinline));<br>
+// CHECK: void foo1() __attribute__((noinline)) __attribute__((pure));<br>
 void foo1() __attribute__((noinline, pure));<br>
<br>
 // CHECK: typedef int Small1 __attribute__((mode(byte)));<br>
<br>
Modified: cfe/trunk/test/SemaCXX/attr-swiftcall.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaCXX/attr-swiftcall.cpp?rev=335084&r1=335083&r2=335084&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaCXX/attr-swiftcall.cpp?rev=335084&r1=335083&r2=335084&view=diff</a><br>
==============================================================================<br>
--- cfe/trunk/test/SemaCXX/attr-swiftcall.cpp (original)<br>
+++ cfe/trunk/test/SemaCXX/attr-swiftcall.cpp Tue Jun 19 16:46:52 2018<br>
@@ -7,7 +7,7 @@<br>
<br>
 int notAFunction SWIFTCALL; // expected-warning {{'swiftcall' only applies to function types; type here is 'int'}}<br>
 void variadic(int x, ...) SWIFTCALL; // expected-error {{variadic function cannot use swiftcall calling convention}}<br>
-void multiple_ccs(int x) SWIFTCALL __attribute__((vectorcall)); // expected-error {{vectorcall and swiftcall attributes are not compatible}}<br>
+void multiple_ccs(int x) SWIFTCALL __attribute__((vectorcall)); // expected-error {{swiftcall and vectorcall attributes are not compatible}}<br>
 void (*functionPointer)(void) SWIFTCALL;<br>
<br>
 void indirect_result_nonswift(INDIRECT_RESULT void *out); // expected-error {{'swift_indirect_result' parameter can only be used with swiftcall calling convention}}<br>
<br>
Modified: cfe/trunk/test/SemaCXX/decl-microsoft-call-conv.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaCXX/decl-microsoft-call-conv.cpp?rev=335084&r1=335083&r2=335084&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaCXX/decl-microsoft-call-conv.cpp?rev=335084&r1=335083&r2=335084&view=diff</a><br>
==============================================================================<br>
--- cfe/trunk/test/SemaCXX/decl-microsoft-call-conv.cpp (original)<br>
+++ cfe/trunk/test/SemaCXX/decl-microsoft-call-conv.cpp Tue Jun 19 16:46:52 2018<br>
@@ -161,7 +161,7 @@ void multi_attribute(int x) { __builtin_<br>
 // expected-error@+3 {{vectorcall and cdecl attributes are not compatible}}<br>
 // expected-error@+2 {{stdcall and cdecl attributes are not compatible}}<br>
 // expected-error@+1 {{fastcall and cdecl attributes are not compatible}}<br>
-void __cdecl __cdecl __stdcall __cdecl __fastcall __vectorcall multi_cc(int x);<br>
+void __vectorcall __fastcall __cdecl __stdcall __cdecl __cdecl multi_cc(int x);<br>
<br>
 template <typename T> void __stdcall StdcallTemplate(T) {}<br>
 template <> void StdcallTemplate<int>(int) {}<br>
<br>
Modified: cfe/trunk/test/SemaCXX/ms-uuid.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaCXX/ms-uuid.cpp?rev=335084&r1=335083&r2=335084&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaCXX/ms-uuid.cpp?rev=335084&r1=335083&r2=335084&view=diff</a><br>
==============================================================================<br>
--- cfe/trunk/test/SemaCXX/ms-uuid.cpp (original)<br>
+++ cfe/trunk/test/SemaCXX/ms-uuid.cpp Tue Jun 19 16:46:52 2018<br>
@@ -62,14 +62,14 @@ class __declspec(uuid("110000A0-0000-000<br>
 [uuid("220000A0-0000-0000-C000-000000000049")] class C4 {};<br>
<br>
 // Both cl and clang-cl error out on this:<br>
-// expected-note@+1 {{previous uuid specified here}}<br>
-class __declspec(uuid("000000A0-0000-0000-C000-000000000049"))<br>
 // expected-error@+1 {{uuid does not match previous declaration}}<br>
+class __declspec(uuid("000000A0-0000-0000-C000-000000000049"))<br>
+// expected-note@+1 {{previous uuid specified here}}<br>
       __declspec(uuid("110000A0-0000-0000-C000-000000000049")) C5;<br>
<br>
-// expected-note@+1 {{previous uuid specified here}}<br>
-[uuid("000000A0-0000-0000-C000-000000000049"),<br>
 // expected-error@+1 {{uuid does not match previous declaration}}<br>
+[uuid("000000A0-0000-0000-C000-000000000049"),<br>
+// expected-note@+1 {{previous uuid specified here}}<br>
  uuid("110000A0-0000-0000-C000-000000000049")] class C6;<br>
<br>
 // cl doesn't diagnose having one uuid each as []-style attributes and as<br>
<br>
Modified: cfe/trunk/test/SemaOpenCL/<a href="http://address-spaces.cl" rel="noreferrer" target="_blank">address-spaces.cl</a><br>
URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaOpenCL/address-spaces.cl?rev=335084&r1=335083&r2=335084&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaOpenCL/address-spaces.cl?rev=335084&r1=335083&r2=335084&view=diff</a><br>
==============================================================================<br>
--- cfe/trunk/test/SemaOpenCL/<a href="http://address-spaces.cl" rel="noreferrer" target="_blank">address-spaces.cl</a> (original)<br>
+++ cfe/trunk/test/SemaOpenCL/<a href="http://address-spaces.cl" rel="noreferrer" target="_blank">address-spaces.cl</a> Tue Jun 19 16:46:52 2018<br>
@@ -58,8 +58,8 @@ __generic int func_return_generic(void);<br>
<br>
 void func_multiple_addr(void) {<br>
   typedef __private int private_int_t;<br>
-  __local __private int var1;   // expected-error {{multiple address spaces specified for type}}<br>
-  __local __private int *var2;  // expected-error {{multiple address spaces specified for type}}<br>
+  __private __local int var1;   // expected-error {{multiple address spaces specified for type}}<br>
+  __private __local int *var2;  // expected-error {{multiple address spaces specified for type}}<br>
   __local private_int_t var3;   // expected-error {{multiple address spaces specified for type}}<br>
   __local private_int_t *var4;  // expected-error {{multiple address spaces specified for type}}<br>
 }<br>
<br>
Modified: cfe/trunk/test/SemaTemplate/attributes.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaTemplate/attributes.cpp?rev=335084&r1=335083&r2=335084&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaTemplate/attributes.cpp?rev=335084&r1=335083&r2=335084&view=diff</a><br>
==============================================================================<br>
--- cfe/trunk/test/SemaTemplate/attributes.cpp (original)<br>
+++ cfe/trunk/test/SemaTemplate/attributes.cpp Tue Jun 19 16:46:52 2018<br>
@@ -55,11 +55,11 @@ namespace PR9049 {<br>
 }<br>
<br>
 // CHECK: FunctionTemplateDecl {{.*}} HasAnnotations<br>
-// CHECK:   AnnotateAttr {{.*}} "ANNOTATE_BAR"<br>
 // CHECK:   AnnotateAttr {{.*}} "ANNOTATE_FOO"<br>
+// CHECK:   AnnotateAttr {{.*}} "ANNOTATE_BAR"<br>
 // CHECK: FunctionDecl {{.*}} HasAnnotations<br>
 // CHECK:   TemplateArgument type 'int'<br>
-// CHECK:   AnnotateAttr {{.*}} "ANNOTATE_BAR"<br>
 // CHECK:   AnnotateAttr {{.*}} "ANNOTATE_FOO"<br>
+// CHECK:   AnnotateAttr {{.*}} "ANNOTATE_BAR"<br>
 template<typename T> [[clang::annotate("ANNOTATE_FOO"), clang::annotate("ANNOTATE_BAR")]] void HasAnnotations();<br>
 void UseAnnotations() { HasAnnotations<int>(); }<br>
<br>
<br>
_______________________________________________<br>
cfe-commits mailing list<br>
<a href="mailto:cfe-commits@lists.llvm.org" target="_blank">cfe-commits@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits</a><br>
</blockquote></div>