This is an archive of the discontinued LLVM Phabricator instance.

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

Authored by nridge on Jan 1 2020, 10:14 PM.

Details

Summary

Also fix some bugs in the testcases which this exposed.

Diff Detail

Event Timeline

nridge created this revision.Jan 1 2020, 10:14 PM
Herald added a project: Restricted Project. · View Herald TranscriptJan 1 2020, 10:14 PM

Unit tests: pass. 61162 tests passed, 0 failed and 728 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

thanks for taking a look at this!

clang-tools-extra/clangd/unittests/XRefsTests.cpp
432

nit: I would rather turn this into a declaration.

517

could we rather move these cases into a new test case?

in order to prevent accidental reliance on these flags when adding new tests.

521

use ADD_FAILURE instead.

nridge updated this revision to Diff 235970.Jan 2 2020, 4:47 PM
nridge marked 3 inline comments as done.

Address review comments

Unit tests: pass. 61163 tests passed, 0 failed and 728 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

kadircet accepted this revision.Jan 3 2020, 12:21 AM

Thanks!

clang-tools-extra/clangd/unittests/XRefsTests.cpp
519

nit: I would rather keep the loop and just use ADD_FAILURE() instead of llvm::errs().

573

nit: this one can be dropped.

577

nit: this looks like an overkill to me, in the end we are trying to test hover behavior, not diagnostics. I would drop the whole loop here.

This revision is now accepted and ready to land.Jan 3 2020, 12:21 AM
nridge updated this revision to Diff 236608.Jan 7 2020, 9:07 AM
nridge marked an inline comment as done.

Address nits

This revision was automatically updated to reflect the committed changes.

Unit tests: pass. 61301 tests passed, 0 failed and 736 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