Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit3dc5aa4

Browse files
Address feedback
1 parent4cc50dd commit3dc5aa4

File tree

5 files changed

+7
-7
lines changed

5 files changed

+7
-7
lines changed

‎cpp/common/src/codingstandards/cpp/Function.qll‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ class FunctionAccessExpr extends FunctionAccess, FunctionAccessLikeExpr {
4747
}
4848

4949
/**
50-
* Takingan address of a function access in effectively a function access.
50+
* Takingthe address of a function access in effectively a function access.
5151
*/
5252
classFunctionAddressExprextendsAddressOfExpr,FunctionAccessLikeExpr{
5353
Functionfunc;

‎cpp/common/src/codingstandards/cpp/exceptions/SpecialFunctionExceptions.qll‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ class FunctionGivenToStdExitHandler extends FunctionAccess, SpecialUseOfFunction
9292
overridestringgetSpecialDescription(Locatableextra,stringextraString){
9393
result="$@"and
9494
extra=exitHandlerCalland
95-
extraString="passed exit handler std::"+exitHandler.getName()
95+
extraString="passedto theexit handler std::"+exitHandler.getName()
9696
}
9797
}
9898

‎cpp/misra/src/rules/RULE-18-3-1/MissingCatchAllExceptionHandlerInMain.ql‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515

1616
import cpp
1717
import codingstandards.cpp.misra
18+
import codingstandards.cpp.EncapsulatingFunctions
1819
import codingstandards.cpp.exceptions.ExceptionFlow
1920
import codingstandards.cpp.exceptions.ExceptionSpecifications
2021

@@ -24,7 +25,7 @@ import codingstandards.cpp.exceptions.ExceptionSpecifications
2425
*/
2526
classUncaughtFunctionCallInMainextendsFunctionCall{
2627
UncaughtFunctionCallInMain(){
27-
getEnclosingFunction().hasName("main")and
28+
getEnclosingFunction()instanceofMainFunctionand
2829
notisNoExceptTrue(getTarget())and
2930
notexists(TryStmttry|
3031
try=getATryStmt(this.getEnclosingStmt())and
@@ -46,10 +47,9 @@ class UncaughtFunctionCallInMain extends FunctionCall {
4647
}
4748
}
4849

49-
fromFunctionf,UncaughtFunctionCallInMainfc
50+
fromMainFunctionf,UncaughtFunctionCallInMainfc
5051
where
5152
notisExcluded(f, Exceptions3Package::missingCatchAllExceptionHandlerInMainQuery())and
52-
f.getName()="main"and
5353
fc.isFirst()
5454
selectf,
5555
"Main function has a $@ which is not within a try block with a catch-all ('catch(...)') handler.",

‎cpp/misra/src/rules/RULE-18-4-1/ExceptionUnfriendlyFunctionMustBeNoexcept.ql‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/**
22
* @id cpp/misra/exception-unfriendly-function-must-be-noexcept
33
* @name RULE-18-4-1: Exception-unfriendly functions shall be noexcept
4-
* @description Throwing exceptions in constructors,descructors, copy-constructors, move
4+
* @description Throwing exceptions in constructors,destructors, copy-constructors, move
55
* constructors, assignments, and functions named swap, may result in
66
* implementation-defined behavior.
77
* @kind problem

‎rule_packages/cpp/Exceptions3.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@
5050
},
5151
"queries": [
5252
{
53-
"description":"Throwing exceptions in constructors,descructors, copy-constructors, move constructors, assignments, and functions named swap, may result in implementation-defined behavior.",
53+
"description":"Throwing exceptions in constructors,destructors, copy-constructors, move constructors, assignments, and functions named swap, may result in implementation-defined behavior.",
5454
"kind":"problem",
5555
"name":"Exception-unfriendly functions shall be noexcept",
5656
"precision":"very-high",

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp