Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit e237507

Browse files
committed
CPP: Add a reference to the ReturnConstType tests.
1 parent d2f8029 commit e237507

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

  • cpp/ql/test/query-tests/Likely Bugs/ReturnConstType

cpp/ql/test/query-tests/Likely Bugs/ReturnConstType/test.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,3 +47,6 @@ MYCHAR getAMYCHAR(); // FALSE POSITIVE
4747

4848
#define ID(T) T id_ (T x) {return x;}
4949
ID(const char); // FALSE POSITIVE
50+
51+
const float pi = 3.14159626f;
52+
const float &getPiRef() { return pi; } // GOOD

0 commit comments

Comments
 (0)