Home | History | Annotate | Download | only in Sema

Lines Matching defs:Exception

1 //===--- SemaExceptionSpec.cpp - C++ Exception Specifications ---*- C++ -*-===//
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
9 // This file provides Sema routines for C++ exception specification testing.
40 /// exception specification of that function. This function detects whether
41 /// we're in such a case and turns off delay-parsing of exception
111 /// exception specification. Incomplete types, or pointers to incomplete types
114 /// \param[in,out] T The exception type. This will be decayed to a pointer type
119 // in an exception-specification is adjusted to type T, "pointer to T", or
144 // A type denoted in an exception-specification shall not denote [...]
153 // A type denoted in an exception-specification shall not denote an
155 // A type denoted in an exception-specification shall not denote a
182 /// to member to a function with an exception specification. This means that
185 // C++17 removes this rule in favor of putting exception specifications into
218 // If the exception specification has already been resolved, just return it.
222 // Compute or instantiate the exception specification now.
240 // If we've fully resolved the exception specification, notify listeners.
267 /// Determine whether a function has an implicitly-generated exception
276 // - if this is a destructor, its exception specification is implicit.
277 // - if this is 'operator delete' or 'operator delete[]', the exception
278 // specification is as-if an explicit exception specification was given
289 // In C++17 onwards, the exception specification is part of the type and
307 // defined, we might not be able to work out its exception specification yet.
314 // Check the types as written: they must match before any exception
324 // exception-specification, other declarations of the function shall
325 // not specify an exception-specification.
336 // The failure was something other than an missing exception
344 // The new function declaration is only missing an empty exception
347 // exception specification to the "new" declaration. Note that C library
348 // implementations are permitted to add these nothrow exception
383 // Update the type of the function with the appropriate exception
391 // Allow missing exception specifications in redeclarations as an extension.
396 // Allow missing exception specifications in redeclarations as an extension,
410 // Warn about the lack of exception specification.
482 /// exception specifications. Exception specifications are equivalent if
483 /// they allow exactly the same set of exception types. It does not matter how
498 // In Microsoft mode, mismatching exception specifications just cause a warning.
505 /// exception specifications. See C++ [except.spec]p3.
507 /// \return \c false if the exception specifications match, \c true if there is
530 // C++0x [except.spec]p3: Two exception-specifications are compatible if:
534 // - both are dynamic-exception-specifications that have the same set of
537 // C++0x [except.spec]p12: An exception-specification is non-throwing if it is
541 // C++0x [except.spec]p4: If any declaration of a function has an exception-
544 // exception-specification.
554 "Shouldn't see unknown exception specifications here");
566 // The exception is that the absence of an exception specification only
578 // Two exception-specifications are compatible if [...] both have the form
588 // Dynamic exception specifications with the same set of adjusted types
592 // Both have a dynamic exception spec. Collect the first set, then compare
624 QualType Exception = *WithExceptions->exception_begin();
625 if (CXXRecordDecl *ExRecord = Exception->getAsCXXRecordDecl()) {
638 // incompatible due to a missing exception specification, let it.
641 // The old type has an exception specification of some sort, but
646 // The old type has a throw() or noexcept(true) exception specification
647 // and the new type has no exception specification, and the caller asked
675 // A handler is a match for an exception object of type E if:
705 // FIXME: Should we treat the exception as catchable if a lifetime
758 /// exception specification is a subset (or equivalent) of the first function
779 // Resolve the exception specifications, if needed.
791 "Shouldn't see unknown exception specifications here");
831 "Exception spec subset: non-dynamic case slipped through.");
846 // catch an exception of each source type.
881 /// two functions have equivalent exception specs. This is part of the
939 // the exceptions of the target, and any exception specs on arguments or
942 // FIXME: If there is a nested dependent exception specification, we should
957 // If the new exception specification hasn't been parsed yet, skip the check.
968 // If the old exception specification hasn't been parsed yet, or the new
969 // exception specification can't be computed yet, remember that we need to
1151 // exception-specification
1250 // ObjC message sends are like function calls, but never have exception