diff options
Diffstat (limited to 'clang/test/Sema/warn-lifetime-analysis-nocfg.cpp')
| -rw-r--r-- | clang/test/Sema/warn-lifetime-analysis-nocfg.cpp | 7 |
1 files changed, 0 insertions, 7 deletions
diff --git a/clang/test/Sema/warn-lifetime-analysis-nocfg.cpp b/clang/test/Sema/warn-lifetime-analysis-nocfg.cpp index eaddb74e5a3..efa54fe662b 100644 --- a/clang/test/Sema/warn-lifetime-analysis-nocfg.cpp +++ b/clang/test/Sema/warn-lifetime-analysis-nocfg.cpp @@ -201,13 +201,6 @@ void danglingReferenceFromTempOwner() { std::vector<int> getTempVec(); std::optional<std::vector<int>> getTempOptVec(); -void testLoops() { - for (auto i : getTempVec()) // ok - ; - for (auto i : *getTempOptVec()) // expected-warning {{object backing the pointer will be destroyed at the end of the full-expression}} - ; -} - int &usedToBeFalsePositive(std::vector<int> &v) { std::vector<int>::iterator it = v.begin(); int& value = *it; |

