[cfe-commits] [PATCH] simple fix for the pretty printer

Douglas Gregor dgregor at apple.com
Tue Dec 15 08:33:15 PST 2009


On Dec 15, 2009, at 6:13 AM, Cornelius wrote:

> Hi,
> I tried out the pretty printer for
> 
> corni at schleptop:~/remote/llvm/llvm-mainline-git-cmake-build/bin$ cat test.cpp
> #include <cstdio>
> int main() {
> printf("hello");
> return 0;
> }
> 
> and it crashed with an assertation, the attached patch fixes it.
> This is my first patch to clang, and i've no idea whether my approach is actually right, kills kittens or breaks your computer ;)

It's close to correct, and no kittens were harmed in the execution of this patch. The specific fix was to treat elaborated types (e.g., "struct x") as specifier types, as I did here:

	http://lists.cs.uiuc.edu/pipermail/cfe-commits/Week-of-Mon-20091214/025429.html

	- Doug



More information about the cfe-commits mailing list