[PATCH] Expose the name of the checker producing each diagnostic message.
Jordan Rose
jordan_rose at apple.com
Tue Jan 21 10:00:04 PST 2014
Much better! :-) I wish we could cut down a bit on the copying of the name, but to do that we'd have to rely on the CheckerRegistry always living longer than the diagnostics. We could probably assume that for BugType, though. (If we did that, we'd want to use a wrapper data type so that people didn't accidentally pass random strings.)
At the very least, though, even the combined checkers can use StringRef instead of std::string to track the names of the individual checks.
It might be nice to have a BugType constructor overload that takes a Checker and just immediately calls getCheckerName(), just so 90% the clients could pass "this", but that's getting fairly nitpicky.
I'd also like Ted to at least give a thumbs-up before this goes in.
http://llvm-reviews.chandlerc.com/D2557
More information about the cfe-commits
mailing list