[cfe-commits] [Patch] Fix regression in digraph fix-it hint

Richard Trieu rtrieu at google.com
Fri Sep 16 20:38:53 PDT 2011


Changes to the name lookup have caused a regression in the digraph fix-it hint.
For instance:

template <class T> void E() {};
class F {};

void test() {
  ::E<::F>();
  E<::F>();
}

Gives the following error messages:

error: found '<::' after a template name which forms the
      digraph '<:' (aka '[') and a ':', did you mean '< ::'?
  ::E<::F>();
     ^~~
     < ::
error: expected expression
  E<::F>();
     ^
error: expected ']'
note: to match this '['
  E<::F>();

This patch adds the digraph fix-it check right before the name lookup,
moves the shared checking code to a new function, and adds new
tests to catch future regressions.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: digraph.patch
Type: text/x-patch
Size: 5249 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20110916/9b3f2df2/attachment.bin>


More information about the cfe-commits mailing list