mirror of
https://github.com/llvm/llvm-project.git
synced 2025-04-27 14:26:09 +00:00

The ARM _MoveToCoprocessor and _MoveFromCoprocessor builtins require integer constants for most arguments, but clang was not checking that. With this change, we now report meaningful errors instead of crashing in the backend. llvm-svn: 240463
10 lines
453 B
C
10 lines
453 B
C
// RUN: %clang_cc1 -triple armv7 -fms-extensions -fsyntax-only -ffreestanding -verify %s
|
|
|
|
unsigned int test_MoveFromCoprocessor(const unsigned int value) {
|
|
return _MoveFromCoprocessor(value, 1, 2, 3, 4); // expected-error-re {{argument to {{.*}} must be a constant integer}}
|
|
}
|
|
|
|
void test_MoveToCoprocessor(const unsigned int value) {
|
|
_MoveToCoprocessor(1, 2, value, 3, 4, 5); // expected-error-re {{argument to {{.*}} must be a constant integer}}
|
|
}
|