clang  16.0.0git
CLWarnings.cpp
Go to the documentation of this file.
1 //===--- CLWarnings.h - Maps some cl.exe warning ids -----------*- 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 implements the Diagnostic-related interfaces.
10 //
11 //===----------------------------------------------------------------------===//
12 
13 #include "clang/Basic/CLWarnings.h"
15 
16 using namespace clang;
17 
19 clang::diagGroupFromCLWarningID(unsigned CLWarningID) {
20  switch (CLWarningID) {
21  case 4005: return diag::Group::MacroRedefined;
22  case 4018: return diag::Group::SignCompare;
23  case 4100: return diag::Group::UnusedParameter;
24  case 4910: return diag::Group::DllexportExplicitInstantiationDecl;
25  case 4996: return diag::Group::DeprecatedDeclarations;
26  }
27  return {};
28 }
CLWarnings.h
clang::diagGroupFromCLWarningID
llvm::Optional< diag::Group > diagGroupFromCLWarningID(unsigned)
For cl.exe warning IDs that cleany map to clang diagnostic groups, returns the corresponding group.
Definition: CLWarnings.cpp:19
llvm::Optional
Definition: LLVM.h:40
DiagnosticCategories.h
clang
Definition: CalledOnceCheck.h:17