inconsistent with the type that the builtin *should* have, forget about the builtin altogether: we don't want subsequence analyses, CodeGen, etc., to think that we have a proper builtin function. C is protected from errors here because it allows one to use a library builtin without having a declaration, and detects inconsistent (re-)declarations of builtins during declaration merging. C++ was unprotected, and therefore would crash. Fixes PR8839. llvm-svn: 122351
10 lines
166 B
C++
10 lines
166 B
C++
// RUN: %clang_cc1 -emit-llvm -o - %s | FileCheck %s
|
|
|
|
// PR8839
|
|
extern "C" char memmove();
|
|
|
|
int main() {
|
|
// CHECK: call signext i8 @memmove()
|
|
return memmove();
|
|
}
|