summaryrefslogtreecommitdiffstats
path: root/clang/test/CXX/stmt.stmt/stmt.select/p3.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Refactor the way we handle diagnosing unused expression results.Aaron Ballman2019-01-041-5/+4
| | | | | | | | Rather than sprinkle calls to DiagnoseUnusedExprResult() around in places where we want diagnostics, we now diagnose unused expression statements and full expressions in a more generic way when acting on the final expression statement. This results in more appropriate diagnostics for [[nodiscard]] where we were previously lacking them, such as when the body of a for loop is not a compound statement. This patch fixes PR39837. llvm-svn: 350404
* [C++17] Allow an empty expression in an if init statementZhihao Yuan2018-03-171-1/+59
| | | | | | | | | | | | | | | | | | | Summary: This fixes [PR35381](https://llvm.org/pr35381) and an additional bug where clang didn't warn about the C++17 extension when having an expression in the init statement. Thanks Nicolas Lesser for contributing the patch. Reviewers: rsmith Reviewed By: rsmith Subscribers: erik.pilkington, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D40445 llvm-svn: 327782
* add missing newlines at end of file.Chris Lattner2010-12-211-1/+1
| | | | llvm-svn: 122309
* change Scope::WithinElse to be a normal scope flag, widen theChris Lattner2010-04-121-0/+8
| | | | | | fields to two 16-bit values instead of using bitfields. llvm-svn: 101020
* Add a test for C++ [stmt.select]p3, which specifies that redeclaring aDouglas Gregor2010-03-301-0/+11
name in the outermost block of a if/else that declares the same name is ill-formed. Turns out that Clang and MSVC were right about PR6739; GCC is too lax. llvm-svn: 99937
OpenPOWER on IntegriCloud