llvm-project/clang/lib/AST/AttrDocTable.cpp
serge-sans-paille ef82063207 Rename llvm::array_lengthof into llvm::size to match std::size from C++17
As a conquence move llvm::array_lengthof from STLExtras.h to
STLForwardCompat.h (which is included by STLExtras.h so no build
breakage expected).
2022-01-26 16:17:45 +01:00

28 lines
863 B
C++

//===--- AttrDocTable.cpp - implements Attr::getDocumentation() -*- C++ -*-===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
//
// This file contains out-of-line methods for Attr classes.
//
//===----------------------------------------------------------------------===//
#include "clang/AST/Attr.h"
#include "llvm/ADT/StringRef.h"
#include "AttrDocTable.inc"
static const llvm::StringRef AttrDoc[] = {
#define ATTR(NAME) AttrDoc_##NAME,
#include "clang/Basic/AttrList.inc"
};
llvm::StringRef clang::Attr::getDocumentation(clang::attr::Kind K) {
if(K < llvm::size(AttrDoc))
return AttrDoc[K];
return "";
}