summaryrefslogtreecommitdiff
path: root/solenv/bin/msg_filter
blob: 2d59e16ff023dcf524b2d1bf64156cb91cad2813 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
: # -*- perl -*-
eval 'exec perl -wS $0 ${1+"$@"}'
	if 0;
#
# This file is part of the LibreOffice project.
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
#
# This file incorporates work covered by the following license notice:
#
#   Licensed to the Apache Software Foundation (ASF) under one or more
#   contributor license agreements. See the NOTICE file distributed
#   with this work for additional information regarding copyright
#   ownership. The ASF licenses this file to you under the Apache
#   License, Version 2.0 (the "License"); you may not use this file
#   except in compliance with the License. You may obtain a copy of
#   the License at http://www.apache.org/licenses/LICENSE-2.0 .
#
# This is a script to get rid of bogus error messages that are spit out
# by the compiler - sub 30/11/1999

# Lines that contain `xxxx' where xxxx belongs to the list knownMessages
# and is surrounded by a backtick (`) and a forward tick (') 
# will not be seen in the compiler output


@knownMessages	= (
"__pure_virtual",
"__vt_9bad_alloc",
"__vt_9exception",
"_._9bad_alloc",
"__cp_push_exception",
"__uncatch_exception",
"__rtti_user",
"__rtti_si",
"__throw",
"terminate__Fv",
"__cp_pop_exception",
"__builtin_vec_new",
"__cmpdi2",
"__builtin_vec_delete",
"__cp_eh_info",
"__builtin_delete",
"__builtin_new",
"__eh_alloc",
"__check_eh_spec",
"_type_match_rtti",
"__rtti_class",
"set_new_handler_FPFv_v",
"__throw_type_match_rtti",
"__check_eh_spec",
"exception_type_info",
"exception type_info function",
"exception type_info node",
"exception virtual table",
"terminate(void)"
);

# Create a hash %msgHash from list @knownMessages
foreach $msg (@knownMessages) {
	$msgHash {$msg}++;
}
while ( <STDIN> ) {
	
	if (/\`([\s\w]+)\'/) {
		$entry = $1;
		if (defined($entry)) {
			if (!exists $msgHash{$entry}) {
				print $_;
			}
		}
	}
	else {
		print $_;
	}
}