[PATCH] D65589: [clang] Fix mismatched args constructing AddressSpaceAttr.

Anton Bikineev via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Aug 1 10:22:20 PDT 2019


AntonBikineev created this revision.
AntonBikineev added reviewers: rsmith, klimek.
AntonBikineev added a project: clang.

Interestingly enough, but this wasn't caught in tests. I wonder if it's possible to write a test case for it.


Repository:
  rC Clang

https://reviews.llvm.org/D65589

Files:
  clang/lib/Sema/SemaType.cpp


Index: clang/lib/Sema/SemaType.cpp
===================================================================
--- clang/lib/Sema/SemaType.cpp
+++ clang/lib/Sema/SemaType.cpp
@@ -5978,9 +5978,9 @@
     }
 
     ASTContext &Ctx = S.Context;
-    auto *ASAttr = ::new (Ctx) AddressSpaceAttr(
-        Attr.getRange(), Ctx, Attr.getAttributeSpellingListIndex(),
-        static_cast<unsigned>(ASIdx));
+    auto *ASAttr = ::new (Ctx)
+        AddressSpaceAttr(Attr.getRange(), Ctx, static_cast<unsigned>(ASIdx),
+                         Attr.getAttributeSpellingListIndex());
 
     // If the expression is not value dependent (not templated), then we can
     // apply the address space qualifiers just to the equivalent type.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D65589.212846.patch
Type: text/x-patch
Size: 718 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20190801/b4be6079/attachment.bin>


More information about the cfe-commits mailing list