diff options
Diffstat (limited to 'lib/Sema/ParseAST.cpp')
-rw-r--r-- | lib/Sema/ParseAST.cpp | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/lib/Sema/ParseAST.cpp b/lib/Sema/ParseAST.cpp index 59a04dad64..4bcb478e89 100644 --- a/lib/Sema/ParseAST.cpp +++ b/lib/Sema/ParseAST.cpp @@ -44,16 +44,14 @@ void clang::ParseAST(Preprocessor &PP, ASTConsumer *Consumer, Consumer->Initialize(Ctx); - Parser::DeclPtrTy ADecl; + Parser::DeclGroupPtrTy ADecl; while (!P.ParseTopLevelDecl(ADecl)) { // Not end of file. // If we got a null return and something *was* parsed, ignore it. This // is due to a top-level semicolon, an action override, or a parse error // skipping something. - if (ADecl) { - Decl *D = ADecl.getAs<Decl>(); - Consumer->HandleTopLevelDecl(D); - } + if (ADecl) + Consumer->HandleTopLevelDecl(ADecl.getAsVal<DeclGroupRef>()); }; Consumer->HandleTranslationUnit(Ctx); |