File tree Expand file tree Collapse file tree 2 files changed +9
-7
lines changed
Expand file tree Collapse file tree 2 files changed +9
-7
lines changed Original file line number Diff line number Diff line change @@ -996,10 +996,10 @@ class Analyzer {
996996 // will be traversed as part of the function -- unless we capture it
997997 // here and have TraverseStmt skip it.
998998 if (TypeSourceInfo *TSI = FD->getTypeSourceInfo ()) {
999- FunctionProtoTypeLoc TL =
1000- TSI->getTypeLoc ().getAs <FunctionProtoTypeLoc>();
1001- if (const FunctionProtoType *FPT = TL.getTypePtr ())
1002- NoexceptExpr = FPT->getNoexceptExpr ();
999+ if ( FunctionProtoTypeLoc TL =
1000+ TSI->getTypeLoc ().getAs <FunctionProtoTypeLoc>())
1001+ if (const FunctionProtoType *FPT = TL.getTypePtr ())
1002+ NoexceptExpr = FPT->getNoexceptExpr ();
10031003 }
10041004 }
10051005
Original file line number Diff line number Diff line change @@ -422,7 +422,6 @@ class expected {
422422
423423 // This is a deliberate corruption of the real implementation for simplicity.
424424 constexpr expected (const expected&)
425- noexcept (is_copy_constructible_v<_Tp> && is_copy_constructible_v<_Err>)
426425 requires(is_copy_constructible_v<_Tp> && is_copy_constructible_v<_Err>)
427426 = default;
428427};
@@ -435,9 +434,12 @@ void test() [[clang::nonblocking]]
435434
436435} // namespace ExpectedTest
437436
438- // Make sure that simple type traits don't cause violations.
437+ // Make sure a function call in a noexcept() clause is ignored.
438+ constexpr bool foo () [[clang::nonblocking(false )]] { return true ; }
439+ void nb27 () noexcept (foo()) [[clang::nonblocking]] {}
439440
440- void nb27 () [[clang::nonblocking]] {
441+ // Make sure that simple type traits don't cause violations.
442+ void nb28 () [[clang::nonblocking]] {
441443 bool x = __is_constructible (int , const int &);
442444}
443445
You can’t perform that action at this time.
0 commit comments