aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/libs/clang16/lib/AST/AttrDocTable.cpp
blob: df7e3d63a6c355ac519895f9198522b391eb0a09 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
//===--- 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 < std::size(AttrDoc))
    return AttrDoc[K];
  return "";
}