Skip to content

Commit

Permalink
Fix typo
Browse files Browse the repository at this point in the history
  • Loading branch information
frederic-tingaud-sonarsource committed Nov 4, 2024
1 parent deeea2c commit 7534eec
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions rules/S7119/cfamily/rule.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -104,9 +104,9 @@ An instantiated variable may be produced directly from the instantiation of a va
int global1 = runtimeFunc();
template<typename T>
T varTempl = global1; // Noncompliant: "global1" may be initializer later
T varTempl = global1; // Noncompliant: "global1" may be initialized later
int global2 = varTempl<long>; // Noncompliant: "varTempl" may be initializer later
int global2 = varTempl<long>; // Noncompliant: "varTempl" may be initialized later
----

Similarly, static data members of class template instantiation behave as instantiated global variables:
Expand All @@ -121,9 +121,9 @@ struct Clazz {
};
template<typename T>
T Clazz<T>::staticMem = global1; // Noncompliant: "global1" may be initializer later
T Clazz<T>::staticMem = global1; // Noncompliant: "global1" may be initialized later
int global2 = Clazz<long>::staticMem; // Noncompliant: "Clazz<long>::staticMem" may be initializer later
int global2 = Clazz<long>::staticMem; // Noncompliant: "Clazz<long>::staticMem" may be initialized later
----


Expand Down

0 comments on commit 7534eec

Please sign in to comment.