diff options
author | Jose <jose@zeroc.com> | 2017-02-03 18:10:20 +0100 |
---|---|---|
committer | Jose <jose@zeroc.com> | 2017-02-03 18:10:20 +0100 |
commit | 7274ebf13c7a1ff3b587598335201c3a4e848c90 (patch) | |
tree | ad673e775b6ab68d511bcc86cf420c519b65948d /cpp/src/Slice/Parser.cpp | |
parent | Connection::close fixes for C#/Java/JS (diff) | |
download | ice-7274ebf13c7a1ff3b587598335201c3a4e848c90.tar.bz2 ice-7274ebf13c7a1ff3b587598335201c3a4e848c90.tar.xz ice-7274ebf13c7a1ff3b587598335201c3a4e848c90.zip |
Rework warning suppression to use global meta data
Diffstat (limited to 'cpp/src/Slice/Parser.cpp')
-rw-r--r-- | cpp/src/Slice/Parser.cpp | 18 |
1 files changed, 7 insertions, 11 deletions
diff --git a/cpp/src/Slice/Parser.cpp b/cpp/src/Slice/Parser.cpp index 5db58db7ef9..9b95062c035 100644 --- a/cpp/src/Slice/Parser.cpp +++ b/cpp/src/Slice/Parser.cpp @@ -122,17 +122,6 @@ Unit* unit; } -Slice::ParserVisitor::ParserVisitor(int warningLevel) : - _warningLevel(warningLevel) -{ -} - -int -Slice::ParserVisitor::warningLevel() -{ - return _warningLevel; -} - // ---------------------------------------------------------------------- // DefinitionContext // ---------------------------------------------------------------------- @@ -204,6 +193,13 @@ Slice::DefinitionContext::getMetaData() const return _metaData; } +bool +Slice::DefinitionContext::suppressWarning(const string& name) const +{ + string q = findMetaData("suppress-warning"); + return q == "suppress-warning" || q == "supress-warning:all" || q == ("suppress-warning:" + name); +} + // ---------------------------------------------------------------------- // SyntaxTreeBase // ---------------------------------------------------------------------- |