diff options
author | Kaelyn Takata <rikka@google.com> | 2015-01-28 21:10:46 +0000 |
---|---|---|
committer | Kaelyn Takata <rikka@google.com> | 2015-01-28 21:10:46 +0000 |
commit | 601ded96c946f983c2bf2a20e4918fc98f0dba28 (patch) | |
tree | ff6dbc9c211e6ed287ecdc077f4e281448156549 /test/SemaCXX/typo-correction-delayed.cpp | |
parent | bf6f6d5f28f72d98225a6dc35642577ac6f7ae22 (diff) |
Revert a change from r222797 that is no longer needed and can cause
infinite recursion.
Also guard against said infinite recursion by adding an assert that will
trigger if CorrectDelayedTyposInExpr is called before a previous call to
CorrectDelayedTyposInExpr returns (i.e. if the TreeTransform run by
CorrectDelayedTyposInExpr calls a sequence of methods that
end up calling CorrectDelayedTyposInExpr, as the new test case had done
prior to this commit). Fixes PR22292.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@227368 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/SemaCXX/typo-correction-delayed.cpp')
-rw-r--r-- | test/SemaCXX/typo-correction-delayed.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/test/SemaCXX/typo-correction-delayed.cpp b/test/SemaCXX/typo-correction-delayed.cpp index 516b600f42..64e6dd5966 100644 --- a/test/SemaCXX/typo-correction-delayed.cpp +++ b/test/SemaCXX/typo-correction-delayed.cpp @@ -176,6 +176,14 @@ namespace PR22250 { int getenv_s(size_t *y, char(&z)) {} } +namespace PR22291 { +template <unsigned I> void f() { + unsigned *prio_bits_array; // expected-note {{'prio_bits_array' declared here}} + // expected-error@+1 {{use of undeclared identifier 'prio_op_array'; did you mean 'prio_bits_array'?}} + __atomic_store_n(prio_op_array + I, false, __ATOMIC_RELAXED); +} +} + namespace PR22297 { double pow(double x, double y); struct TimeTicks { |