From 35fe9a0c1e52c387dfadabafa4b2d26761595786 Mon Sep 17 00:00:00 2001 From: Alp Toker Date: Sun, 26 Jan 2014 05:07:32 +0000 Subject: ARCMigrate: Introduce proper diagnostics for TransformActions This starts to switch ARCMT to use proper diagnostic messages. The old use was based on incorrect example code from the documentation. The logic of the previous report() functions has been retained to support any external consumers that might be intercepting diagnostic messages through the old interface. Note that the change in test/Misc/warning-flags.c isn't a new warning without a flag, rather one that was previously invisible to the test. Adding a flag might be a good idea though. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@200124 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/clang/Basic/DiagnosticCommonKinds.td | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'include/clang/Basic/DiagnosticCommonKinds.td') diff --git a/include/clang/Basic/DiagnosticCommonKinds.td b/include/clang/Basic/DiagnosticCommonKinds.td index 152b37c4cf..09d43f382b 100644 --- a/include/clang/Basic/DiagnosticCommonKinds.td +++ b/include/clang/Basic/DiagnosticCommonKinds.td @@ -135,4 +135,14 @@ def err_unable_to_make_temp : Error< // Modules def err_module_file_conflict : Error<"module '%0' found in both '%1' and '%2'">; +// TransformActions +// TODO: Use a custom category name to distinguish rewriter errors. +def err_mt_message : Error<"[rewriter] %0">; +def warn_mt_message : Warning<"[rewriter] %0">; +def note_mt_message : Note<"[rewriter] %0">; + +// ARCMigrate +def err_arcmt_nsalloc_realloc : Error<"[rewriter] call returns pointer to GC managed memory; it will become unmanaged in ARC">; +def err_arcmt_nsinvocation_ownership : Error<"NSInvocation's %0 is not safe to be used with an object with ownership other than __unsafe_unretained">; + } -- cgit v1.2.3