[PATCH] Add support for unroll pragma
Aaron Ballman
aaron.ballman at gmail.com
Mon Jul 21 08:37:43 PDT 2014
On Fri, Jul 18, 2014 at 1:54 PM, Mark Heffernan <meheff at google.com> wrote:
> Ping? Aaron, any more comments on this?
Tiny nits.
> + // Return a string suitable for identifying this attribute in diagnostics.
> + std::string getDiagnosticName() const {
> + unsigned SpellingIndex = getSpellingListIndex();
> + if (SpellingIndex == Pragma_unroll && option == Unroll)
> + return "#pragma unroll";
> + else if (SpellingIndex == Pragma_unroll && option == UnrollCount) {
> + std::string DiagnosticName = "#pragma unroll";
> + return DiagnosticName + getValueString();
No need for the std::string declaration.
> + } else {
> + assert(SpellingIndex == Pragma_clang_loop && "Unexpected spelling");
> + std::string DiagnosticName = getOptionName(option);
> + return DiagnosticName + getValueString();
Same here.
> + }
LGTM!
~Aaron
More information about the cfe-commits
mailing list