Fixed #3132 (Analysis failed. If the code is valid then please report this failure.)
This commit is contained in:
parent
155eeb8e0a
commit
bc74213036
|
@ -4963,7 +4963,7 @@ void Tokenizer::removeRedundantCodeAfterReturn()
|
|||
}
|
||||
else
|
||||
{
|
||||
if (indentcase >= indentret && indentlevel > indentlabel)
|
||||
if (indentcase > indentret && indentlevel > indentlabel)
|
||||
{
|
||||
tok = tok->previous();
|
||||
tok->deleteNext();
|
||||
|
|
|
@ -5929,6 +5929,8 @@ private:
|
|||
|
||||
ASSERT_EQUALS("int f ( int n ) { switch ( n ) { case 0 : return 0 ; default : ; return n ; } return -1 ; }",
|
||||
tokenizeAndStringify("int f(int n) { switch (n) {case 0: return 0; n*=2; default: return n; n*=6;} return -1; foo();}"));
|
||||
//ticket #3132
|
||||
ASSERT_EQUALS("void f ( int i ) { goto label ; switch ( i ) { label : ; return ; } }",tokenizeAndStringify("void f (int i) { goto label; switch(i) { label: return; } }"));
|
||||
|
||||
{
|
||||
const char code[] = "void f(){ "
|
||||
|
|
Loading…
Reference in New Issue