Path: blob/main/contrib/llvm-project/clang/lib/Basic/CLWarnings.cpp
35234 views
//===--- CLWarnings.h - Maps some cl.exe warning ids -----------*- 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 implements the Diagnostic-related interfaces.9//10//===----------------------------------------------------------------------===//1112#include "clang/Basic/CLWarnings.h"13#include "clang/Basic/DiagnosticCategories.h"14#include <optional>1516using namespace clang;1718std::optional<diag::Group>19clang::diagGroupFromCLWarningID(unsigned CLWarningID) {20switch (CLWarningID) {21case 4005: return diag::Group::MacroRedefined;22case 4018: return diag::Group::SignCompare;23case 4100: return diag::Group::UnusedParameter;24case 4910: return diag::Group::DllexportExplicitInstantiationDecl;25case 4996: return diag::Group::DeprecatedDeclarations;26}27return {};28}293031