Comments (2)
This is an interesting example that is close to the exception discussed in Autosar, but still marked as non-compliant in the examples in Autosar. It is interesting because like the exception we can still reference a
in the global scope as:
int a;
namespace b {
void a() { }
int c() { return ::a; }
}
from codeql-coding-standards.
It seems MISRA C++ 23 completely removes the exceptions in 6.5.1. The also only focus on variables (6.4.1) and member functions (6.4.2)
It is interesting to have the distinction between global namespace and named namespace for the exception since both cases the hidden variable can still be referenced, but in one case it is accepted and the other not. Seems equally confusing as is confirmed by MISRA C++ 23.
from codeql-coding-standards.
Related Issues (20)
- Seems to have problems with CodeQL Bundle v2.16.0 HOT 2
- Missing attestations: @jketema HOT 1
- Missing attestations: @lcartey
- Missing attestations: @jsinglet
- Missing attestations: @kraiouchkine
- Missing attestations: @rvermeulen HOT 1
- Missing attestations: @mbaluda
- Missing attestations: @knewbury01
- Missing attestations: @erik-krogh
- Missing attestations: @MathiasVP
- Missing attestations: @andersfugmann
- Use QL for QL to check for omissions HOT 1
- A5-0-2 Improve testcase
- A13-3-1: reconsider precision and feasibility of rule exception
- `A2-7-3`: template function prototypes with comments are not correctly detected
- `A7-1-2`: Alert on move constructor declaration that cannot be `constexpr` specified
- `A3-9-1`: Variables having template parameter type are recognized as having `variable-width type`.
- Add compliance for MISRA C++ 2023
- `A3-9-1`: Incorrectly alerts on template functions instantiated with fix-width integers
- `M5-0-12`: Incorrect alerts on assignments of valid numerical values
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from codeql-coding-standards.