if (m_show_nesting && nesting_level > 0)
{
char *indent_prefix = build_indent_prefix (true);
+
+ /* Reduce verbosity of nested diagnostics by not printing "note: "
+ all the time. */
+ if (diagnostic.kind == DK_NOTE)
+ return indent_prefix;
+
char *result = build_message_string ("%s%s%s%s", indent_prefix,
text_cs, text, text_ce);
free (indent_prefix);
}
/* { dg-begin-multiline-output "" }
- * note: there are 3 candidates
- * note: candidate 1: 'template<class auto:1> requires pettable<auto:1> void pet(auto:1)'
- * note: template argument deduction/substitution failed:
- * note: constraints not satisfied
+ * there are 3 candidates
+ * candidate 1: 'template<class auto:1> requires pettable<auto:1> void pet(auto:1)'
+ * template argument deduction/substitution failed:
+ * constraints not satisfied
* In substitution of 'template<class auto:1> requires pettable<auto:1> void pet(auto:1) [with auto:1 = lizard]':
* required from here
* required for the satisfaction of 'pettable<auto:1>' [with auto:1 = lizard]
- * note: no operand of the disjunction is satisfied
- * note: set '-fconcepts-diagnostics-depth=' to at least 2 for more detail
- * note: candidate 2: 'void pet(dog)'
- * note: no known conversion for argument 1 from 'lizard' to 'dog'
- * note: candidate 3: 'void pet(cat)'
- * note: no known conversion for argument 1 from 'lizard' to 'cat'
+ * no operand of the disjunction is satisfied
+ * set '-fconcepts-diagnostics-depth=' to at least 2 for more detail
+ * candidate 2: 'void pet(dog)'
+ * no known conversion for argument 1 from 'lizard' to 'dog'
+ * candidate 3: 'void pet(cat)'
+ * no known conversion for argument 1 from 'lizard' to 'cat'
{ dg-end-multiline-output "" } */
}
/* { dg-begin-multiline-output "" }
- * note: there are 3 candidates
- * note: candidate 1: 'template<class auto:1> requires pettable<auto:1> void pet(auto:1)'
- * note: template argument deduction/substitution failed:
- * note: constraints not satisfied
+ * there are 3 candidates
+ * candidate 1: 'template<class auto:1> requires pettable<auto:1> void pet(auto:1)'
+ * template argument deduction/substitution failed:
+ * constraints not satisfied
* In substitution of 'template<class auto:1> requires pettable<auto:1> void pet(auto:1) [with auto:1 = lizard]':
* required from here
* required for the satisfaction of 'pettable<auto:1>' [with auto:1 = lizard]
- * note: no operand of the disjunction is satisfied
- * note: the operand 'has_member_pet<T>' is unsatisfied because
+ * no operand of the disjunction is satisfied
+ * the operand 'has_member_pet<T>' is unsatisfied because
* required for the satisfaction of 'has_member_pet<T>' [with T = lizard]
* required for the satisfaction of 'pettable<auto:1>' [with auto:1 = lizard]
* in requirements with 'T t' [with T = lizard]
- * note: the required expression 't.pet()' is invalid, because
+ * the required expression 't.pet()' is invalid, because
* error: 'struct lizard' has no member named 'pet'
- * note: the operand 'has_default_pet<T>' is unsatisfied because
+ * the operand 'has_default_pet<T>' is unsatisfied because
* required for the satisfaction of 'has_default_pet<T>' [with T = lizard]
* required for the satisfaction of 'pettable<auto:1>' [with auto:1 = lizard]
* error: 'is_pettable' is not a member of 'lizard'
- * note: candidate 2: 'void pet(dog)'
- * note: no known conversion for argument 1 from 'lizard' to 'dog'
- * note: candidate 3: 'void pet(cat)'
- * note: no known conversion for argument 1 from 'lizard' to 'cat'
+ * candidate 2: 'void pet(dog)'
+ * no known conversion for argument 1 from 'lizard' to 'dog'
+ * candidate 3: 'void pet(cat)'
+ * no known conversion for argument 1 from 'lizard' to 'cat'
{ dg-end-multiline-output "" } */
}
/* { dg-begin-multiline-output "" }
- * note: there are 3 candidates
- * note: candidate 1: 'template<class T> requires pettable<T> void pet(T)'
- * note: template argument deduction/substitution failed:
- * note: constraints not satisfied
+ * there are 3 candidates
+ * candidate 1: 'template<class T> requires pettable<T> void pet(T)'
+ * template argument deduction/substitution failed:
+ * constraints not satisfied
* In substitution of 'template<class T> requires pettable<T> void pet(T) [with T = donkey]':
* required from here
* required for the satisfaction of 'pettable<T>' [with T = donkey]
* in requirements with 'T t' [with T = donkey]
- * note: the required expression 't.pet()' is invalid
- * note: set '-fconcepts-diagnostics-depth=' to at least 2 for more detail
- * note: candidate 2: 'void pet(dog)'
- * note: no known conversion for argument 1 from 'donkey' to 'dog'
- * note: candidate 3: 'void pet(cat)'
- * note: no known conversion for argument 1 from 'donkey' to 'cat'
+ * the required expression 't.pet()' is invalid
+ * set '-fconcepts-diagnostics-depth=' to at least 2 for more detail
+ * candidate 2: 'void pet(dog)'
+ * no known conversion for argument 1 from 'donkey' to 'dog'
+ * candidate 3: 'void pet(cat)'
+ * no known conversion for argument 1 from 'donkey' to 'cat'
{ dg-end-multiline-output "" } */
}
/* { dg-begin-multiline-output "" }
- * (level 1):note: child 0
- * (level 2):note: grandchild 0 0
- * (level 2):note: grandchild 0 1
- * (level 2):note: grandchild 0 2
- * (level 1):note: child 1
- * (level 2):note: grandchild 1 0
- * (level 2):note: grandchild 1 1
- * (level 2):note: grandchild 1 2
- * (level 1):note: child 2
- * (level 2):note: grandchild 2 0
- * (level 2):note: grandchild 2 1
- * (level 2):note: grandchild 2 2
+ * (level 1):child 0
+ * (level 2):grandchild 0 0
+ * (level 2):grandchild 0 1
+ * (level 2):grandchild 0 2
+ * (level 1):child 1
+ * (level 2):grandchild 1 0
+ * (level 2):grandchild 1 1
+ * (level 2):grandchild 1 2
+ * (level 1):child 2
+ * (level 2):grandchild 2 0
+ * (level 2):grandchild 2 1
+ * (level 2):grandchild 2 2
{ dg-end-multiline-output "" } */
}
/* { dg-begin-multiline-output "" }
- • note: child 0
- • note: grandchild 0 0
- • note: grandchild 0 1
- • note: grandchild 0 2
- • note: child 1
- • note: grandchild 1 0
- • note: grandchild 1 1
- • note: grandchild 1 2
- • note: child 2
- • note: grandchild 2 0
- • note: grandchild 2 1
- • note: grandchild 2 2
+ • child 0
+ • grandchild 0 0
+ • grandchild 0 1
+ • grandchild 0 2
+ • child 1
+ • grandchild 1 0
+ • grandchild 1 1
+ • grandchild 1 2
+ • child 2
+ • grandchild 2 0
+ • grandchild 2 1
+ • grandchild 2 2
{ dg-end-multiline-output "" } */
}
/* { dg-begin-multiline-output "" }
- * note: child 0
- * note: grandchild 0 0
- * note: grandchild 0 1
- * note: grandchild 0 2
- * note: child 1
- * note: grandchild 1 0
- * note: grandchild 1 1
- * note: grandchild 1 2
- * note: child 2
- * note: grandchild 2 0
- * note: grandchild 2 1
- * note: grandchild 2 2
+ * child 0
+ * grandchild 0 0
+ * grandchild 0 1
+ * grandchild 0 2
+ * child 1
+ * grandchild 1 0
+ * grandchild 1 1
+ * grandchild 1 2
+ * child 2
+ * grandchild 2 0
+ * grandchild 2 1
+ * grandchild 2 2
{ dg-end-multiline-output "" } */