|
20 | 20 | #include "clang/Basic/Specifiers.h" |
21 | 21 | #include "llvm/ADT/ArrayRef.h" |
22 | 22 | #include "llvm/ADT/DenseMap.h" |
23 | | -#include "llvm/ADT/FunctionExtras.h" |
24 | 23 | #include "llvm/ADT/IntrusiveRefCntPtr.h" |
25 | 24 | #include "llvm/ADT/SmallVector.h" |
26 | 25 | #include "llvm/ADT/StringRef.h" |
|
41 | 40 | namespace llvm { |
42 | 41 | class Error; |
43 | 42 | class raw_ostream; |
44 | | -class MemoryBuffer; |
45 | | -namespace vfs { |
46 | | -class FileSystem; |
47 | | -} // namespace vfs |
48 | 43 | } // namespace llvm |
49 | 44 |
|
50 | 45 | namespace clang { |
@@ -560,10 +555,6 @@ class DiagnosticsEngine : public RefCountedBase<DiagnosticsEngine> { |
560 | 555 | void *ArgToStringCookie = nullptr; |
561 | 556 | ArgToStringFnTy ArgToStringFn; |
562 | 557 |
|
563 | | - /// Whether the diagnostic should be suppressed in FilePath. |
564 | | - llvm::unique_function<bool(diag::kind, llvm::StringRef /*FilePath*/) const> |
565 | | - DiagSuppressionMapping; |
566 | | - |
567 | 558 | public: |
568 | 559 | explicit DiagnosticsEngine(IntrusiveRefCntPtr<DiagnosticIDs> Diags, |
569 | 560 | IntrusiveRefCntPtr<DiagnosticOptions> DiagOpts, |
@@ -955,27 +946,6 @@ class DiagnosticsEngine : public RefCountedBase<DiagnosticsEngine> { |
955 | 946 | return (Level)Diags->getDiagnosticLevel(DiagID, Loc, *this); |
956 | 947 | } |
957 | 948 |
|
958 | | - /// Diagnostic suppression mappings can be used to suppress specific |
959 | | - /// diagnostics in specific files. |
960 | | - /// Mapping file is expected to be a special case list with sections denoting |
961 | | - /// diagnostic groups and `src` entries for globs to suppress. `emit` category |
962 | | - /// can be used to disable suppression. Longest glob that matches a filepath |
963 | | - /// takes precedence. For example: |
964 | | - /// [unused] |
965 | | - /// src:clang/* |
966 | | - /// src:clang/foo/*=emit |
967 | | - /// src:clang/foo/bar/* |
968 | | - /// |
969 | | - /// Such a mappings file suppress all diagnostics produced by -Wunused in all |
970 | | - /// sources under `clang/` directory apart from `clang/foo/`. Diagnostics |
971 | | - /// under `clang/foo/bar/` will also be suppressed. Note that the FilePath is |
972 | | - /// matched against the globs as-is. |
973 | | - /// These take presumed locations into account, and can still be overriden by |
974 | | - /// clang-diagnostics pragmas. |
975 | | - void setDiagSuppressionMapping(llvm::MemoryBuffer &Input); |
976 | | - bool isSuppressedViaMapping(diag::kind DiagId, |
977 | | - llvm::StringRef FilePath) const; |
978 | | - |
979 | 949 | /// Issue the message to the client. |
980 | 950 | /// |
981 | 951 | /// This actually returns an instance of DiagnosticBuilder which emits the |
@@ -1789,7 +1759,7 @@ const char ToggleHighlight = 127; |
1789 | 1759 | /// warning options specified on the command line. |
1790 | 1760 | void ProcessWarningOptions(DiagnosticsEngine &Diags, |
1791 | 1761 | const DiagnosticOptions &Opts, |
1792 | | - llvm::vfs::FileSystem &VFS, bool ReportDiags = true); |
| 1762 | + bool ReportDiags = true); |
1793 | 1763 | void EscapeStringForDiagnostic(StringRef Str, SmallVectorImpl<char> &OutStr); |
1794 | 1764 | } // namespace clang |
1795 | 1765 |
|
|
0 commit comments