mirror of
https://github.com/github/codeql.git
synced 2026-05-02 12:15:17 +02:00
CPP: Tiny qldoc fixes.
This commit is contained in:
@@ -51,7 +51,7 @@ class ReferenceCopyAssignmentOperator extends MemberFunction {
|
||||
|
||||
/**
|
||||
* A call to a function called swap. Note: could be a member,
|
||||
* std::swap or a function overloading std::swap (not in std::)
|
||||
* `std::swap` or a function overloading `std::swap` (not in `std::`)
|
||||
* so keep it simple
|
||||
*/
|
||||
FunctionCall getASwapCall() {
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
|
||||
/*
|
||||
* See More Effective C++ item 7.
|
||||
* Note: Meyers allows unary & to be overloaded but not comma
|
||||
* Note: Meyers allows unary `&` to be overloaded but not comma.
|
||||
*/
|
||||
|
||||
import cpp
|
||||
|
||||
@@ -15,11 +15,11 @@ import cpp
|
||||
/*
|
||||
* Interpretation and deviations:
|
||||
* - if the higher operator has precedence > arithmetic then it is fine
|
||||
* RATIONALE: exprs like f(), *x, &x are easily understood to bind tightly
|
||||
* RATIONALE: exprs like `f()`, `*x`, `&x` are easily understood to bind tightly
|
||||
* - if the higher operator is the RHS of an assign then it is fine
|
||||
* RATIONALE: cf. MISRA, too many cases excluded otherwise
|
||||
* - comparison operators can be mixed with arithmetic
|
||||
* RATIONALE: x==y+z is common and unambiguous
|
||||
* RATIONALE: `x==y+z` is common and unambiguous
|
||||
*/
|
||||
|
||||
predicate arithmeticPrecedence(int p) { p = 12 or p = 13 }
|
||||
|
||||
Reference in New Issue
Block a user