summaryrefslogtreecommitdiffstats
path: root/clang/test/SemaCXX/nested-name-spec.cpp
diff options
context:
space:
mode:
authorHans Wennborg <hans@hanshq.net>2013-12-11 23:40:50 +0000
committerHans Wennborg <hans@hanshq.net>2013-12-11 23:40:50 +0000
commitcda4b6dd007c4726f36f4cd24271b49cc19f1f5a (patch)
treee6ce6c3b704e3032a58fac25b81be60e467c3d60 /clang/test/SemaCXX/nested-name-spec.cpp
parent6030c84a2fc1b6f84494807d27bc96d8f522b5c0 (diff)
downloadbcm5719-llvm-cda4b6dd007c4726f36f4cd24271b49cc19f1f5a.tar.gz
bcm5719-llvm-cda4b6dd007c4726f36f4cd24271b49cc19f1f5a.zip
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
Diffstat (limited to 'clang/test/SemaCXX/nested-name-spec.cpp')
-rw-r--r--clang/test/SemaCXX/nested-name-spec.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/test/SemaCXX/nested-name-spec.cpp b/clang/test/SemaCXX/nested-name-spec.cpp
index f1f9bbb507f..a0bac059a20 100644
--- a/clang/test/SemaCXX/nested-name-spec.cpp
+++ b/clang/test/SemaCXX/nested-name-spec.cpp
@@ -143,7 +143,7 @@ namespace A {
void g(int&); // expected-note{{type of 1st parameter of member declaration does not match definition ('int &' vs 'const int &')}}
}
-void A::f() {} // expected-error-re{{out-of-line definition of 'f' does not match any declaration in namespace 'A'$}}
+void A::f() {} // expected-error-re{{out-of-line definition of 'f' does not match any declaration in namespace 'A'{{$}}}}
void A::g(const int&) { } // expected-error{{out-of-line definition of 'g' does not match any declaration in namespace 'A'}}
OpenPOWER on IntegriCloud