[cfe-dev] Patch to fix negative test cases (expected-error / expected-warning)
Justin Handville
uniheliodem at gmail.com
Sat Sep 15 17:15:12 PDT 2007
The ExpectedStr search was starting at the end of the comment string.
This patch starts the search at the beginning of the comment string.
After applying this patch, clang -parse-ast-check on negative test
case source files worked as expected.
Index: Driver/DiagChecker.cpp
===================================================================
--- Driver/DiagChecker.cpp (revision 41992)
+++ Driver/DiagChecker.cpp (working copy)
@@ -51,7 +51,7 @@
const char * const ExpectedStr) {
// Find all expected diagnostics
typedef std::string::size_type size_type;
- size_type ColNo = std::string::npos;
+ size_type ColNo = 0;
for (;;) {
ColNo = Comment.find(ExpectedStr, ColNo);
More information about the cfe-dev
mailing list