Consolidate most of the integer constant expression builtin requirement
checking into a single function and use that throughout. Remove some
now unnecessary diagnostics and update tests with now more accurate
diagnostics.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101610 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/Sema/builtin-stackaddress.c b/test/Sema/builtin-stackaddress.c
index 1feb57e..29e4e4f 100644
--- a/test/Sema/builtin-stackaddress.c
+++ b/test/Sema/builtin-stackaddress.c
@@ -4,7 +4,7 @@
}
void b(unsigned x) {
-return __builtin_return_address(x); // expected-error{{the level argument for a stack address builtin must be constant}}
+return __builtin_return_address(x); // expected-error{{argument 0 to '__builtin_return_address' must be a constant integer}}
}
void* c(unsigned x) {
@@ -12,5 +12,5 @@
}
void d(unsigned x) {
-return __builtin_frame_address(x); // expected-error{{the level argument for a stack address builtin must be constant}}
+return __builtin_frame_address(x); // expected-error{{argument 0 to '__builtin_frame_address' must be a constant integer}}
}