Hi Aaron,

Thanks for the suggestions again. Here is the updated patch.

#include "clang/AST/Decl.h"
+#include "clang/AST/Expr.h"

This include should not be required here.

This is required to call printPretty on the value _expression_ in LoopHintAttr.

Ugh. That's unfortunate. Perhaps ClangAttrEmitter needs to understand
that some AdditionalMembers are meant for the class declaration
(Attrs.inc), and others are meant for the class definition
(AttrImpl.inc)…

Looks like that might be tricky. I think the easiest way to do that would be to modify tablegen to use an AdditionalMembersImpl field that would contain the implementation of methods defined in the AdditionalMembers field.

I can try to do that before I leave, but with only 2 more days it is unlikely that I will be able to finish it.


I was thinking of parsing nonsense (like a fuzzer):

#pragma clang loop vectorize_width(1+(^*/2 * ()
#pragma clang loop vectorize_width(1+(-0[0]))))))

Just to ensure that we always recover gracefully from crazy input.

I added the suggested tests. No problems.

Tyler

Attachment: loop_hint_constant_expression-svn.patch
Description: Binary data

_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to