xref: /aoo4110/main/solenv/bin/msg_filter (revision b1cdbd2c)
1: # -*- perl -*-
2eval 'exec perl -wS $0 ${1+"$@"}'
3	if 0;
4# *************************************************************
5#
6#  Licensed to the Apache Software Foundation (ASF) under one
7#  or more contributor license agreements.  See the NOTICE file
8#  distributed with this work for additional information
9#  regarding copyright ownership.  The ASF licenses this file
10#  to you under the Apache License, Version 2.0 (the
11#  "License"); you may not use this file except in compliance
12#  with the License.  You may obtain a copy of the License at
13#
14#    http://www.apache.org/licenses/LICENSE-2.0
15#
16#  Unless required by applicable law or agreed to in writing,
17#  software distributed under the License is distributed on an
18#  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
19#  KIND, either express or implied.  See the License for the
20#  specific language governing permissions and limitations
21#  under the License.
22#
23# *************************************************************
24# This is a script to get rid of bogus error messages that are spit out
25# by the compiler - sub 30/11/1999
26
27# Lines that contain `xxxx' where xxxx belongs to the list knownMessages
28# and is surrounded by a backtick (`) and a forward tick (')
29# will not be seen in the compiler output
30
31
32@knownMessages	= (
33"__pure_virtual",
34"__vt_9bad_alloc",
35"__vt_9exception",
36"_._9bad_alloc",
37"__cp_push_exception",
38"__uncatch_exception",
39"__rtti_user",
40"__rtti_si",
41"__throw",
42"terminate__Fv",
43"__cp_pop_exception",
44"__builtin_vec_new",
45"__cmpdi2",
46"__builtin_vec_delete",
47"__cp_eh_info",
48"__builtin_delete",
49"__builtin_new",
50"__eh_alloc",
51"__check_eh_spec",
52"_type_match_rtti",
53"__rtti_class",
54"set_new_handler_FPFv_v",
55"__throw_type_match_rtti",
56"__check_eh_spec",
57"exception_type_info",
58"exception type_info function",
59"exception type_info node",
60"exception virtual table",
61"terminate(void)"
62);
63
64# Create a hash %msgHash from list @knownMessages
65foreach $msg (@knownMessages) {
66	$msgHash {$msg}++;
67}
68while ( <STDIN> ) {
69
70	if (/\`([\s\w]+)\'/) {
71		$entry = $1;
72		if (defined($entry)) {
73			if (!exists $msgHash{$entry}) {
74				print $_;
75			}
76		}
77	}
78	else {
79		print $_;
80	}
81}
82