cling/test/Lookup/linkageSpec.C
Frederich Munch 2bf05c5188 Fix extern "C" declarations not being called from .x command.
This handles top-level declarations only (i.e. not nested in namespaces).
2016-09-16 21:39:49 +02:00

23 lines
755 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: %cling %s -Xclang -verify 2>&1 | FileCheck %s
// This test assures that extern "C" declarations are usable via .x
extern "C" int printf(const char*, ...);
extern "C" int linkageSpec() {
printf("linkageSpec called %s\n", __FUNCTION__);
return 101;
}
// CHECK: linkageSpec called linkageSpec
// CHECK: (int) 101
// expected-no-diagnostics