summaryrefslogtreecommitdiffstats
path: root/clang/test/SemaCXX/for-range-examples.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Minor tweaks to r229447 to ensure the attribute is properly quoted when ↵Aaron Ballman2015-02-161-2/+2
| | | | | | diagnosed. llvm-svn: 229454
* Sema: diagnose use of unscoped deprecated prior to C++14Saleem Abdulrasool2015-02-161-1/+1
| | | | | | | | | The deprecated attribute was adopted as part of the C++14, however, there is a GNU version available in C++11. When using C++ earlier than C++14, diagnose the use of the attribute without the GNU scope, but only when using the generalised attribute syntax. llvm-svn: 229447
* [c++1z] Remove terse range-based for loops; they've been removed fromRichard Smith2014-11-271-9/+11
| | | | | | consideration for C++17 for now. Update C++ status page to match. llvm-svn: 222865
* Improve error recovery around colon.Serge Pavlov2014-07-161-0/+12
| | | | | | | | | | | | Recognize additional cases, when '::' is mistyped as ':'. This is a fix to RP18587 - colons have too much protection in member-declarations Review is tracked by http://reviews.llvm.org/D3653. This is an attempt to recommit the fix, initially committed as r212957 but then reverted in r212965 as it broke self-build. In the updated patch ParseDirectDeclarator turns on colon protection in for context as well. llvm-svn: 213120
* [c++1z] Implement N3994: a range-based for loop can declare a variable with ↵Richard Smith2014-06-191-2/+20
| | | | | | | | | | | | super-terse notation for (x : range) { ... } which is equivalent to for (auto &&x : range) { ... } llvm-svn: 211267
* Improve the error message for attempting to build a for range loop using aRichard Trieu2013-10-111-0/+18
| | | | | | | | | function parameter that has array type. Such a parameter will be treated as a pointer type instead, resulting in a missing begin function error is a suggestion to dereference the pointer. This provides a different, more informative diagnostic as well as point to the parameter declaration. llvm-svn: 192512
* If we find an error in the range expression in a range-based for loop, and theRichard Smith2013-08-211-0/+11
| | | | | | | loop variable has a type containing 'auto', set the declaration to be invalid (because we couldn't deduce its type) to prevent follow-on errors. llvm-svn: 188853
* Started implementing variable templates. Top level declarations should be ↵Larisse Voufo2013-08-061-1/+1
| | | | | | fully supported, up to some limitations documented as FIXMEs or TODO. Static data member templates work very partially. Static data member templates of class templates need particular attention... llvm-svn: 187762
* Fix test better way.Fariborz Jahanian2012-09-191-5/+5
| | | | llvm-svn: 164234
* c: warn when an integer value comparison with anFariborz Jahanian2012-09-181-4/+4
| | | | | | | | integral expression have the obvious result. Patch reviewed by John McCall off line. // rdar://12202422 llvm-svn: 164143
* Don't assume that a valid expression for the first part of a for-statementRichard Smith2012-02-211-0/+11
| | | | | | is non-null when diagnosing a broken attempt to write a for-range-statement. llvm-svn: 151081
* A couple minor fixes to template instantiation for for-range loops.Eli Friedman2012-01-311-0/+11
| | | | llvm-svn: 149440
* Be sure to emit delayed diagnostics after parsing the declarationJohn McCall2012-01-271-0/+10
| | | | | | of a for-range variable. Fixes PR11793. llvm-svn: 149109
* Update all tests other than Driver/std.cpp to use -std=c++11 rather thanRichard Smith2011-10-131-1/+1
| | | | | | -std=c++0x. Patch by Ahmed Charles! llvm-svn: 141900
* Add support for C++0x's range-based for loops, as specified by the C++11 ↵Richard Smith2011-04-141-0/+150
draft standard (N3291). llvm-svn: 129541
OpenPOWER on IntegriCloud