aaron.ballman added a subscriber: aaron.ballman. aaron.ballman added a comment.
I'd like to see some Sema tests for sanity checking; like applying __unaligned to a non-pointer type, to a declaration, when -fno-ms-extensions is enabled, etc. ================ Comment at: include/clang/Basic/Attr.td:2080 @@ -2079,2 +2079,3 @@ let Spellings = [Keyword<"__unaligned">]; + let Documentation = [UnalignedDocs]; } ---------------- This is possibly missing `let LangOpts = [MicrosoftExt];` ================ Comment at: include/clang/Basic/AttrDocs.td:1964 @@ +1963,3 @@ + let Content = [{ +The ``__unaligned`` modifier declares a pointer with unaligned address. +It is available under the ``-fms-extensions`` flag for MSVC compatibility. ---------------- "an" unaligned address. ================ Comment at: lib/Sema/SemaType.cpp:5555 @@ -5552,1 +5554,3 @@ + // anything, so this is an exception. + if (!isa<PointerType>(Desugared) && (Kind != AttributeList::AT_Unaligned)) { if (Type->isMemberPointerType()) ---------------- This appears to be untested, but really should have a test case to ensure we don't regress later. http://reviews.llvm.org/D18596 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits