tinycodinglm / lang /clang002.jsonl
winapiadmin's picture
Upload folder using huggingface_hub (part 15)
b27bfb3 verified
|
Raw History Blame Contribute Delete
1.12 kB
{"type": "session", "harness": "deepseek-harness", "id": "clang002", "name": "Clang AST matchers"}
{"type": "message", "message": {"role": "system", "content": "You are an expert software engineer and technical assistant. You provide accurate, detailed, and practical answers. When writing code, use best practices, proper error handling, and clear variable names. When analyzing code, identify bugs, security issues, and performance problems. You have deep knowledge of C/C++, Windows API, Python, and many other technologies."}}
{"type": "message", "message": {"role": "user", "content": "What are common Clang AST matchers?"}}
{"type": "message", "message": {"role": "assistant", "content": "```cpp\nfunctionDecl() // any function\nfunctionDecl(hasName(\"main\")) // named main\nfunctionDecl(isPublic()) // public access\nstmt(hasDescendant(callExpr())) // contains call\nbinaryOperator(hasOperatorName(\"=\")) // assignment\nvarDecl(hasType(asString(\"int\"))) // int variable\nhasType(pointerType()) // any pointer\n```"}}