Commit Graph

9 Commits

Author SHA1 Message Date
Becca Royal-Gordon
0466d5c0ca Handle diagnostic verifier locations concretely
This commit makes a number of adjustments to how the diagnostic verifier handles source buffers and source locations. Specifically:

• Files named by `-verify-additional-file` are read as late as possible so that if some other component of the compiler has already loaded the file, even in some exotic way (e.g. ClangImporter’s source buffer mirroring), it will use the same buffer.
• Expectation source locations now ignore virtual files and other trickery; they are based on the source buffer and physical location in the file.

Hopefully this will make `-verify-additional-file` work better on Windows. As an unintended side effect, it also changes how expectations work in tests that use `#sourceLocation()`.
2025-02-11 12:05:17 -08:00
Jordan Rose
0d054fbd3c Honor #sourceLocation filenames in serialized diagnostics
I'm not sure why we never handled this. Oops.

rdar://problem/43647151
2018-08-28 11:24:11 -07:00
David Farler
b7d17b25ba Rename -parse flag to -typecheck
A parse-only option is needed for parse performance tracking and the
current option also includes semantic analysis.
2016-11-28 10:50:55 -08:00
Brian Gesiak
926bdfd5ff [test] Remove extra -serialize-diagnostics
The `-serialize-diagnostics-path` option implies
`-serialize-diagnostics`; there's no point in specifying both. Remove
the extra flags from the tests.
2016-09-17 14:04:11 -04:00
Dmitri Gribenko
d175b3b66d Migrate FileCheck to %FileCheck in tests 2016-08-10 23:52:02 -07:00
Chris Lattner
ada5487153 add fixit tests to random other tests.
Swift SVN r31006
2015-08-04 20:35:36 +00:00
Dmitri Hrybenko
3b04d1b013 tests: reorganize tests so that they actually use the target platform
Most tests were using %swift or similar substitutions, which did not
include the target triple and SDK.  The driver was defaulting to the
host OS.  Thus, we could not run the tests when the standard library was
not built for OS X.

Swift SVN r24504
2015-01-19 06:52:49 +00:00
Ted Kremenek
fad874708e Adjust test cases.
Swift SVN r17964
2014-05-12 22:01:52 +00:00
Ted Kremenek
14c333ac0e Add test case for serialized diagnostics.
This depends on c-index-test being available in the path.
This should work for CMake builds where swift is built
in its own build folder.  I believe this will also work
for Makefile builds, but the buildbot will verify.

Swift SVN r5562
2013-06-10 21:52:21 +00:00