xref: /freebsd-src/contrib/llvm-project/clang/lib/Basic/CLWarnings.cpp (revision 349cc55c9796c4596a5b9904cd3281af295f878f)
1*349cc55cSDimitry Andric //===--- CLWarnings.h - Maps some cl.exe warning ids  -----------*- C++ -*-===//
2*349cc55cSDimitry Andric //
3*349cc55cSDimitry Andric // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4*349cc55cSDimitry Andric // See https://llvm.org/LICENSE.txt for license information.
5*349cc55cSDimitry Andric // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6*349cc55cSDimitry Andric //
7*349cc55cSDimitry Andric //===----------------------------------------------------------------------===//
8*349cc55cSDimitry Andric //
9*349cc55cSDimitry Andric //  This file implements the Diagnostic-related interfaces.
10*349cc55cSDimitry Andric //
11*349cc55cSDimitry Andric //===----------------------------------------------------------------------===//
12*349cc55cSDimitry Andric 
13*349cc55cSDimitry Andric #include "clang/Basic/CLWarnings.h"
14*349cc55cSDimitry Andric #include "clang/Basic/DiagnosticCategories.h"
15*349cc55cSDimitry Andric 
16*349cc55cSDimitry Andric using namespace clang;
17*349cc55cSDimitry Andric 
18*349cc55cSDimitry Andric llvm::Optional<diag::Group>
19*349cc55cSDimitry Andric clang::diagGroupFromCLWarningID(unsigned CLWarningID) {
20*349cc55cSDimitry Andric   switch (CLWarningID) {
21*349cc55cSDimitry Andric   case 4005: return diag::Group::MacroRedefined;
22*349cc55cSDimitry Andric   case 4018: return diag::Group::SignCompare;
23*349cc55cSDimitry Andric   case 4100: return diag::Group::UnusedParameter;
24*349cc55cSDimitry Andric   case 4910: return diag::Group::DllexportExplicitInstantiationDecl;
25*349cc55cSDimitry Andric   case 4996: return diag::Group::DeprecatedDeclarations;
26*349cc55cSDimitry Andric   }
27*349cc55cSDimitry Andric   return {};
28*349cc55cSDimitry Andric }
29