Merge all the 'assignment' diagnostic code into one routine, decloning
it from several places. This merges the diagnostics, making them more
uniform and fewer in number. This also simplifies and cleans up the code.
Some highlights:
1. This removes a bunch of very-similar diagnostics.
2. This renames AssignmentCheckResult -> AssignConvertType
3. This merges PointerFromInt + IntFromPointer which were always treated the same.
4. This updates a bunch of test cases that have minor changes to the produced diagnostics.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45589 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/Sema/builtins.c b/test/Sema/builtins.c
index 997a8ed..59a339a 100644
--- a/test/Sema/builtins.c
+++ b/test/Sema/builtins.c
@@ -1,4 +1,4 @@
-// RUN: clang %s -fsyntax-only -verify
+// RUN: clang %s -fsyntax-only -verify -pedantic
int test1(float a, int b) {
return __builtin_isless(a, b);
@@ -26,8 +26,7 @@
void cfstring() {
CFSTR("\242"); // expected-warning {{ CFString literal contains non-ASCII character }}
CFSTR("\0"); // expected-warning {{ CFString literal contains NUL character }}
- CFSTR(242); // expected-error {{ CFString literal is not a string constant }} \
- expected-warning {{incompatible types}}
+ CFSTR(242); // expected-error {{ CFString literal is not a string constant }} expected-warning {{incompatible pointer/int conversion}}
CFSTR("foo", "bar"); // expected-error {{ error: too many arguments to function }}
}