Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(595)

Unified Diff: runtime/vm/parser.h

Issue 10869063: Add attributions so printf like functions can have their arguments checked. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: rebased Created 8 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/vm/pages.cc ('k') | runtime/vm/parser.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/parser.h
diff --git a/runtime/vm/parser.h b/runtime/vm/parser.h
index 8faf45268c85fea89935171325cf58676f230e8f..52f0b175d9fe0f24fceea06d92a70854ade828a4 100644
--- a/runtime/vm/parser.h
+++ b/runtime/vm/parser.h
@@ -126,7 +126,7 @@ class Parser : public ValueObject {
static void PrintMessage(const Script& script,
intptr_t token_pos,
const char* message_header,
- const char* format, ...);
+ const char* format, ...) PRINTF_ATTRIBUTE(4, 5);
// Build an error object containing a formatted error or warning message.
// A null script means no source and a negative token_pos means no position.
@@ -253,20 +253,23 @@ class Parser : public ValueObject {
va_list args);
// Reports error/warning message at location of current token.
- void ErrorMsg(const char* msg, ...);
- void Warning(const char* msg, ...);
+ void ErrorMsg(const char* msg, ...) PRINTF_ATTRIBUTE(2, 3);
+ void Warning(const char* msg, ...) PRINTF_ATTRIBUTE(2, 3);
void Unimplemented(const char* msg);
// Reports error message at given location.
- void ErrorMsg(intptr_t token_pos, const char* msg, ...);
- void Warning(intptr_t token_pos, const char* msg, ...);
+ void ErrorMsg(intptr_t token_pos, const char* msg, ...)
+ PRINTF_ATTRIBUTE(3, 4);
+ void Warning(intptr_t token_pos, const char* msg, ...)
+ PRINTF_ATTRIBUTE(3, 4);
// Reports an already formatted error message.
void ErrorMsg(const Error& error);
// Concatenates two error messages, the previous and the current one.
void AppendErrorMsg(
- const Error& prev_error, intptr_t token_pos, const char* format, ...);
+ const Error& prev_error, intptr_t token_pos, const char* format, ...)
+ PRINTF_ATTRIBUTE(4, 5);
const Instance& EvaluateConstExpr(AstNode* expr);
AstNode* RunStaticFieldInitializer(const Field& field);
« no previous file with comments | « runtime/vm/pages.cc ('k') | runtime/vm/parser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698