C++: simplify output from suggest_alternatives_for
[official-gcc.git] / gcc / testsuite / g++.dg / spellcheck-pr78656.C
blobead4e0847befe0bceddaa947ee35677d3084fb0f
1 // { dg-options "-fdiagnostics-show-caret" }
3 #include <memory>
5 void* allocate(std::size_t n)
7   return std::allocate<char>().allocate(n); // { dg-error ".allocate. is not a member of .std.; did you mean 'allocator'\\?" }
8   /* { dg-begin-multiline-output "" }
9    return std::allocate<char>().allocate(n);
10                ^~~~~~~~
11                allocator
12      { dg-end-multiline-output "" } */
14   // Various errors follow that we don't care about; suppress them:
15   // { dg-excess-errors "7: " }
18 void* test_2(std::size_t n)
20   return std::alocator<char>().allocate(n); // { dg-error ".alocator. is not a member of .std.; did you mean 'allocator'\\?" }
21   /* { dg-begin-multiline-output "" }
22    return std::alocator<char>().allocate(n);
23                ^~~~~~~~
24                allocator
25      { dg-end-multiline-output "" } */
27   // Various errors follow that we don't care about; suppress them:
28   // { dg-excess-errors "25: " }