This is an archive of the discontinued LLVM Phabricator instance.

[lldb] Disable auto fix-its when evaluating expressions in the test suite
ClosedPublic

Authored by teemperor on Feb 21 2020, 4:52 AM.

Details

Summary

Currently the test suite runs with enabled automatically applied Clang fix-its for expressions.
This is causing that sometimes incorrect expressions in tests are still evaluated even though they
are actually incorrect. Let's disable this feature in the test suite so that we know when expressions
are wrong and leave the fix-it testing to the dedicated tests for that feature.

Also updates the lang/cpp/operators/ test as it seems Clang needs the struct keywords
before C and would otherwise fail without fixits.

Diff Detail

Event Timeline

teemperor created this revision.Feb 21 2020, 4:52 AM
Herald added a project: Restricted Project. · View Herald TranscriptFeb 21 2020, 4:52 AM
shafik accepted this revision.Feb 21 2020, 6:53 AM
shafik added a subscriber: shafik.

LGTM outside of my comments

lldb/packages/Python/lldbsuite/test/lldbtest.py
2404

Should this be False or is the comment incorrect?

lldb/test/API/lang/cpp/operators/main.cpp
174

This is puzzling, I don't know why we need the struct for I don't see why an elborated type specifier is required here.

This revision is now accepted and ready to land.Feb 21 2020, 6:53 AM
teemperor updated this revision to Diff 245846.Feb 21 2020, 7:05 AM
  • Revert dummy change that set auto-apply fixits to true (thanks Shafik!)
teemperor marked 3 inline comments as done.Feb 21 2020, 7:15 AM
teemperor added inline comments.
lldb/packages/Python/lldbsuite/test/lldbtest.py
2404

True (heh), I changed that to false as some tests were failing in very unexpected ways on my system with this patch and I wanted to double check that it's not the fixits. Forgot to change this line back afterwards :(

lldb/test/API/lang/cpp/operators/main.cpp
174

I remember I was confused about this when I wrote the line below as Clang forced me to add the 'struct' (as apparently there Clang wasn't smart enough for the automatic fixit). I didn't investigate back then as I already had enough on my plate but with some luck that's an easy fix (maybe we get some language option wrong?).

JDevlieghere accepted this revision.Feb 21 2020, 4:31 PM
This revision was automatically updated to reflect the committed changes.
teemperor marked an inline comment as done.