Skip to content

Commit

Permalink
Updating comments.
Browse files Browse the repository at this point in the history
  • Loading branch information
bdrodes committed Oct 23, 2024
1 parent e86c764 commit a40343e
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions cpp/ql/lib/semmle/code/cpp/models/interfaces/Throwing.qll
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,15 @@ newtype TException =
* to use the most restricted interpretation, meaning taking options
* that stipulate no exception is raised, before the exception is always raised,
* before conditional exceptions.
*
*
* Annotations must specify if the exception is from SEH (structured exception handling)
* or ordinary c++ exceptions.
*/
private abstract class ExceptionAnnotation extends Function {
abstract private class ExceptionAnnotation extends Function {
/**
* Returns the type of exception this annotation is for,
* either a CPP exception or a STructured Exception Handling (SEH) exception.
*/
abstract TException getExceptionType();

final predicate isSEH() { this.getExceptionType() = TSEHException() }

Check warning on line 34 in cpp/ql/lib/semmle/code/cpp/models/interfaces/Throwing.qll

View workflow job for this annotation

GitHub Actions / qldoc

Missing QLdoc for member-predicate Throwing::ExceptionAnnotation::isSEH/0

Check warning

Code scanning / CodeQL

Acronyms should be PascalCase/camelCase. Warning

Acronyms in isSEH should be PascalCase/camelCase.
Expand All @@ -50,7 +54,14 @@ abstract class ThrowingFunction extends ExceptionAnnotation {
*/
abstract predicate raisesException(boolean unconditional);

Check warning

Code scanning / CodeQL

Missing QLDoc for parameter Warning

The QLDoc has no documentation for unconditional, but the QLDoc mentions conditional

/**
* Holds if this function will always raise an exception if called
*/
final predicate alwaysRaisesException() { this.raisesException(true) }

/**
* Holds if this function may raise an exception if called but
* it is not guaranteed to do so. I.e., the function does not always raise an exception.
*/
final predicate mayRaiseException() { this.raisesException(false) }
}

0 comments on commit a40343e

Please sign in to comment.