[PATCH] D55382: Make -Wstring-plus-int warns even if when the result is not out of bounds
Douglas Yung via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Dec 13 16:57:31 PST 2018
dyung added a comment.
In D55382#1330668 <https://reviews.llvm.org/D55382#1330668>, @anemet wrote:
> Actually this has been failing for 8 hours. So reverted in r349117. Also reverted your attempt to update the test. It wasn't updating the right test: r349118
And I was just about to commit what I think is the work-around for this failure!
Like Adam pointed out, your fix in r349118 was not updating the correct test and caused an additional failure.
I was able to get the test passing by adding a flag to suppress the warning that you added here. I changed line 54 in test_diagnostics.py to be the following:
def test_diagnostic_range(self):
tu = get_tu(source='void f() { int i = "a" + 1; }', flags=["-Wno-string-plus-int"]) # <-- This is line 54 that was changed.
self.assertEqual(len(tu.diagnostics), 1)
If you apply that fix, the output should be as it originally was and the test passes.
Repository:
rL LLVM
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D55382/new/
https://reviews.llvm.org/D55382
More information about the llvm-commits
mailing list