majnemer added inline comments.

================
Comment at: lib/AST/MicrosoftMangle.cpp:1446-1451
@@ -1445,5 +1445,8 @@
     Out << 'E';
 
+  if (!PointeeType.isNull() && PointeeType.getLocalQualifiers().hasUnaligned())
+    Out << 'F';
+
   if (HasRestrict)
     Out << 'I';
 }
----------------
Have you tested `__restrict` with `__unaligned` on MSVC?  I don't see a test 
for it here.

================
Comment at: lib/AST/MicrosoftMangle.cpp:1583-1585
@@ -1579,3 +1582,5 @@
   case QMM_Result:
+    // Presence of __unaligned qualifier shouldn't affect mangling here.
+    Quals.removeUnaligned();
     if ((!IsPointer && Quals) || isa<TagType>(T)) {
       Out << '?';
----------------
It would be good to see what MSVC does with:

```
template <typename T>
T f(T t) { return t; }
```

Where `T` is instantiated with `int *` and `int __unaligned *`.

================
Comment at: lib/Sema/SemaType.cpp:1787
@@ -1787,1 +1786,3 @@
+  // TQ_unaligned;
+  unsigned CVR = CVRAU & ~DeclSpec::TQ_atomic & ~DeclSpec::TQ_unaligned;
 
----------------
This would probably be easier to read if written as:
  unsigned CVR = CVRAU & ~(DeclSpec::TQ_atomic | DeclSpec::TQ_unaligned);


http://reviews.llvm.org/D19654



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to