]> granicus.if.org Git - clang/commit
Fix initializing TypeOfTypeLoc
authorOlivier Goffart <ogoffart@woboq.com>
Fri, 24 Oct 2014 13:52:55 +0000 (13:52 +0000)
committerOlivier Goffart <ogoffart@woboq.com>
Fri, 24 Oct 2014 13:52:55 +0000 (13:52 +0000)
commitf0422ced5f73d4a3b53b84d7935fb8186d2ce661
tree0a87c0cd8648523ce5f472bff0955a79ba6f3344
parent517e8728af87b59ab6a52c90dd6f4042d2ae38ac
Fix initializing TypeOfTypeLoc

This fixes a crash in the RecursiveASTVisitor on such code
 __typeof__(struct F*) var[invalid];

The UnderlyingTInfo of a TypeOfTypeLoc was left uninitialized when
created from ASTContext::getTrivialTypeSourceInfo
This lead to a crash in RecursiveASTVisitor when trying to access it.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@220562 91177308-0d34-0410-b5e6-96231b3b80d8
include/clang/AST/TypeLoc.h
lib/AST/TypeLoc.cpp
unittests/Tooling/RecursiveASTVisitorTestTypeLocVisitor.cpp