summaryrefslogtreecommitdiff
path: root/libcpp/include
diff options
context:
space:
mode:
Diffstat (limited to 'libcpp/include')
-rw-r--r--libcpp/include/cpplib.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/libcpp/include/cpplib.h b/libcpp/include/cpplib.h
index 3c4d0d6cb5b..c5d8e85391a 100644
--- a/libcpp/include/cpplib.h
+++ b/libcpp/include/cpplib.h
@@ -435,6 +435,9 @@ struct cpp_options
/* True means return pragmas as tokens rather than processing
them directly. */
bool defer_pragmas;
+
+ /* True means error callback should be used for diagnostics. */
+ bool client_diagnostic;
};
/* Callback for header lookup for HEADER, which is the name of a
@@ -467,6 +470,11 @@ struct cpp_callbacks
int (*valid_pch) (cpp_reader *, const char *, int);
void (*read_pch) (cpp_reader *, const char *, int, const char *);
missing_header_cb missing_header;
+
+ /* Called to emit a diagnostic if client_diagnostic option is true.
+ This callback receives the translated message. */
+ void (*error) (cpp_reader *, int, const char *, va_list)
+ ATTRIBUTE_PRINTF(3,0);
};
/* Chain of directories to look for include files in. */