[PATCH] D107049: [clang-repl] Re-implement clang-interpreter as a test case.
Nico Weber via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Sep 1 05:28:31 PDT 2021
thakis added a comment.
Herald added a subscriber: ormris.
The test fails for me on macOS (normal cmake build):
% tools/clang/unittests/Interpreter/ExceptionTests/ClangReplInterpreterExceptionTests
[==========] Running 1 test from 1 test suite.
[----------] Global test environment set-up.
[----------] 1 test from InterpreterTest
[ RUN ] InterpreterTest.CatchException
In file included from <<< inputs >>>:1:
input_line_0:2:10: fatal error: 'stdexcept' file not found
#include <stdexcept>
^~~~~~~~~~~
The reason is probably that C++ stdlib headers are part of the toolchain, not the sysroot, on macOS. So self-built clang can't include libc++(abi) headers without some hoops.
Tests should generally be standalone though anyways. Can we remove these includes and just throw some basic type?
Finally, hardcoding the path between unit test binary and the rest of the build dir is fairly unusual. Can't this be a lit-style test that uses the normal substitution logic we use in lit?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D107049/new/
https://reviews.llvm.org/D107049
More information about the cfe-commits
mailing list