This is an archive of the discontinued LLVM Phabricator instance.

[clangd] Assert that the testcases in FindExplicitReferencesTest.All have no diagnostics
ClosedPublic

Authored by nridge on Jan 7 2020, 11:47 AM.

Diff Detail

Event Timeline

nridge created this revision.Jan 7 2020, 11:47 AM
Herald added a project: Restricted Project. · View Herald TranscriptJan 7 2020, 11:47 AM

Unit tests: unknown.

clang-tidy: unknown.

clang-format: unknown.

Build artifacts: diff.json, console-log.txt

ilya-biryukov requested changes to this revision.Jan 7 2020, 11:20 PM
ilya-biryukov added inline comments.
clang-tools-extra/clangd/unittests/FindTargetTests.cpp
571

ADD_FAILURE() should be enough to indicate there are errors to the users.
No need to crash additionally.

Could you remove this assert?

751

Could we assert there are no errors instead?
Having warnings is totally fine and allows to avoid changing testcases (like this one)

This revision now requires changes to proceed.Jan 7 2020, 11:20 PM
nridge updated this revision to Diff 237193.Jan 9 2020, 2:03 PM

Address review comments

Unit tests: pass. 61726 tests passed, 0 failed and 779 were skipped.

clang-tidy: fail. Please fix clang-tidy findings.

clang-format: pass.

Build artifacts: diff.json, clang-tidy.txt, clang-format.patch, CMakeCache.txt, console-log.txt, test-results.xml

ilya-biryukov accepted this revision.Jan 9 2020, 11:10 PM

LGTM, thanks!

clang-tools-extra/clangd/unittests/FindTargetTests.cpp
898

NIT: is this change redundant now? This was probably a warning, not an error.

This revision is now accepted and ready to land.Jan 9 2020, 11:10 PM
nridge updated this revision to Diff 237570.Jan 12 2020, 7:18 PM
nridge marked 2 inline comments as done.

Address nit

clang-tools-extra/clangd/unittests/FindTargetTests.cpp
898

You're right, reverted this change.

This revision was automatically updated to reflect the committed changes.

Unit tests: pass. 61771 tests passed, 0 failed and 780 were skipped.

clang-tidy: pass.

clang-format: pass.

Build artifacts: diff.json, clang-tidy.txt, clang-format.patch, CMakeCache.txt, console-log.txt, test-results.xml