[cfe-commits] r158231 - in /cfe/trunk: lib/Sema/SemaLookup.cpp test/SemaCXX/typo-correction.cpp

Richard Smith richard at metafoo.co.uk
Fri Jun 8 14:49:57 PDT 2012


On Fri, Jun 8, 2012 at 2:42 PM, David Blaikie <dblaikie at gmail.com> wrote:

> On Fri, Jun 8, 2012 at 2:35 PM, Richard Smith
> <richard-llvm at metafoo.co.uk> wrote:
> > Author: rsmith
> > Date: Fri Jun  8 16:35:42 2012
> > New Revision: 158231
> >
> > URL: http://llvm.org/viewvc/llvm-project?rev=158231&view=rev
> > Log:
> > PR13051: Only suggest the 'template' and 'operator' keywords when
> performing
> > typo-correction after a scope specifier.
>
[...]

> > +    f(&S<int>::tempalte f<int>); // expected-error{{did you mean
> 'template'?}}
> > +    f(&S<int>::opeartor bool); // expected-error{{did you mean
> 'operator'?}}
>
> Are there any negative test cases you should include to ensure we
> aren't suggesting operator/template in inappropriate situations? (as
> per the patch description)
>

Sorry, the patch description is ambiguous. I meant:

"When performing typo-correction after a scope specifier, the only keywords
which should be suggested are 'template' and 'operator'."

rather than

"When performing typo-correction, the keywords 'template' and 'operator'
should only be suggested after a scope specifier."

Hence my negative test case is:


> > +    f(&S<int>::foo); // expected-error-re{{no member named 'foo' in
> 'PR13051::S<int>'$}}
>

... which used to suggest that I meant S<int>::for.

- Richard
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20120608/038d03b3/attachment.html>


More information about the cfe-commits mailing list