[PATCH] Fix null pointer segfault when calling dump() on a DeclStmt containing a VarDecl.

Alex McCarthy alexmc at google.com
Fri May 2 10:04:09 PDT 2014


If you call Stmt::dump(), it creates an ASTDumper without a SourceManager: ASTDumper.cpp:2163 http://clang.llvm.org/doxygen/ASTDumper_8cpp_source.html#l02162

Note that the other place SM is dereferenced in that file (ASTDumper.cpp:189) we check SM for null before using it.

http://reviews.llvm.org/D3589






More information about the cfe-commits mailing list