view gcc/testsuite/g++.dg/spellcheck-pr78656.C @ 158:494b0b89df80 default tip

...
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Mon, 25 May 2020 18:13:55 +0900
parents 1830386684a0
children
line wrap: on
line source

// { dg-options "-fdiagnostics-show-caret" }

#include <memory>

void* allocate(std::size_t n)
{
  return std::allocate<char>().allocate(n); // { dg-error ".allocate. is not a member of .std.; did you mean 'allocator'\\?" }
  /* { dg-begin-multiline-output "" }
   return std::allocate<char>().allocate(n);
               ^~~~~~~~
               allocator
     { dg-end-multiline-output "" } */

  // Various errors follow that we don't care about; suppress them:
  // { dg-excess-errors "7: " }
}

void* test_2(std::size_t n)
{
  return std::alocator<char>().allocate(n); // { dg-error ".alocator. is not a member of .std.; did you mean 'allocator'\\?" }
  /* { dg-begin-multiline-output "" }
   return std::alocator<char>().allocate(n);
               ^~~~~~~~
               allocator
     { dg-end-multiline-output "" } */

  // Various errors follow that we don't care about; suppress them:
  // { dg-excess-errors "25: " }
}