[LLVMbugs] [Bug 24268] New: clang_visitChildren skips elements
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Sun Jul 26 13:13:18 PDT 2015
https://llvm.org/bugs/show_bug.cgi?id=24268
Bug ID: 24268
Summary: clang_visitChildren skips elements
Product: clang
Version: 3.7
Hardware: PC
OS: Linux
Status: NEW
Severity: normal
Priority: P
Component: libclang
Assignee: unassignedclangbugs at nondot.org
Reporter: mail at milianw.de
CC: klimek at google.com, llvmbugs at cs.uiuc.edu
Classification: Unclassified
Created attachment 14647
--> https://llvm.org/bugs/attachment.cgi?id=14647&action=edit
visitor code
This is a really odd issue I found. The attached clang-c based code (compile
with $CXX -lclang), fails to visit the call to returnTemplateInstantiation:
...
"MyTemplate" [(28, 1), (28, 44)] in test.cpp | ClassTemplate
"T" [(28, 11), (28, 21)] in test.cpp | TemplateTypeParameter
"ReturnType" [(30, 1), (30, 35)] in test.cpp | TypeAliasDecl
"MyTemplate" [(30, 20), (30, 30)] in test.cpp | TemplateRef
"callFunction" [(34, 1), (34, 26)] in test.cpp | FunctionDecl
"ReturnType" [(34, 1), (34, 11)] in test.cpp | TypeRef
"hereIsTheError" [(36, 1), (36, 42)] in test.cpp | FunctionDecl
"" [(36, 23), (36, 42)] in test.cpp | CompoundStmt
If one instead comments the line for f20, or uses an int for ReturnType, the
callFunction is properly visited:
...
"MyTemplate" [(28, 1), (28, 44)] in test.cpp | ClassTemplate
"T" [(28, 11), (28, 21)] in test.cpp | TemplateTypeParameter
"ReturnType" [(32, 1), (32, 23)] in test.cpp | TypeAliasDecl
"callFunction" [(34, 1), (34, 26)] in test.cpp | FunctionDecl
"ReturnType" [(34, 1), (34, 11)] in test.cpp | TypeRef
"hereIsTheError" [(36, 1), (36, 42)] in test.cpp | FunctionDecl
"" [(36, 23), (36, 42)] in test.cpp | CompoundStmt
"callFunction" [(36, 25), (36, 39)] in test.cpp | CallExpr
"callFunction" [(36, 25), (36, 37)] in test.cpp | UnexposedExpr
"callFunction" [(36, 25), (36, 37)] in test.cpp | DeclRefExpr
Can anyone point me to the code in clang that could be responsible for such
erratic behavior? It is quite a serious issue for us in KDevelop, and I could
believe it's bad for any other IDE relying on clang-c.
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/20150726/3cac731f/attachment.html>
More information about the llvm-bugs
mailing list