xref: /freebsd/contrib/llvm-project/clang/include/clang/Basic/CLWarnings.h (revision cccdaf507eee8fb34494b4624eb85bb951e323c8)
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 #ifndef LLVM_CLANG_BASIC_CLWARNINGS_H
10 #define LLVM_CLANG_BASIC_CLWARNINGS_H
11 
12 #include <optional>
13 
14 namespace clang {
15 
16 namespace diag {
17 enum class Group;
18 }
19 
20 /// For cl.exe warning IDs that cleany map to clang diagnostic groups,
21 /// returns the corresponding group. Else, returns an empty Optional.
22 std::optional<diag::Group> diagGroupFromCLWarningID(unsigned);
23 
24 } // end namespace clang
25 
26 #endif // LLVM_CLANG_BASIC_CLWARNINGS_H
27