Refactor some attributes to use checkFunctionOrMethodArgumentIndex instead of using custom logic. No functional changes intended.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@187398 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/Sema/attr-format.c b/test/Sema/attr-format.c
index a223e08..21d9585 100644
--- a/test/Sema/attr-format.c
+++ b/test/Sema/attr-format.c
@@ -78,3 +78,5 @@
__attribute__ ((__format__(__gcc_cxxdiag__, 1, 2)));
extern void gcc_tformat (const char *, ...)
__attribute__ ((__format__(__gcc_tdiag__, 1, 2)));
+
+const char *foo3(const char *format) __attribute__((format_arg("foo"))); // expected-error{{'format_arg' attribute requires parameter 1 to be an integer constant}}