From 42e09eb022da6f9bef61c36b35341ddbe728dced Mon Sep 17 00:00:00 2001 From: Manman Ren Date: Thu, 10 Mar 2016 23:54:12 +0000 Subject: [PATCH] Print strict in Availability attribute when it is on. llvm-svn: 263172 --- clang/test/Sema/attr-print.c | 3 +++ clang/utils/TableGen/ClangAttrEmitter.cpp | 1 + 2 files changed, 4 insertions(+) diff --git a/clang/test/Sema/attr-print.c b/clang/test/Sema/attr-print.c index b3bdfd72e645..96f1359ef9c7 100644 --- a/clang/test/Sema/attr-print.c +++ b/clang/test/Sema/attr-print.c @@ -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))); diff --git a/clang/utils/TableGen/ClangAttrEmitter.cpp b/clang/utils/TableGen/ClangAttrEmitter.cpp index 57c7cb3ea87a..2b0baeeb05a1 100644 --- a/clang/utils/TableGen/ClangAttrEmitter.cpp +++ b/clang/utils/TableGen/ClangAttrEmitter.cpp @@ -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"