///@param include_white_space if true, consider white spaces as a
///delimiter.
///
+///@param include_square_bracket if true, consider square brackets as
+/// delimiters
+///
/// @return true iff @p b is a delimiter.
static bool
-char_is_delimiter(int b, bool include_white_space = true)
+char_is_delimiter(int b, bool include_white_space = true,
+ bool include_square_bracket = true)
{
- return (b == '['
- || b == ']'
- || b == '{'
- || b == '}'
- || b == '='
- || b == ','
- || (include_white_space && char_is_white_space(b))
- || char_is_comment_start(b));
+ return ((include_square_bracket && (b == '['))
+ || (include_square_bracket && (b == ']'))
+ || b == '{'
+ || b == '}'
+ || b == '='
+ || b == ','
+ || (include_white_space && char_is_white_space(b))
+ || char_is_comment_start(b));
}
/// Return true iff a given character can be part of a property
static bool
char_is_property_value_char(int b)
{
- if (char_is_delimiter(b, /*include_white_space=*/false)
- || b == '\n')
+ if (char_is_delimiter(b, /*include_white_space=*/false,
+ /*include_square_bracket=*/false)
+ || b == '\n')
return false;
return true;
}
test-diff-suppr/test37-opaque-type-v0.o \
test-diff-suppr/test37-opaque-type-v1.c \
test-diff-suppr/test37-opaque-type-v1.o \
+test38-char-class-in-ini-report-0.txt \
+test38-char-class-in-ini-v0.c \
+test38-char-class-in-ini-v0.o \
+test38-char-class-in-ini-v1.c \
+test38-char-class-in-ini-v1.o \
+test38-char-class-in-ini.abignore \
\
test-diff-dwarf-abixml/test0-pr19026-libvtkIOSQL-6.1.so.1 \
test-diff-dwarf-abixml/test0-pr19026-libvtkIOSQL-6.1.so.1.abi \
--- /dev/null
+Functions changes summary: 0 Removed, 0 Changed, 0 Added (1 filtered out) function
+Variables changes summary: 0 Removed, 0 Changed, 0 Added variable
+
--- /dev/null
+/*
+ * This tests the use of the character class regexp syntax
+ * '[[:something]]' in the ini file, as part of a property value.
+ *
+ * Compile it with:
+ * gcc -c -g test38-char-class-in-ini-v0.c
+ *
+ */
+struct S
+{
+ int m0;
+};
+
+void
+foo(struct S* s __attribute__((unused)))
+{
+}
--- /dev/null
+/*
+ * This tests the use of the character class regexp syntax
+ * '[[:something]]' in the ini file, as part of a property value.
+ *
+ * Compile it with:
+ * gcc -c -g test38-char-class-in-ini-v1.c
+ *
+ */
+
+struct S
+{
+ int m0;
+};
+
+void
+foo(struct S* s __attribute__((unused)))
+{
+}
+
+void
+bar()
+{
+}
--- /dev/null
+[suppress_function]
+ filename_regexp = ^test38-char-class-in-ini-v[[:digit:]].*
+ symbol_name_regexp = bar
+ change_kind = added-function
"data/test-diff-suppr/test37-opaque-type-report-0.txt",
"output/test-diff-suppr/test37-opaque-type-report-0.txt"
},
+ {
+ "data/test-diff-suppr/test38-char-class-in-ini-v0.o",
+ "data/test-diff-suppr/test38-char-class-in-ini-v1.o",
+ "",
+ "",
+ "data/test-diff-suppr/test38-char-class-in-ini.abignore",
+ "--no-default-suppression",
+ "data/test-diff-suppr/test38-char-class-in-ini-report-0.txt",
+ "output/test-diff-suppr/test38-char-class-in-ini-report-0.txt"
+ },
// This should be the last entry
{NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL}
};