Skip to content

Commit 507d34e

Browse files
committed
Fix testcase identifiershidden rule
1 parent b09235f commit 507d34e

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

cpp/common/test/rules/identifierhidden/test.cpp

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,5 +32,12 @@ void f3() {
3232
template <typename T> constexpr bool foo = false; // COMPLIANT
3333

3434
namespace {
35-
template <typename T> bool foo<T> = true; // COMPLIANT
35+
template <typename T> bool foo = true; // COMPLIANT - omit variable templates
36+
}
37+
38+
template <class T> constexpr T foo1 = T(1.1L);
39+
40+
template <class T, class R> T f(T r) {
41+
T v = foo1<T> * r * r; // COMPLIANT
42+
T v1 = foo1<R> * r * r; // COMPLIANT
3643
}

cpp/common/test/rules/identifierhidden/test1.cpp

Lines changed: 0 additions & 2 deletions
This file was deleted.

0 commit comments

Comments
 (0)