diff options
author | Richard Smith <richard-llvm@metafoo.co.uk> | 2016-06-23 19:02:52 +0000 |
---|---|---|
committer | Richard Smith <richard-llvm@metafoo.co.uk> | 2016-06-23 19:02:52 +0000 |
commit | 03a4aa3d0069be59b72e0e3528eca356b09d312e (patch) | |
tree | 69f664b5bf9bdf4cfe0cb6b55cd9415b94a9388b /clang/test/FixIt/fixit-vexing-parse.cpp | |
parent | 2cd2a18a9f14fbcb7364786d058caafdb359f523 (diff) | |
download | bcm5719-llvm-03a4aa3d0069be59b72e0e3528eca356b09d312e.tar.gz bcm5719-llvm-03a4aa3d0069be59b72e0e3528eca356b09d312e.zip |
Re-commit r273548, reverted in r273589, with a fix to not produce
-Wfor-loop-analysis warnings for a for-loop with a condition variable. In such
a case, the loop condition variable is modified on each iteration of the loop
by definition.
Original commit message:
Rearrange condition handling so that semantic checks on a condition variable
are performed before the other substatements of the construct are parsed,
rather than deferring them until the end. This allows better error recovery
from semantic errors in the condition, improves diagnostic order, and is a
prerequisite for C++17 constexpr if.
llvm-svn: 273600
Diffstat (limited to 'clang/test/FixIt/fixit-vexing-parse.cpp')
-rw-r--r-- | clang/test/FixIt/fixit-vexing-parse.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/test/FixIt/fixit-vexing-parse.cpp b/clang/test/FixIt/fixit-vexing-parse.cpp index 0232f5dbb04..71d3eff5329 100644 --- a/clang/test/FixIt/fixit-vexing-parse.cpp +++ b/clang/test/FixIt/fixit-vexing-parse.cpp @@ -60,7 +60,7 @@ namespace N { VO m(int (*p)[4]); // Don't emit warning and fixit because direct initializer is not permitted here. - if (int n(int())){} // expected-error {{function type is not allowed here}} expected-error {{condition must have an initializer}} + if (int n(int())){} // expected-error {{function type is not allowed here}} // CHECK: fix-it:"{{.*}}":{66:8-66:10}:" = {}" U u(); // expected-warning {{function declaration}} expected-note {{replace parentheses with an initializer}} |