lib/ClangImporter/ImportDecl.cpp
/// Add an AvailableAttr to the declaration for the given
/// version range.
Add an AvailableAttr to the declaration for the given
version range.
Add an AvailableAttr to the declaration for the given version range .
static void applyAvailableAttribute(Decl *decl, VersionRange &range,
                                    ASTContext &C) {
  if (!range.hasLowerEndpoint())
    return;
  clang::VersionTuple noVersion;
  auto AvAttr = new (C) AvailableAttr(SourceLoc(), SourceRange(),
                                      targetPlatform(C.LangOpts),
                                      StringRef(),
                                      StringRef(),
                                      range.getLowerEndpoint(),
                                      noVersion,
                                      noVersion,
                                      UnconditionalAvailabilityKind::None,
                                      false);
  decl->getAttrs().add(AvAttr);
}
static void applyAvailableAttribute ( Decl * decl , VersionRange & range , ASTContext & C ) { if ( ! range . hasLowerEndpoint ( ) ) return ; clang :: VersionTuple noVersion ; auto AvAttr = new ( C ) AvailableAttr ( SourceLoc ( ) , SourceRange ( ) , targetPlatform ( C . LangOpts ) , StringRef ( ) , StringRef ( ) , range . getLowerEndpoint ( ) , noVersion , noVersion , UnconditionalAvailabilityKind :: None , false ) ; decl -> getAttrs ( ) . add ( AvAttr ) ; }
Add an AvailableAttr to the declaration for the given
version range.
Add an AvailableAttr to the declaration for the given version range .
// If the range is "all", this is the same as not having an available // attribute. /*message=*/ /*rename=*/ /*deprecated=*/ /*obsoleted=*/ /*implicit=*/