[cfe-dev] Diagnostic-printing an ObjC class name without quotes
jediknil at belkadan.com
Sat May 12 10:41:39 PDT 2012
For r156713 and r156717, I merged several ObjC boxed expression checks into a single bug type, err_undeclared_boxing_method ("declaration of %0 is missing in %1 class"). The problem was that the second diagnostic argument is always a well-known class (currently NSString, NSNumber, NSArray, or NSDictionary). The old (hard-coded) diagnostics don't put quotes around the class name, and I think that's the right decision -- it's not a user-chosen type, but almost a part of the language.
My question: directly using << with the ObjCInterfaceDecl /does/ print the name with quotes. I used getName() to get around this, since ObjCInterfaceDecls always have simple names, but is there a better way to do this? (There doesn't seem to be a quotes/no-quotes modifier for diagnostic placeholders.)
More information about the cfe-dev