QOI: arguments passed/required mismatch diagnostic
| Bugzilla Link | 6501 |
| Resolution | FIXED |
| Resolved on | Apr 15, 2010 23:57 |
| Version | trunk |
| OS | All |
| CC | @echristo |
Extended Description
It would be useful when emitting a diagnostic for "too many/few arguments to {thing} x" that it provide some numbers of what the expected and seen number of arguments were.
Finished off thusly:
[issola:llvm/tools/clang] echristo% svn ci Sending include/clang/Basic/DiagnosticSemaKinds.td Sending lib/Sema/SemaChecking.cpp Sending lib/Sema/SemaExpr.cpp Sending lib/Sema/SemaExprObjC.cpp Transmitting file data .... Committed revision 101442.
Partially fixed thusly:
Sending include/clang/Basic/DiagnosticSemaKinds.td Sending lib/Sema/SemaChecking.cpp Sending lib/Sema/SemaExpr.cpp Sending lib/Sema/SemaExprObjC.cpp Transmitting file data .... Committed revision 101441.
Need to get the "many" part now.
OK. I fixed the last one so here's one:
[ghostwheel:~] echristo% ~/builds/build-llvm/Debug/bin/clang -msse4.1 foo.c -S foo.c:4:37: error: too few arguments to function call return __builtin_ia32_roundss(a, 4); ~~~~~~~~~~~~~~~~~~~~~~ ^ 1 diagnostic generated.
[ghostwheel:~] echristo% cat foo.c #include <smmintrin.h>
__m128i foo (__m128 a, __m128 b) { return __builtin_ia32_roundss(a, 4); }
perhaps a "got 2, expected 3" here would be good?
Please include an example that triggers this warning.