[LLVMbugs] [Bug 21346] New: clang_createIndex - unexpected behavior from excludeDeclarationsFromPCH parameter
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Wed Oct 22 14:31:46 PDT 2014
http://llvm.org/bugs/show_bug.cgi?id=21346
Bug ID: 21346
Summary: clang_createIndex - unexpected behavior from
excludeDeclarationsFromPCH parameter
Product: clang
Version: trunk
Hardware: PC
OS: Linux
Status: NEW
Severity: normal
Priority: P
Component: libclang
Assignee: unassignedclangbugs at nondot.org
Reporter: rob.springer at live.com
CC: llvmbugs at cs.uiuc.edu
Classification: Unclassified
Created attachment 13238
--> http://llvm.org/bugs/attachment.cgi?id=13238&action=edit
Test program (executor).
Short summary: when clang_createIndex() is called with a zero/"false" argument
for the excludeDeclarationsFromPCH parameter, explicit template instantiations
appear to be missing from the generated AST.
Attached are two files:
- function_tmpl_instantiation.cc - Reproducer "input" file, consisting of a
function template declaration and three explicit instantiations of that
template.
- missing_func_decls.cc - Test program. When this program is built without
-DSHOW_BAD_BEHAVIOR, the CXIndex is created by "clang_createIndex(1, 1)". In
this case, all function template instantiations are visible when the TU's
[top-level] child nodes are all visited. When -DSHOW_BAD_BEHAVIOR is set,
the CXIndex is created by calling "clang_createIndex(0, 1)". In this case,
none of the explicit instantiations are visited when walking the TU's
children.
I suspect that this is a bug, b/c the description for the
"excludeDeclarationsFromPCH" parameter only references excluding non-local
declarations from the TU being parsed. I'd expect that the explicit
instantiations would all be considered "local", so the fact that this flag
influences their presence would seem to be a bug.
Apologies in advance if I'm operating under some misconception, & thanks!
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20141022/c026946d/attachment.html>
More information about the llvm-bugs
mailing list