<HTML><BODY style="word-wrap: break-word; -khtml-nbsp-mode: space; -khtml-line-break: after-white-space; "><BR><DIV><DIV>On Aug 27, 2007, at 9:16 PM, Steve Naroff wrote:</DIV><BR class="Apple-interchange-newline"><BLOCKQUOTE type="cite"><BR><DIV><DIV>On Aug 27, 2007, at 9:06 PM, Chris Lattner wrote:</DIV><BR class="Apple-interchange-newline"><BLOCKQUOTE type="cite"><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">+/// <SPAN class="Apple-converted-space">  </SPAN>objc-type-qualifier: one of</DIV> <BLOCKQUOTE type="cite"><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">+/// <SPAN class="Apple-converted-space">    </SPAN>in out inout bycopy byref oneway</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">+///</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">+/// <SPAN class="Apple-converted-space">  </SPAN>FIXME: remove the string compares...</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">+bool Parser::isObjCTypeQualifier() {</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">+<SPAN class="Apple-converted-space">  </SPAN>if (Tok.getKind() == tok::identifier) {</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">+<SPAN class="Apple-converted-space">    </SPAN>const char *qual = Tok.getIdentifierInfo()->getName();</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">+<SPAN class="Apple-converted-space">    </SPAN>return (strcmp(qual, "in") == 0) || (strcmp(qual, "out") == 0) ||</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">+ <SPAN class="Apple-converted-space">          </SPAN>(strcmp(qual, "inout") == 0) || (strcmp(qual, "oneway") == 0) ||</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">+ <SPAN class="Apple-converted-space">          </SPAN>(strcmp(qual, "bycopy") == 0) || (strcmp(qual, "byref") == 0);</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">+<SPAN class="Apple-converted-space">  </SPAN>}</DIV> </BLOCKQUOTE><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; min-height: 14px; "><BR></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">Ouch :)</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; min-height: 14px; "><BR></DIV></BLOCKQUOTE><DIV><BR class="khtml-block-placeholder"></DIV>Understood. This is temporary (hence the FIXME above).</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>The solution you outline below sounds fine with me...</DIV></BLOCKQUOTE></DIV><BR><DIV>Sounds good.  The other way to do it would be to add yet-another bitfield to <FONT class="Apple-style-span" face="Monaco" size="2"><SPAN class="Apple-style-span" style="font-size: 10px;">IdentifierInfo to hold these, similar to PPKeywordKind/ObjCKeywordKind etc, but this is fairly special purpose, so using a small table is probably better.  *shrug*</SPAN></FONT></DIV><DIV><FONT class="Apple-style-span" face="Monaco" size="2"><SPAN class="Apple-style-span" style="font-size: 10px;"><BR class="khtml-block-placeholder"></SPAN></FONT></DIV><DIV><FONT class="Apple-style-span" face="Monaco" size="2"><SPAN class="Apple-style-span" style="font-size: 10px;">-Chris</SPAN></FONT></DIV></BODY></HTML>