]> granicus.if.org Git - clang/commit
[libclang] Avoid crashing when getting layout info of an undeduced type.
authorEmilio Cobos Alvarez <emilio@crisal.io>
Tue, 26 Feb 2019 15:04:18 +0000 (15:04 +0000)
committerEmilio Cobos Alvarez <emilio@crisal.io>
Tue, 26 Feb 2019 15:04:18 +0000 (15:04 +0000)
commitd7172a58de051e6b5aa569b47a26b266543b1fb3
treeb09fafe81a392a3b982e813bdd0cc0de788369e9
parent2b5af28394d6e9561d098980c35bac38d9a4863e
[libclang] Avoid crashing when getting layout info of an undeduced type.

When the type is not deducible, return an error instead of crashing.

This fixes https://bugs.llvm.org/show_bug.cgi?id=40813.

Differential Revision: https://reviews.llvm.org/D58569

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@354885 91177308-0d34-0410-b5e6-96231b3b80d8
include/clang-c/Index.h
test/Index/print-type-size.cpp
tools/c-index-test/c-index-test.c
tools/libclang/CXType.cpp