libabigail
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-2023 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 
21 namespace abigail
22 {
23 
24 namespace 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 
44 public:
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.
76  const regex::regex_t_sptr&
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.
92  const regex::regex_t_sptr&
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.
108  const regex::regex_t_sptr&
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.
124  const regex::regex_t_sptr&
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;
145  if (regex::regex_t_sptr regexp = get_soname_regex())
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 
228  const regex::regex_t_sptr
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_..
301  const regex::regex_t_sptr
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_..
318  const regex::regex_t_sptr
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_.
335  const regex::regex_t_sptr
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_.
352  const regex::regex_t_sptr
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_.
369  const regex::regex_t_sptr
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_.
386  const regex::regex_t_sptr
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 
395 bool
396 suppression_matches_function_name(const suppr::function_suppression& s,
397  const string& fn_name);
398 
399 bool
400 suppression_matches_function_sym_name(const suppr::function_suppression& s,
401  const string& fn_linkage_name);
402 
403 bool
405  const string& var_name);
406 
407 bool
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_.
464  const regex::regex_t_sptr
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_..
481  const regex::regex_t_sptr
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_.
498  const regex::regex_t_sptr
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_.
515  const regex::regex_t_sptr
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_.
532  const regex::regex_t_sptr
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_.
549  const regex::regex_t_sptr
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_;
570  type_suppression::type_kind type_kind_;
571  bool consider_reach_kind_;
572  type_suppression::reach_kind 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 
590  priv();
591 
592 public:
593  priv(const string& type_name_regexp,
594  const string& type_name,
595  bool consider_type_kind,
597  bool consider_reach_kind,
599  : type_name_regex_str_(type_name_regexp),
600  type_name_(type_name),
601  consider_type_kind_(consider_type_kind),
602  type_kind_(type_kind),
603  consider_reach_kind_(consider_reach_kind),
604  reach_kind_(reach_kind),
605  has_size_change_(false)
606  {}
607 
608  /// Get the regular expression object associated to the 'type_name_regex'
609  /// property of @ref type_suppression.
610  ///
611  /// If the regular expression object is not created, this method
612  /// creates it and returns it.
613  ///
614  /// If the 'type_name_regex' property of @ref type_suppression is
615  /// empty then this method returns nil.
616  const regex::regex_t_sptr
618  {
619  if (!type_name_regex_ && !type_name_regex_str_.empty())
620  type_name_regex_ = regex::compile(type_name_regex_str_);
621  return type_name_regex_;
622  }
623 
624  /// Setter for the type_name_regex object.
625  ///
626  /// @param r the new type_name_regex object.
627  void
629  {type_name_regex_ = r;}
630 
631  /// Get the regular expression object associated to the
632  /// 'type_name_not_regex' property of @ref type_suppression.
633  ///
634  /// If the regular expression object is not created, this method
635  /// creates it and returns it.
636  ///
637  /// If the 'type_name_not_regex' property of @ref type_suppression is
638  /// empty then this method returns nil.
639  const regex::regex_t_sptr
641  {
642  if (!type_name_not_regex_ && !type_name_not_regex_str_.empty())
643  type_name_not_regex_ = regex::compile(type_name_not_regex_str_);
644  return type_name_not_regex_;
645  }
646 
647  /// Setter for the type_name_not_regex object.
648  ///
649  /// @param r the new type_name_not_regex object.
650  void
652  {type_name_not_regex_ = r;}
653 
654  /// Getter for the string that denotes the 'type_name_not_regex'
655  /// property.
656  ///
657  /// @return the value of the string value of the
658  /// 'type_name_not_regex' property.
659  const string&
661  {return type_name_not_regex_str_;}
662 
663  /// Setter for the string that denotes the 'type_name_not_regex'
664  /// property.
665  ///
666  /// @return the value of the string value of the
667  /// 'type_name_not_regex' property.
668  void
669  set_type_name_not_regex_str(const string regex_str)
670  {type_name_not_regex_str_ = regex_str;}
671 
672  /// Getter for the source_location_to_keep_regex object.
673  ///
674  /// This function builds the regex if it's not yet built.
675  const regex::regex_t_sptr
677  {
678  if (!source_location_to_keep_regex_
679  && !source_location_to_keep_regex_str_.empty())
680  source_location_to_keep_regex_ =
681  regex::compile(source_location_to_keep_regex_str_);
682  return source_location_to_keep_regex_;
683  }
684 
685  /// Setter for the source_location_to_keep_regex object.
686  ///
687  /// @param r the new regex object.
688  void
690  {source_location_to_keep_regex_ = r;}
691 
692  /// Getter for the "potential_data_member_names_regex" object.
693  ///
694  /// This regex object matches the names of the data members that are
695  /// needed for this suppression specification to select the type.
696  ///
697  /// @return the "potential_data_member_names_regex" object.
698  const regex::regex_t_sptr
700  {
701  if (!potential_data_members_regex_
702  && !potential_data_members_regex_str_.empty())
703  {
704  potential_data_members_regex_ =
705  regex::compile(potential_data_members_regex_str_);
706  }
707  return potential_data_members_regex_;
708  }
709 
710  /// Setter for the "potential_data_member_names_regex" object.
711  ///
712  /// This regex object matches the names of the data members that are
713  /// needed for this suppression specification to select the type.
714  ///
715  /// @param r the new "potential_data_member_names_regex" object.
716  void
718  {potential_data_members_regex_ = r;}
719 
720  friend class type_suppression;
721 }; // class type_suppression::priv
722 
723 bool
725  const string& type_name);
726 
727 bool
729  const scope_decl* scope,
730  const type_base_sptr& type);
731 
732 bool
734  const location& loc);
735 
736 bool
738  const type_base_sptr& type);
739 
740 bool
742  const string& type_name,
743  const location& type_location);
744 
745 // </type_suppression stuff>
746 
747 }// end namespace suppr
748 } // end namespace abigail
749 
750 #endif // __ABG_SUPPRESSION_PRIV_H__
type_kind
The kind of the type the current type suppression is supposed to be about.
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_file_name_not_regex() const
Get the regular expression object associated to the 'file_name_not_regex' property of suppression_bas...
bool suppression_matches_type_location(const type_suppression &s, const location &loc)
Test if a type suppression matches a source location.
Utilities to ease the wrapping of C types into std::shared_ptr.
void set_type_name_not_regex(regex::regex_t_sptr r)
Setter for the type_name_not_regex object.
const regex::regex_t_sptr get_source_location_to_keep_regex() const
Getter for the source_location_to_keep_regex object.
regex_t_sptr compile(const std::string &str)
Compile a regex from a string.
Definition: abg-regex.cc:111
The type of the private data of the function_suppression type.
bool suppression_matches_type_name(const suppr::type_suppression &s, const string &type_name)
Test if a type suppression specification matches a type name.
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_name_regex() const
Getter for a pointer to a regular expression object built from the regular expression string function...
A declaration that introduces a scope.
Definition: abg-ir.h:1795
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_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_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_soname_regex() const
Get the regular expression object associated to the 'soname_regex' property 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.
The private data for type_suppression.
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_variable_name(const suppr::variable_suppression &s, const string &var_name)
Test if a variable suppression matches a variable denoted by its name.
void set_potential_data_member_names_regex(regex::regex_t_sptr &r)
Setter for the "potential_data_member_names_regex" object.
const regex::regex_t_sptr get_potential_data_member_names_regex() const
Getter for the "potential_data_member_names_regex" object.
Toplevel namespace for libabigail.
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...
The type of the private data of the variable_suppression type.
bool matches_soname(const string &soname) const
Test if the current suppression matches a given SONAME.
reach_kind
The different ways through which the type diff has been reached.
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.
vector< insertion_range_sptr > insertion_ranges
A convenience typedef for a vector of insertion_range_sptr.
The source location of a token.
Definition: abg-ir.h:298
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...
void set_source_location_to_keep_regex(regex::regex_t_sptr r)
Setter 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...
std::shared_ptr< regex_t > regex_t_sptr
A convenience typedef for a shared pointer of regex_t.
Definition: abg-fwd.h:88
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_soname_not_regex() const
Get the regular expression object associated to the 'soname_not_regex' property of suppression_base...
Base type of a direct suppression specifications types.
change_kind
The kind of change the current function suppression should apply to.
change_kind
The kind of change the current variable suppression should apply to.
vector< parameter_spec_sptr > parameter_specs_type
Convenience typedef for vector of parameter_spec_sptr.
Abstraction of a type suppression specification.
bool match(const regex_t_sptr &r, const std::string &str)
See if a string matches a regex.
Definition: abg-regex.cc:127
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.
Abstraction of a function suppression specification.
Abstraction of the specification of a function parameter in a function suppression specification...
The abstraction of a variable suppression specification.
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_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 string & get_type_name_not_regex_str() const
Getter for the string that denotes the 'type_name_not_regex' property.
void set_type_name_regex(regex::regex_t_sptr r)
Setter for the type_name_regex object.
Wrappers around regex types and functions.
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...
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_file_name_regex() const
Get the regular expression object associated to the 'file_name_regex' property of suppression_base...
This represents all the changes possibly described by this enum. It's a logical 'OR' of all the chang...