summaryrefslogtreecommitdiffstats
path: root/clang/test/SemaCXX/goto.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Reword switch/goto diagnostics "protected scope" diagnostics. Making up a termRichard Smith2014-09-061-2/+2
| | | | | | | | "protected scope" is very unhelpful here and actively confuses users. Instead, simply state the nature of the problem in the diagnostic: we cannot jump from here to there. The notes explain nicely why not. llvm-svn: 217293
* Fix a tranche of comment, test and doc typosAlp Toker2013-12-051-1/+1
| | | | llvm-svn: 196510
* When we're flagging a protected scope to prevent jumps into theJohn McCall2012-04-131-0/+10
| | | | | | | | shadow of a block expression with non-trivial destructed cleanups, we should flag that in the enclosing function, not in the block that we're about to pop. llvm-svn: 154646
* Make sure a variable with a C++ direct initializer triggers jump scope ↵Eli Friedman2012-02-091-0/+12
| | | | | | checking. Fixes PR10620 / <rdar://problem/9958362> . llvm-svn: 150204
* Minor fix in the injection of labels, since we want to look at the ↵Douglas Gregor2011-03-241-2/+12
| | | | | | redeclaration context of each declaration in the identifier chain. Should fix Linux self-host llvm-svn: 128210
* Fix the insertion of label declarations into the identifier chain inDouglas Gregor2011-03-241-0/+20
| | | | | | | the case where we only have a single identifier with that name in the chain. Fixes PR9463 for real this time. llvm-svn: 128208
* Unbreak testDouglas Gregor2011-03-231-4/+10
| | | | llvm-svn: 128168
* Make sure that we always pop a function's scope *before* we callDouglas Gregor2011-03-161-1/+24
| | | | | | | | | | | ActOnFinishFunctionBody/ActOnBlockStmtExpr. This way, we ensure that we diagnose undefined labels before the jump-scope checker gets run, since the jump-scope checker requires (as its invariant) that all of the GotoStmts be wired up correctly. Fixes PR9495. llvm-svn: 127738
* When we're inserting a synthesized label declaration for aDouglas Gregor2011-03-161-1/+29
| | | | | | | | | | | | | | | | forward-looking "goto" statement, make sure to insert it *after* the last declaration in the identifier resolver's declaration chain that is either outside of the function/block/method's scope or that is declared in that function/block/method's specific scope. Previously, we could end up inserting the label ahead of declarations in inner scopes, confusing C++ name lookup. Fixes PR9491/<rdar://problem/9140426> and <rdar://problem/9135994>. Note that the crash-on-invalid PR9495 is *not* fixed. That's a separate issue. llvm-svn: 127737
* When synthesizing a label declaration based on a goto statement thatDouglas Gregor2011-03-141-0/+18
cannot yet be resolved, be sure to push the new label declaration into the right place within the identifier chain. Otherwise, name lookup in C++ gets confused when searching for names that are lexically closer than the label. Fixes PR9463. llvm-svn: 127623
OpenPOWER on IntegriCloud