[cfe-commits] LLParser::ParseCmpPredicate TokError falls through

David Tweed David.Tweed at arm.com
Fri Jan 4 05:54:25 PST 2013


Sorry: I'm all over the codebase these days and didn't think about it. This is an LLVM issue not a clang one, I'll repost there.
________________________________________
From: cfe-commits-bounces at cs.uiuc.edu [cfe-commits-bounces at cs.uiuc.edu] On Behalf Of David Tweed [David.Tweed at arm.com]
Sent: Friday, January 04, 2013 1:24 PM
To: cfe-commits at cs.uiuc.edu
Subject: [cfe-commits] LLParser::ParseCmpPredicate TokError falls through

Hi,

LLParser::ParseCmpPredicate has two uses of TokError in a switch which, currently, fall through so an invalid cmp operand can becomes a valid, different parse. I don't really understand the big picture of the codeI can fix that either by doing "return TokError(...)" or adding a break. Using a break will result in a call of Lex.Lex() which there isn't in the return case. I can't tell any difference in testing, I think "return" is the right solution but can I just check that's not breaking some subtle parsing invariant? If it's the best solution, I'll roll up a patch and a test and commit.

Cheers,
Dave

-- IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium.  Thank you.


_______________________________________________
cfe-commits mailing list
cfe-commits at cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits


-- IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium.  Thank you.





More information about the cfe-commits mailing list