[PATCH] Allow multiple check prefixes in FileCheck
Daniel Sanders
daniel.sanders at imgtec.com
Tue Oct 8 03:15:22 PDT 2013
You've resolved all my comments and I'm happy that it should work. However, it seems to introduce some failures in clang and compiler-rt that do not appear before applying your patch (tested with r192177).
Failing Tests (9):
Clang :: CodeGenCXX/debug-info-decl-nested.cpp
Clang :: Lexer/builtin_redef.c
UndefinedBehaviorSanitizer :: Integer/add-overflow.cpp
UndefinedBehaviorSanitizer :: Integer/negate-overflow.cpp
UndefinedBehaviorSanitizer :: Integer/no-recover.cpp
UndefinedBehaviorSanitizer :: Integer/sub-overflow.cpp
UndefinedBehaviorSanitizer :: Integer/uadd-overflow.cpp
UndefinedBehaviorSanitizer :: Integer/usub-overflow.cpp
UndefinedBehaviorSanitizer :: TypeCheck/misaligned.cpp
The failing tests all seem to involve @LINE expressions whose value is off by one, but that isn't the whole story since a number of tests involving @LINE are passing.
================
Comment at: utils/FileCheck/FileCheck.cpp:1182
@@ +1181,3 @@
+static bool ValidateCheckPrefixes() {
+ StringSet<> PrefixSet;
+
----------------
Matt Arsenault wrote:
> Daniel Sanders wrote:
> > What is this variable for? I can only see strings being added to it. There doesn't seem to be anything reading from this variable.
> It makes sure you don't specify the same prefix multiple times. It's read from when it checks if the insert succeeds.
I see now. Thanks
================
Comment at: utils/FileCheck/FileCheck.cpp:930-936
@@ -816,7 +929,9 @@
+ // prefix as a filler for the error message.
if (!DagNotMatches.empty()) {
CheckStrings.push_back(CheckString(Pattern(Check::CheckEOF),
+ CheckPrefixes[0],
SMLoc::getFromPointer(Buffer.data()),
Check::CheckEOF));
std::swap(DagNotMatches, CheckStrings.back().DagNotStrings);
}
----------------
Matt Arsenault wrote:
> Daniel Sanders wrote:
> > This if-statement is making CheckStrings non-empty which inhibits the 'no check strings found' even when no check-strings are found.
> No, this isn't a problem since If DagNotMatches is not empty, then CheckStrings is also not empty.
You're right. Thanks
http://llvm-reviews.chandlerc.com/D1374
More information about the llvm-commits
mailing list