<div dir="ltr"><span style="font-size:12.8px">Calling this function: clang_Type_getSizeOf</span><br style="font-size:12.8px"><br style="font-size:12.8px"><span style="font-size:12.8px">Sometimes leads to this assertion:</span><br style="font-size:12.8px"><br style="font-size:12.8px"><span style="font-size:12.8px">rp: /usr/src/clang/3.8.0/llvm-3.8.</span><span style="font-size:12.8px">0/tools/clang/lib/AST/</span><span style="font-size:12.8px">ASTContext.cpp:1790: clang::TypeInfo clang::ASTContext::</span><span style="font-size:12.8px">getTypeInfoImpl(const clang::Type) const: Assertion `!A->getDeducedType().isNull() && "cannot request the size of an undeduced or dependent auto type"' failed.</span><br style="font-size:12.8px"><br style="font-size:12.8px"><span style="font-size:12.8px">I try to avoid calling this with conditions like these:</span><br style="font-size:12.8px"><div style="font-size:12.8px"><br></div><div style=""><div style="font-size:12.8px">        const CXType type = clang_getCursorType(ref);</div><div style="font-size:12.8px">        if (type.kind != CXType_LValueReference && type.kind != CXType_RValueReference && type.kind != CXType_Unexposed) {</div><div style="font-size:12.8px"><br></div><div style=""><span style="font-size:12.8px"><a href="https://github.com/Andersbakken/rtags/blob/master/src/ClangIndexer.cpp#L1087">https://github.com/Andersbakken/rtags/blob/master/src/ClangIndexer.cpp#L1087</a></span><br></div></div><div style="font-size:12.8px"><br></div><div style="font-size:12.8px">What are the correct conditions for when this function is legal to call and not? Also, wouldn't it be better to just return -1 than assert in this circumstance? </div><div style="font-size:12.8px"><br></div><div style="font-size:12.8px">regards</div><div style="font-size:12.8px"><br></div><div style="font-size:12.8px">Anders</div><div class="" style="margin:2px 0px 0px;font-size:12.8px"></div></div>