https://bugs.llvm.org/show_bug.cgi?id=41067
Bug ID: 41067
Summary: clang_Type_visitFields documentation is misleading
Product: clang
Version: trunk
Hardware: All
OS: All
Status: NEW
Severity: enhancement
Priority: P
Component: libclang
Assignee: [email protected]
Reporter: [email protected]
CC: [email protected], [email protected],
[email protected]
clang_Type_visitFields result is documented as follows.
| \returns a non-zero value if the traversal was terminated
| prematurely by the visitor returning \c CXFieldVisit_Break.
This documentation is misleading because clang_Type_visitFields returns a
non-zero value (true) regardless whether the traversal was terminated
prematurely or not.
The function returns zero (false) solely if its argument is not the type of a
record declaration.
It is worth noticing that the documentation suggests that the return value is
consistent with the return value of clang_visitChildren (which returns a
non-zero value only in case of interruption), while it is not in practice.
I think that it is fine to keep the inconsistency between the two functions
(for backward compatibility) as long as the return value is correctly
documented.
--
You are receiving this mail because:
You are on the CC list for the bug._______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs