CLWarnings.cpp 1023 B

12345678910111213141516171819202122232425262728
  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. #include "clang/Basic/CLWarnings.h"
  13. #include "clang/Basic/DiagnosticCategories.h"
  14. using namespace clang;
  15. llvm::Optional<diag::Group>
  16. clang::diagGroupFromCLWarningID(unsigned CLWarningID) {
  17. switch (CLWarningID) {
  18. case 4005: return diag::Group::MacroRedefined;
  19. case 4018: return diag::Group::SignCompare;
  20. case 4100: return diag::Group::UnusedParameter;
  21. case 4910: return diag::Group::DllexportExplicitInstantiationDecl;
  22. case 4996: return diag::Group::DeprecatedDeclarations;
  23. }
  24. return {};
  25. }