libabigail
Loading...
Searching...
No Matches
abg-suppression-priv.h
Go to the documentation of this file.
1// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
2// -*- Mode: C++ -*-
3//
4// Copyright (C) 2016-2024 Red Hat, Inc.
5//
6// Author: Dodji Seketeli
7
8/// @file
9///
10/// This contains the private implementation of the suppression engine
11/// of libabigail.
12
13#ifndef __ABG_SUPPRESSION_PRIV_H__
14#define __ABG_SUPPRESSION_PRIV_H__
15
16#include "abg-fwd.h"
17#include "abg-regex.h"
18#include "abg-sptr-utils.h"
19#include "abg-suppression.h"
20
21namespace abigail
22{
23
24namespace suppr
25{
26
27// <suppression_base stuff>
28
29/// The private data of @ref suppression_base.
31{
32 bool is_artificial_;
33 bool drops_artifact_;
34 string label_;
35 string file_name_regex_str_;
36 mutable regex::regex_t_sptr file_name_regex_;
37 string file_name_not_regex_str_;
38 mutable regex::regex_t_sptr file_name_not_regex_;
39 string soname_regex_str_;
40 mutable regex::regex_t_sptr soname_regex_;
41 string soname_not_regex_str_;
42 mutable regex::regex_t_sptr soname_not_regex_;
43
44public:
45 priv()
46 : is_artificial_(),
47 drops_artifact_()
48 {}
49
50 priv(const string& label)
51 : is_artificial_(),
52 drops_artifact_(),
53 label_(label)
54 {}
55
56 priv(const string& label,
57 const string& file_name_regex_str,
58 const string& file_name_not_regex_str)
59 : is_artificial_(),
60 drops_artifact_(),
61 label_(label),
62 file_name_regex_str_(file_name_regex_str),
63 file_name_not_regex_str_(file_name_not_regex_str)
64 {}
65
66 friend class suppression_base;
67
68 /// Get the regular expression object associated to the 'file_name_regex'
69 /// property of @ref suppression_base.
70 ///
71 /// If the regular expression object is not created, this method
72 /// creates it and returns it.
73 ///
74 /// If the 'file_name_regex' property of @ref suppression_base is
75 /// empty then this method returns nil.
78 {
79 if (!file_name_regex_ && !file_name_regex_str_.empty())
80 file_name_regex_ = regex::compile(file_name_regex_str_);
81 return file_name_regex_;
82 }
83
84 /// Get the regular expression object associated to the
85 /// 'file_name_not_regex' property of @ref suppression_base.
86 ///
87 /// If the regular expression object is not created, this method
88 /// creates it and returns it.
89 ///
90 /// If the 'file_name_not_regex' property of @ref suppression_base
91 /// is empty then this method returns nil.
94 {
95 if (!file_name_not_regex_ && !file_name_not_regex_str_.empty())
96 file_name_not_regex_ = regex::compile(file_name_not_regex_str_);
97 return file_name_not_regex_;
98 }
99
100 /// Get the regular expression object associated to the
101 /// 'soname_regex' property of @ref suppression_base.
102 ///
103 /// If the regular expression object is not created, this method
104 /// creates it and returns it.
105 ///
106 /// If the 'soname_regex' property of @ref suppression_base is empty
107 /// then this method returns nil.
110 {
111 if (!soname_regex_ && !soname_regex_str_.empty())
112 soname_regex_ = regex::compile(soname_regex_str_);
113 return soname_regex_;
114 }
115
116 /// Get the regular expression object associated to the
117 /// 'soname_not_regex' property of @ref suppression_base.
118 ///
119 /// If the regular expression object is not created, this method
120 /// creates it and returns it.
121 ///
122 /// If the 'soname_not_regex' property of @ref suppression_base is
123 /// empty then this method returns nil.
126 {
127 if (!soname_not_regex_ && !soname_not_regex_str_.empty())
128 soname_not_regex_ = regex::compile(soname_not_regex_str_);
129 return soname_not_regex_;
130 }
131
132 /// Test if the current suppression matches a given SONAME.
133 ///
134 /// @param soname the SONAME to consider.
135 ///
136 /// @return true iff the suppression matches the SONAME denoted by
137 /// @p soname.
138 ///
139 /// Note that if the suppression contains no property that is
140 /// related to SONAMEs, the function returns false.
141 bool
142 matches_soname(const string& soname) const
143 {
144 bool has_regexp = false;
146 {
147 has_regexp = true;
148 if (!regex::match(regexp, soname))
149 return false;
150 }
151
153 {
154 has_regexp = true;
155 if (regex::match(regexp, soname))
156 return false;
157 }
158
159 if (!has_regexp)
160 return false;
161
162 return true;
163 }
164
165 /// Test if the current suppression matches the full file path to a
166 /// given binary.
167 ///
168 /// @param binary_name the full path to the binary.
169 ///
170 /// @return true iff the suppression matches the path denoted by @p
171 /// binary_name.
172 ///
173 /// Note that if the suppression contains no property that is
174 /// related to file name, the function returns false.
175 bool
176 matches_binary_name(const string& binary_name) const
177 {
178 bool has_regexp = false;
179
181 {
182 has_regexp = true;
183 if (!regex::match(regexp, binary_name))
184 return false;
185 }
186
188 {
189 has_regexp = true;
190 if (regex::match(regexp, binary_name))
191 return false;
192 }
193
194 if (!has_regexp)
195 return false;
196
197 return true;
198 }
199
200}; // end clas suppression_base::priv
201
202// </suppression_base stuff>
203
204// <function_suppression stuff>
205
207{
209 friend class function_suppression;
210
211 size_t index_;
212 string type_name_;
213 string type_name_regex_str_;
214 mutable regex::regex_t_sptr type_name_regex_;
215
216 priv()
217 : index_()
218 {}
219
220 priv(size_t i, const string& tn)
221 : index_(i), type_name_(tn)
222 {}
223
224 priv(size_t i, const string& tn, const string& tn_regex)
225 : index_(i), type_name_(tn), type_name_regex_str_(tn_regex)
226 {}
227
229 get_type_name_regex() const
230 {
231 if (!type_name_regex_ && !type_name_regex_str_.empty())
232 type_name_regex_ = regex::compile(type_name_regex_str_);
233 return type_name_regex_;
234 }
235}; // end class function_suppression::parameter_spec::priv
236
237
238/// The type of the private data of the @ref function_suppression
239/// type.
241{
242 friend class function_suppression;
243
244 change_kind change_kind_;
245 string name_;
246 string name_regex_str_;
247 mutable regex::regex_t_sptr name_regex_;
248 string name_not_regex_str_;
249 mutable regex::regex_t_sptr name_not_regex_;
250 string return_type_name_;
251 string return_type_regex_str_;
252 mutable regex::regex_t_sptr return_type_regex_;
253 parameter_specs_type parm_specs_;
254 string symbol_name_;
255 string symbol_name_regex_str_;
256 mutable regex::regex_t_sptr symbol_name_regex_;
257 string symbol_name_not_regex_str_;
258 mutable regex::regex_t_sptr symbol_name_not_regex_;
259 string symbol_version_;
260 string symbol_version_regex_str_;
261 mutable regex::regex_t_sptr symbol_version_regex_;
262 bool allow_other_aliases_;
263
264 priv():
265 change_kind_(ALL_CHANGE_KIND),
266 allow_other_aliases_(true)
267 {}
268
269 priv(const string& name,
270 const string& name_regex_str,
271 const string& return_type_name,
272 const string& return_type_regex_str,
273 const parameter_specs_type& parm_specs,
274 const string& symbol_name,
275 const string& symbol_name_regex_str,
276 const string& symbol_version,
277 const string& symbol_version_regex_str)
278 : change_kind_(ALL_CHANGE_KIND),
279 name_(name),
280 name_regex_str_(name_regex_str),
281 return_type_name_(return_type_name),
282 return_type_regex_str_(return_type_regex_str),
283 parm_specs_(parm_specs),
284 symbol_name_(symbol_name),
285 symbol_name_regex_str_(symbol_name_regex_str),
286 symbol_version_(symbol_version),
287 symbol_version_regex_str_(symbol_version_regex_str),
288 allow_other_aliases_(true)
289 {}
290
291
292 /// Getter for a pointer to a regular expression object built from
293 /// the regular expression string
294 /// function_suppression::priv::name_regex_str_.
295 ///
296 /// If that string is empty, then an empty regular expression object
297 /// pointer is returned.
298 ///
299 /// @return a pointer to the regular expression object of
300 /// function_suppression::priv::name_regex_str_..
303 {
304 if (!name_regex_ && !name_regex_str_.empty())
305 name_regex_ = regex::compile(name_regex_str_);
306 return name_regex_;
307 }
308
309 /// Getter for a pointer to a regular expression object built from
310 /// the regular expression string
311 /// function_suppression::priv::name_not_regex_str_.
312 ///
313 /// If that string is empty, then an empty regular expression object
314 /// pointer is returned.
315 ///
316 /// @return a pointer to the regular expression object of
317 /// function_suppression::priv::name_not_regex_str_..
320 {
321 if (!name_not_regex_ && !name_not_regex_str_.empty())
322 name_not_regex_ = regex::compile(name_not_regex_str_);
323 return name_not_regex_;
324 }
325
326 /// Getter for a pointer to a regular expression object built from
327 /// the regular expression string
328 /// function_suppression::priv::return_type_regex_str_.
329 ///
330 /// If that string is empty, then an empty regular expression object
331 /// pointer is returned.
332 ///
333 /// @return a pointer to the regular expression object of
334 /// function_suppression::priv::return_type_regex_str_.
337 {
338 if (!return_type_regex_ && !return_type_regex_str_.empty())
339 return_type_regex_ = regex::compile(return_type_regex_str_);
340 return return_type_regex_;
341 }
342
343 /// Getter for a pointer to a regular expression object built from
344 /// the regular expression string
345 /// function_suppression::priv::symbol_name_regex_str_.
346 ///
347 /// If that string is empty, then an empty regular expression object
348 /// pointer is returned.
349 ///
350 /// @return a pointer to the regular expression object of
351 /// function_suppression::priv::symbol_name_regex_str_.
354 {
355 if (!symbol_name_regex_ && !symbol_name_regex_str_.empty())
356 symbol_name_regex_ = regex::compile(symbol_name_regex_str_);
357 return symbol_name_regex_;
358 }
359
360 /// Getter for a pointer to a regular expression object built from
361 /// the regular expression string
362 /// function_suppression::priv::symbol_name_not_regex_str_.
363 ///
364 /// If that string is empty, then an empty regular expression object
365 /// pointer is returned.
366 ///
367 /// @return a pointer to the regular expression object of
368 /// function_suppression::priv::symbol_name_not_regex_str_.
371 {
372 if (!symbol_name_not_regex_ && !symbol_name_not_regex_str_.empty())
373 symbol_name_not_regex_ = regex::compile(symbol_name_not_regex_str_);
374 return symbol_name_not_regex_;
375 }
376
377 /// Getter for a pointer to a regular expression object built from
378 /// the regular expression string
379 /// function_suppression::priv::symbol_version_regex_str_.
380 ///
381 /// If that string is empty, then an empty regular expression object
382 /// pointer is returned.
383 ///
384 /// @return a pointer to the regular expression object of
385 /// function_suppression::priv::symbol_version_regex_str_.
388 {
389 if (!symbol_version_regex_ && !symbol_version_regex_str_.empty())
390 symbol_version_regex_ = regex::compile(symbol_version_regex_str_);
391 return symbol_version_regex_;
392 }
393}; // end class function_suppression::priv
394
395bool
396suppression_matches_function_name(const suppr::function_suppression& s,
397 const string& fn_name);
398
399bool
400suppression_matches_function_sym_name(const suppr::function_suppression& s,
401 const string& fn_linkage_name);
402
403bool
405 const string& var_name);
406
407bool
409 const string& var_linkage_name);
410
411// <variable_suppression stuff>
412/// The type of the private data of the @ref variable_suppression
413/// type.
415{
416 friend class variable_suppression;
417
418 change_kind change_kind_;
419 string name_;
420 string name_regex_str_;
421 mutable regex::regex_t_sptr name_regex_;
422 string name_not_regex_str_;
423 mutable regex::regex_t_sptr name_not_regex_;
424 string symbol_name_;
425 string symbol_name_regex_str_;
426 mutable regex::regex_t_sptr symbol_name_regex_;
427 string symbol_name_not_regex_str_;
428 mutable regex::regex_t_sptr symbol_name_not_regex_;
429 string symbol_version_;
430 string symbol_version_regex_str_;
431 mutable regex::regex_t_sptr symbol_version_regex_;
432 string type_name_;
433 string type_name_regex_str_;
434 mutable regex::regex_t_sptr type_name_regex_;
435
436 priv(const string& name,
437 const string& name_regex_str,
438 const string& symbol_name,
439 const string& symbol_name_regex_str,
440 const string& symbol_version,
441 const string& symbol_version_regex_str,
442 const string& type_name,
443 const string& type_name_regex_str)
444 : change_kind_(ALL_CHANGE_KIND),
445 name_(name),
446 name_regex_str_(name_regex_str),
447 symbol_name_(symbol_name),
448 symbol_name_regex_str_(symbol_name_regex_str),
449 symbol_version_(symbol_version),
450 symbol_version_regex_str_(symbol_version_regex_str),
451 type_name_(type_name),
452 type_name_regex_str_(type_name_regex_str)
453 {}
454
455 /// Getter for a pointer to a regular expression object built from
456 /// the regular expression string
457 /// variable_suppression::priv::name_regex_str_.
458 ///
459 /// If that string is empty, then an empty regular expression object
460 /// pointer is returned.
461 ///
462 /// @return a pointer to the regular expression object of
463 /// variable_suppression::priv::name_regex_str_.
466 {
467 if (!name_regex_ && !name_regex_str_.empty())
468 name_regex_ = regex::compile(name_regex_str_);
469 return name_regex_;
470 }
471
472 /// Getter for a pointer to a regular expression object built from
473 /// the regular expression string
474 /// variable_suppression::priv::name_not_regex_str_.
475 ///
476 /// If that string is empty, then an empty regular expression object
477 /// pointer is returned.
478 ///
479 /// @return a pointer to the regular expression object of
480 /// variable_suppression::priv::name_not_regex_str_..
483 {
484 if (!name_not_regex_ && !name_not_regex_str_.empty())
485 name_not_regex_ = regex::compile(name_not_regex_str_);
486 return name_not_regex_;
487 }
488
489 /// Getter for a pointer to a regular expression object built from
490 /// the regular expression string
491 /// variable_suppression::priv::symbol_name_regex_str_.
492 ///
493 /// If that string is empty, then an empty regular expression object
494 /// pointer is returned.
495 ///
496 /// @return a pointer to the regular expression object of
497 /// variable_suppression::priv::symbol_name_regex_str_.
500 {
501 if (!symbol_name_regex_ && !symbol_name_regex_str_.empty())
502 symbol_name_regex_ = regex::compile(symbol_name_regex_str_);
503 return symbol_name_regex_;
504 }
505
506 /// Getter for a pointer to a regular expression object built from
507 /// the regular expression string
508 /// variable_suppression::priv::symbol_name_not_regex_str_.
509 ///
510 /// If that string is empty, then an empty regular expression object
511 /// pointer is returned.
512 ///
513 /// @return a pointer to the regular expression object of
514 /// variable_suppression::priv::symbol_name_not_regex_str_.
517 {
518 if (!symbol_name_not_regex_ && !symbol_name_not_regex_str_.empty())
519 symbol_name_not_regex_ = regex::compile(symbol_name_not_regex_str_);
520 return symbol_name_not_regex_;
521 }
522
523 /// Getter for a pointer to a regular expression object built from
524 /// the regular expression string
525 /// variable_suppression::priv::symbol_version_regex_str_.
526 ///
527 /// If that string is empty, then an empty regular expression object
528 /// pointer is returned.
529 ///
530 /// @return a pointer to the regular expression object of
531 /// variable_suppression::priv::symbol_version_regex_str_.
534 {
535 if (!symbol_version_regex_ && !symbol_version_regex_str_.empty())
536 symbol_version_regex_ = regex::compile(symbol_version_regex_str_);
537 return symbol_version_regex_;
538 }
539
540 /// Getter for a pointer to a regular expression object built from
541 /// the regular expression string
542 /// variable_suppression::priv::type_name_regex_str_.
543 ///
544 /// If that string is empty, then an empty regular expression object
545 /// pointer is returned.
546 ///
547 /// @return a pointer to the regular expression object of
548 /// variable_suppression::priv::type_name_regex_str_.
551 {
552 if (!type_name_regex_ && !type_name_regex_str_.empty())
553 type_name_regex_ = regex::compile(type_name_regex_str_);
554 return type_name_regex_;
555 }
556};// end class variable_supppression::priv
557
558// </variable_suppression stuff>
559
560// <type_suppression stuff>
561/// The private data for @ref type_suppression.
563{
564 string type_name_regex_str_;
565 mutable regex::regex_t_sptr type_name_regex_;
566 string type_name_;
567 string type_name_not_regex_str_;
568 mutable regex::regex_t_sptr type_name_not_regex_;
569 bool consider_type_kind_;
571 bool consider_reach_kind_;
573 bool has_size_change_;
574 // The data members a class needs to have to match this suppression
575 // specification. These might be selected by a regular expression.
576 string_set_type potential_data_members_;
577 // The regular expression string that selects the potential data
578 // members of the class.
579 string potential_data_members_regex_str_;
580 // The compiled regular expression that selects the potential data
581 // members of the class.
582 mutable regex::regex_t_sptr potential_data_members_regex_;
583 type_suppression::insertion_ranges insertion_ranges_;
584 unordered_set<string> source_locations_to_keep_;
585 string source_location_to_keep_regex_str_;
586 mutable regex::regex_t_sptr source_location_to_keep_regex_;
587 mutable vector<string> changed_enumerator_names_;
588 mutable vector<regex::regex_t_sptr> changed_enumerators_regexp_;
589 // Whether the "has_strict_flexible_array_data_member_conversion"
590 // property was set.
591 bool has_strict_fam_conv_;
592
593 priv();
594
595public:
596 priv(const string& type_name_regexp,
597 const string& type_name,
598 bool consider_type_kind,
600 bool consider_reach_kind,
602 : type_name_regex_str_(type_name_regexp),
603 type_name_(type_name),
604 consider_type_kind_(consider_type_kind),
605 type_kind_(type_kind),
606 consider_reach_kind_(consider_reach_kind),
607 reach_kind_(reach_kind),
608 has_size_change_(false),
609 has_strict_fam_conv_(false)
610 {}
611
612 /// Get the regular expression object associated to the 'type_name_regex'
613 /// property of @ref type_suppression.
614 ///
615 /// If the regular expression object is not created, this method
616 /// creates it and returns it.
617 ///
618 /// If the 'type_name_regex' property of @ref type_suppression is
619 /// empty then this method returns nil.
622 {
623 if (!type_name_regex_ && !type_name_regex_str_.empty())
624 type_name_regex_ = regex::compile(type_name_regex_str_);
625 return type_name_regex_;
626 }
627
628 /// Setter for the type_name_regex object.
629 ///
630 /// @param r the new type_name_regex object.
631 void
633 {type_name_regex_ = r;}
634
635 /// Get the regular expression object associated to the
636 /// 'type_name_not_regex' property of @ref type_suppression.
637 ///
638 /// If the regular expression object is not created, this method
639 /// creates it and returns it.
640 ///
641 /// If the 'type_name_not_regex' property of @ref type_suppression is
642 /// empty then this method returns nil.
645 {
646 if (!type_name_not_regex_ && !type_name_not_regex_str_.empty())
647 type_name_not_regex_ = regex::compile(type_name_not_regex_str_);
648 return type_name_not_regex_;
649 }
650
651 /// Setter for the type_name_not_regex object.
652 ///
653 /// @param r the new type_name_not_regex object.
654 void
656 {type_name_not_regex_ = r;}
657
658 /// Getter for the string that denotes the 'type_name_not_regex'
659 /// property.
660 ///
661 /// @return the value of the string value of the
662 /// 'type_name_not_regex' property.
663 const string&
665 {return type_name_not_regex_str_;}
666
667 /// Setter for the string that denotes the 'type_name_not_regex'
668 /// property.
669 ///
670 /// @return the value of the string value of the
671 /// 'type_name_not_regex' property.
672 void
673 set_type_name_not_regex_str(const string regex_str)
674 {type_name_not_regex_str_ = regex_str;}
675
676 /// Getter for the source_location_to_keep_regex object.
677 ///
678 /// This function builds the regex if it's not yet built.
681 {
682 if (!source_location_to_keep_regex_
683 && !source_location_to_keep_regex_str_.empty())
684 source_location_to_keep_regex_ =
685 regex::compile(source_location_to_keep_regex_str_);
686 return source_location_to_keep_regex_;
687 }
688
689 /// Setter for the source_location_to_keep_regex object.
690 ///
691 /// @param r the new regex object.
692 void
694 {source_location_to_keep_regex_ = r;}
695
696 /// Getter for the "potential_data_member_names_regex" object.
697 ///
698 /// This regex object matches the names of the data members that are
699 /// needed for this suppression specification to select the type.
700 ///
701 /// @return the "potential_data_member_names_regex" object.
704 {
705 if (!potential_data_members_regex_
706 && !potential_data_members_regex_str_.empty())
707 {
708 potential_data_members_regex_ =
709 regex::compile(potential_data_members_regex_str_);
710 }
711 return potential_data_members_regex_;
712 }
713
714 /// Setter for the "potential_data_member_names_regex" object.
715 ///
716 /// This regex object matches the names of the data members that are
717 /// needed for this suppression specification to select the type.
718 ///
719 /// @param r the new "potential_data_member_names_regex" object.
720 void
722 {potential_data_members_regex_ = r;}
723
724 friend class type_suppression;
725}; // class type_suppression::priv
726
727bool
729 const string& type_name);
730
731bool
733 const scope_decl* scope,
734 const type_base_sptr& type);
735
736bool
738 const location& loc);
739
740bool
742 const type_base_sptr& type);
743
744bool
746 const string& type_name,
747 const location& type_location);
748
749// </type_suppression stuff>
750
751}// end namespace suppr
752} // end namespace abigail
753
754#endif // __ABG_SUPPRESSION_PRIV_H__
Wrappers around regex types and functions.
Utilities to ease the wrapping of C types into std::shared_ptr.
The source location of a token.
Definition abg-ir.h:307
A declaration that introduces a scope.
Definition abg-ir.h:1824
Abstraction of the specification of a function parameter in a function suppression specification.
Abstraction of a function suppression specification.
vector< parameter_spec_sptr > parameter_specs_type
Convenience typedef for vector of parameter_spec_sptr.
change_kind
The kind of change the current function suppression should apply to.
@ ALL_CHANGE_KIND
This represents all the changes possibly described by this enum. It's a logical 'OR' of all the chang...
The private data of suppression_base.
bool matches_binary_name(const string &binary_name) const
Test if the current suppression matches the full file path to a given binary.
const regex::regex_t_sptr & get_file_name_regex() const
Get the regular expression object associated to the 'file_name_regex' property of suppression_base.
const regex::regex_t_sptr & get_file_name_not_regex() const
Get the regular expression object associated to the 'file_name_not_regex' property of suppression_bas...
const regex::regex_t_sptr & get_soname_not_regex() const
Get the regular expression object associated to the 'soname_not_regex' property of suppression_base.
bool matches_soname(const string &soname) const
Test if the current suppression matches a given SONAME.
const regex::regex_t_sptr & get_soname_regex() const
Get the regular expression object associated to the 'soname_regex' property of suppression_base.
Base type of a direct suppression specifications types.
The private data for type_suppression.
const regex::regex_t_sptr get_type_name_not_regex() const
Get the regular expression object associated to the 'type_name_not_regex' property of type_suppressio...
const regex::regex_t_sptr get_potential_data_member_names_regex() const
Getter for the "potential_data_member_names_regex" object.
void set_potential_data_member_names_regex(regex::regex_t_sptr &r)
Setter for the "potential_data_member_names_regex" object.
const string & get_type_name_not_regex_str() const
Getter for the string that denotes the 'type_name_not_regex' property.
void set_type_name_not_regex(regex::regex_t_sptr r)
Setter for the type_name_not_regex object.
void set_source_location_to_keep_regex(regex::regex_t_sptr r)
Setter for the source_location_to_keep_regex object.
void set_type_name_regex(regex::regex_t_sptr r)
Setter for the type_name_regex object.
void set_type_name_not_regex_str(const string regex_str)
Setter for the string that denotes the 'type_name_not_regex' property.
const regex::regex_t_sptr get_source_location_to_keep_regex() const
Getter for the source_location_to_keep_regex object.
const regex::regex_t_sptr get_type_name_regex() const
Get the regular expression object associated to the 'type_name_regex' property of type_suppression.
Abstraction of a type suppression specification.
vector< insertion_range_sptr > insertion_ranges
A convenience typedef for a vector of insertion_range_sptr.
type_kind
The kind of the type the current type suppression is supposed to be about.
reach_kind
The different ways through which the type diff has been reached.
The abstraction of a variable suppression specification.
change_kind
The kind of change the current variable suppression should apply to.
@ ALL_CHANGE_KIND
This represents all the changes possibly described by this enum. It's a logical 'OR' of all the chang...
bool match(const regex_t_sptr &r, const std::string &str)
See if a string matches a regex.
Definition abg-regex.cc:127
regex_t_sptr compile(const std::string &str)
Compile a regex from a string.
Definition abg-regex.cc:111
std::shared_ptr< regex_t > regex_t_sptr
A convenience typedef for a shared pointer of regex_t.
Definition abg-fwd.h:87
bool suppression_matches_type_name(const suppr::type_suppression &s, const string &type_name)
Test if a type suppression specification matches a type name.
bool suppression_matches_variable_name(const suppr::variable_suppression &s, const string &var_name)
Test if a variable suppression matches a variable denoted by its name.
bool suppression_matches_type_name_or_location(const type_suppression &s, const string &type_name, const location &type_location)
Test if a type suppression matches a type name and location.
bool suppression_matches_type_location(const type_suppression &s, const location &loc)
Test if a type suppression matches a source location.
bool suppression_matches_variable_sym_name(const suppr::variable_suppression &s, const string &var_linkage_name)
Test if a variable suppression matches a variable denoted by its symbol name.
Toplevel namespace for libabigail.
The type of the private data of the function_suppression type.
const regex::regex_t_sptr get_return_type_regex() const
Getter for a pointer to a regular expression object built from the regular expression string function...
const regex::regex_t_sptr get_symbol_name_not_regex() const
Getter for a pointer to a regular expression object built from the regular expression string function...
const regex::regex_t_sptr get_name_regex() const
Getter for a pointer to a regular expression object built from the regular expression string function...
const regex::regex_t_sptr get_symbol_version_regex() const
Getter for a pointer to a regular expression object built from the regular expression string function...
const regex::regex_t_sptr get_name_not_regex() const
Getter for a pointer to a regular expression object built from the regular expression string function...
const regex::regex_t_sptr get_symbol_name_regex() const
Getter for a pointer to a regular expression object built from the regular expression string function...
The type of the private data of the variable_suppression type.
const regex::regex_t_sptr get_symbol_name_not_regex() const
Getter for a pointer to a regular expression object built from the regular expression string variable...
const regex::regex_t_sptr get_name_regex() const
Getter for a pointer to a regular expression object built from the regular expression string variable...
const regex::regex_t_sptr get_symbol_version_regex() const
Getter for a pointer to a regular expression object built from the regular expression string variable...
const regex::regex_t_sptr get_name_not_regex() const
Getter for a pointer to a regular expression object built from the regular expression string variable...
const regex::regex_t_sptr get_symbol_name_regex() const
Getter for a pointer to a regular expression object built from the regular expression string variable...
const regex::regex_t_sptr get_type_name_regex() const
Getter for a pointer to a regular expression object built from the regular expression string variable...