https://bugs.llvm.org/show_bug.cgi?id=41555
Solovei Ivan <burnss...@gmail.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Resolution|--- |FIXED
Status|NEW |RESOLVED
--- Comment #5 from Solovei Ivan <burnss...@gmail.com> ---
Hi!
I tried parse only this constructions without some #include constructions.
And parse typedef is correct.
I found the problem to be different.
Preprocessor try find #include "file.h" - and could not find ,so generate
"fatal error: No such file" and preprocessor has been terminated. Therefore,
next preprocessing templates and other has been stop. And therefore, I received
invalid declaration.
I found fixing:
-Need will doing that preprocessor not terminate via "fatal error: No such
file".
I changed the code (I added the construction to the custom
ParseDeclarationAction class, which is inherited from ASTFrontendAction):
CI.getPreprocessor().SetSuppressIncludeNotFoundError(true);
In result I have class:
class ParseDeclarationAction : public ASTFrontendAction
{
public:
virtual unique_ptr<ASTConsumer> CreateASTConsumer(CompilerInstance &CI,
StringRef InFile) {
CI.getPreprocessor().SetSuppressIncludeNotFoundError(true);
return unique_ptr<ASTConsumer>(new
ParseDeclarationConsumer(&CI.getASTContext()));
}
};
I think may problem will be help other clang users.
This task is resolved.
Thank you for your support.
Best Regards,
Ivan.
--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs