Skip to content

Commit d5073a8

Browse files
committed
A18-1-3: inline namespace std::__1:auto_ptr
1 parent 7e4d625 commit d5073a8

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

cpp/autosar/src/rules/A18-1-3/AutoPtrTypeUsed.ql

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,12 @@ import cpp
1717
import codingstandards.cpp.autosar
1818

1919
predicate isAutoPtr(ClassTemplateInstantiation c) {
20-
c.getNamespace() instanceof StdNamespace and
20+
(
21+
c.getNamespace() instanceof StdNamespace
22+
or
23+
c.getNamespace().isInline() and
24+
c.getNamespace().getParentNamespace() instanceof StdNamespace
25+
) and
2126
c.getSimpleName() = "auto_ptr"
2227
}
2328

0 commit comments

Comments
 (0)