]> granicus.if.org Git - clang/commitdiff
Print strict in Availability attribute when it is on.
authorManman Ren <manman.ren@gmail.com>
Thu, 10 Mar 2016 23:54:12 +0000 (23:54 +0000)
committerManman Ren <manman.ren@gmail.com>
Thu, 10 Mar 2016 23:54:12 +0000 (23:54 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@263172 91177308-0d34-0410-b5e6-96231b3b80d8

test/Sema/attr-print.c
utils/TableGen/ClangAttrEmitter.cpp

index b3bdfd72e6457f2475fe07720051beec4c66a4d9..96f1359ef9c7e8187a79241b4972ee70fd0b8978 100644 (file)
@@ -32,3 +32,6 @@ int * __uptr __ptr32 p32_3;
 
 // CHECK: int * __sptr * __ptr32 ppsp32;
 int * __sptr * __ptr32 ppsp32;
+
+// CHECK: __attribute__((availability(macosx, strict, introduced=10.6)));
+void f6(int) __attribute__((availability(macosx,strict,introduced=10.6)));
index 57c7cb3ea87a22352d2d9ae5d5da9f0156c22c30..2b0baeeb05a1f1c306e9f41d1a34f3e9b237678e 100644 (file)
@@ -1103,6 +1103,7 @@ createArgument(const Record &Arg, StringRef Attr,
 
 static void writeAvailabilityValue(raw_ostream &OS) {
   OS << "\" << getPlatform()->getName();\n"
+     << "  if (getStrict()) OS << \", strict\";\n"
      << "  if (!getIntroduced().empty()) OS << \", introduced=\" << getIntroduced();\n"
      << "  if (!getDeprecated().empty()) OS << \", deprecated=\" << getDeprecated();\n"
      << "  if (!getObsoleted().empty()) OS << \", obsoleted=\" << getObsoleted();\n"