AttrDocTable.cpp 863 B

123456789101112131415161718192021222324252627
  1. //===--- AttrDocTable.cpp - implements Attr::getDocumentation() -*- C++ -*-===//
  2. //
  3. // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
  4. // See https://llvm.org/LICENSE.txt for license information.
  5. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
  6. //
  7. //===----------------------------------------------------------------------===//
  8. //
  9. // This file contains out-of-line methods for Attr classes.
  10. //
  11. //===----------------------------------------------------------------------===//
  12. #include "clang/AST/Attr.h"
  13. #include "llvm/ADT/StringRef.h"
  14. #include "AttrDocTable.inc"
  15. static const llvm::StringRef AttrDoc[] = {
  16. #define ATTR(NAME) AttrDoc_##NAME,
  17. #include "clang/Basic/AttrList.inc"
  18. };
  19. llvm::StringRef clang::Attr::getDocumentation(clang::attr::Kind K) {
  20. if (K < std::size(AttrDoc))
  21. return AttrDoc[K];
  22. return "";
  23. }