Path: blob/main/contrib/llvm-project/clang/lib/AST/AttrDocTable.cpp
35260 views
//===--- AttrDocTable.cpp - implements Attr::getDocumentation() -*- C++ -*-===//1//2// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.3// See https://llvm.org/LICENSE.txt for license information.4// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception5//6//===----------------------------------------------------------------------===//7//8// This file contains out-of-line methods for Attr classes.9//10//===----------------------------------------------------------------------===//1112#include "clang/AST/Attr.h"13#include "llvm/ADT/StringRef.h"1415#include "AttrDocTable.inc"1617static const llvm::StringRef AttrDoc[] = {18#define ATTR(NAME) AttrDoc_##NAME,19#include "clang/Basic/AttrList.inc"20};2122llvm::StringRef clang::Attr::getDocumentation(clang::attr::Kind K) {23if (K < (int)std::size(AttrDoc))24return AttrDoc[K];25return "";26}272829