cling/test/Pragmas/load.C
Axel Naumann 608a992e5f Fix expected diags in test/Pragmas/load.C:
A failure to load the library will *not* trigger loading the
same file as a source file: `#pragma load` will cause zero or
one diagnostics, not two.

Now that the diagnostic for a missing file to be `#pragma load`ed
is "file not found", re-use the existing `expected-error@input_line_12`
line!.
2021-03-16 09:59:03 +01:00

20 lines
814 B
C

//------------------------------------------------------------------------------
// CLING - the C++ LLVM-based InterpreterG :)
//
// This file is dual-licensed: you can choose to license it under the University
// of Illinois Open Source License or the GNU Lesser General Public License. See
// LICENSE.TXT for details.
//------------------------------------------------------------------------------
// RUN: clang -shared -DCLING_EXPORT=%dllexport %S/call_lib.c -o%T/libcall_lib%shlibext
// RUN: cat %s | %cling -L %T -Xclang -verify 2>&1 | FileCheck %s
#pragma cling load("DoesNotExistPleaseRecover")
// expected-error@input_line_12:1{{'DoesNotExistPleaseRecover' file not found}}
#pragma cling load("libcall_lib")
extern "C" int cling_testlibrary_function();
cling_testlibrary_function()
// CHECK: (int) 66