llvm-project/clang/test/CXX
Hans Wennborg cda4b6dd00 Change semantics of regex expectations in the diagnostic verifier
Previously, a line like

  // expected-error-re {{foo}}

treats the entirety of foo as a regex. This is inconvenient when matching type
names containing regex characters. For example, to match
"void *(class test8::A::*)(void)" inside such a regex, one would have to type
"void \*\(class test8::A::\*\)\(void\)".

This patch changes the semantics of expected-error-re to only treat the parts
of the directive wrapped in double curly braces as regexes. This avoids the
escaping problem and leads to nicer patterns for those cases; see e.g. the
change to test/Sema/format-strings-scanf.c.

(The balanced search for closing }} of a directive also makes us handle the
full directive in test\SemaCXX\constexpr-printing.cpp:41 and :53.)

Differential Revision: http://llvm-reviews.chandlerc.com/D2388

llvm-svn: 197092
2013-12-11 23:40:50 +00:00
..
basic Added warning on structures/unions that are empty or contain only 2013-11-14 02:13:03 +00:00
class Implement DR1460: fix handling of default initializers in unions; don't allow 2013-12-10 08:25:00 +00:00
class.access Issue a diagnostic if we see a templated friend declaration that we do not 2013-11-08 18:59:56 +00:00
class.derived Implement final resolution of DR1402: implicitly-declared move operators that 2013-11-04 01:48:18 +00:00
conv Prior to adding the new "expected-no-diagnostics" directive to VerifyDiagnosticConsumer, make the necessary adjustment to 580 test-cases which will henceforth require this new directive. 2012-10-19 12:44:48 +00:00
dcl.dcl Change semantics of regex expectations in the diagnostic verifier 2013-12-11 23:40:50 +00:00
dcl.decl Implement DR482: namespace members can be redeclared with a qualified name 2013-12-05 07:51:02 +00:00
drs Change semantics of regex expectations in the diagnostic verifier 2013-12-11 23:40:50 +00:00
except Take cv-qualifiers on fields of class type into account when determining 2013-11-25 07:07:05 +00:00
expr Delete the now unnecessary test/generic-lambda-unimplemented-1y.cpp 2013-12-07 20:57:51 +00:00
lex Add a triple to unbreak buildbots where size_t is not 'unsigned long'. 2013-10-07 22:58:25 +00:00
over Don't produce duplicate notes if we have deduction failure notes when resolving 2013-08-14 00:00:44 +00:00
special Change semantics of regex expectations in the diagnostic verifier 2013-12-11 23:40:50 +00:00
stmt.stmt Add -Wdeprecated warnings and fixits for things deprecated in C++11: 2013-06-13 02:02:51 +00:00
temp Give a more appropriate diagnostic when a template specialization or 2013-12-07 05:09:50 +00:00