Coverage Report

Created: 2024-01-17 10:31

/src/llvm-project/clang/lib/Basic/CLWarnings.cpp
Line
Count
Source (jump to first uncovered line)
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"
14
#include "clang/Basic/DiagnosticCategories.h"
15
#include <optional>
16
17
using namespace clang;
18
19
std::optional<diag::Group>
20
0
clang::diagGroupFromCLWarningID(unsigned CLWarningID) {
21
0
  switch (CLWarningID) {
22
0
  case 4005: return diag::Group::MacroRedefined;
23
0
  case 4018: return diag::Group::SignCompare;
24
0
  case 4100: return diag::Group::UnusedParameter;
25
0
  case 4910: return diag::Group::DllexportExplicitInstantiationDecl;
26
0
  case 4996: return diag::Group::DeprecatedDeclarations;
27
0
  }
28
0
  return {};
29
0
}