[cfe-dev] [PATCH] add regex/globbing to -verify diagnostics
mike-m
mikem.llvm at gmail.com
Sun Apr 25 22:36:24 PDT 2010
Patch update uses suggested '-re' and '-glob' syntax, patch attached.
- lit tests pass with clang-debug, clang-release and selfclang-debug builds
- no measurable performance impact on lit tests
***Changes from last patch:
- updated syntax to use suffixes { -re | -glob } for regex and globbing, respectively
- added glob sequence support: first element ']' treated as literal
- reworked verify-string parser to be more resilient to errors
- added lit test/Misc/verify.c
***Examples matching error: "variable has incomplete type 'struct s'"
// expected-error {{variable has incomplete type 'struct s'}}
// expected-error {{variable has incomplete type}}
// expected-error-re {{variable has has type 'struct .'}}
// expected-error-re {{variable has has type 'struct .*'}}
// expected-error-re {{variable has has type 'struct (.*)'}}
// expected-error-re {{variable has has type 'struct[[:space:]](.*)'}}
// expected-error-glob {{variable has incomplete type 'struct ?'}}
// expected-error-glob {{variable has incomplete type 'struct [stuv]'}}
// expected-error-glob {{variable has incomplete type 'struct [!abcd]'}}
// expected-error-glob {{variable has incomplete type 'struct *'}}
--mike-m
On 2010-04-25, at 1:11 PM, Justin Bogner wrote:
>
> The expected-error, expected~error, and expected*error are so similar as
> to be confusing. Why not simply have expected-error, expected-error-re,
> and expected-error-glob? It's only a few extra characters, and much more
> noticeable.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: verify.regex1.patch
Type: application/octet-stream
Size: 24100 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20100426/c7d0a773/attachment.obj>
More information about the cfe-dev
mailing list