-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Fix for MISRA rule 4.1 to avoid false positives for octal escape sequ… #2215
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…ences less than 3 octal digits and hexadecimal escape sequences less than 2 hexadecimal digits (ticket #9370). Add end of sequence check for single quoted sequences. Add compliant and non-compliant test cases for short escape sequences.
|
Based on the discussion of development thread started by Richard Smith i created the changes for this pull request. |
|
I just saw that there is another pull request #2216 with a fix for ticket #9370. |
|
I see some problems with parsing expressions that contains 2+ digits, e.g. following examples will cause FP: int c41_12 = '\12323';
int c41_13 = '\1232\3'; |
|
Based on discussion on #2216 i checked the fix against the following code and got the expected result. I agree, some of the checks should be added to test file. |
Add non-assignment test cases for MISRA rule 4.1.
|
Checked fix against strings which contains simple escape sequences (especially Test lines: |
|
I merged the other PR... please update this now. |
OK, fine. |
|
ok. |
|
thanks for your work. if you think the other pr should be tweaked somehow let me know. |
…ences less than 3 octal digits and hexadecimal escape sequences less than 2 hexadecimal digits (ticket #9370).
Add end of sequence check for single quoted sequences.
Add compliant and non-compliant test cases for short escape sequences.