llvm-project/clang/lib/AST/AttrDocTable.cpp
Alexandre Ganea ee15e2bd32 [clang] Silence warning when building with MSVC targetting x86
This fixes:
```
[3786/6996] Building CXX object tools\clang\lib\AST\CMakeFiles\obj.clangAST.dir\AttrDocTable.cpp.obj
C:\git\llvm-project\clang\lib\AST\AttrDocTable.cpp(24): warning C4018: '<': signed/unsigned mismatch
```
2024-01-25 09:34:17 -05:00

28 lines
868 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 < (int)std::size(AttrDoc))
return AttrDoc[K];
return "";
}