Mentions légales du service

Skip to content
Snippets Groups Projects
Commit c4e95c76 authored by Peter Collingbourne's avatar Peter Collingbourne
Browse files

Add a test case for the regression in -Wfor-loop-analysis caused by r273548.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@273590 91177308-0d34-0410-b5e6-96231b3b80d8
parent c52adef5
No related branches found
No related tags found
No related merge requests found
...@@ -260,3 +260,9 @@ void test8() { ...@@ -260,3 +260,9 @@ void test8() {
i--; i--;
} }
} }
int f(int);
void test9() {
// Don't warn when variable is defined by the loop condition.
for (int i = 0; int x = f(i); ++i) {}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment