mirror of
https://github.com/nasa/trick.git
synced 2024-12-24 07:16:41 +00:00
Changed the calling argument to setASTConsumer.
The calling argument to setASTConsumer changed between clang 3.5 and 3.6. Changed the code to create a std::unique_ptr that the call now requires and call setASTConsumer with the unique pointer. Fixes #15
This commit is contained in:
parent
c7e5ab1139
commit
aecc0504fa
@ -165,7 +165,12 @@ int main( int argc , char * argv[] ) {
|
|||||||
|
|
||||||
// Tell the compiler to use our ICGASTconsumer
|
// Tell the compiler to use our ICGASTconsumer
|
||||||
ICGASTConsumer *astConsumer = new ICGASTConsumer(ci, hsd, cs, pa);
|
ICGASTConsumer *astConsumer = new ICGASTConsumer(ci, hsd, cs, pa);
|
||||||
|
#if (__clang_major__ == 3) && (__clang_minor__ >= 6)
|
||||||
|
std::unique_ptr<clang::ASTConsumer> unique_ast(astConsumer) ;
|
||||||
|
ci.setASTConsumer(std::move(unique_ast));
|
||||||
|
#else
|
||||||
ci.setASTConsumer(astConsumer);
|
ci.setASTConsumer(astConsumer);
|
||||||
|
#endif
|
||||||
ci.createASTContext();
|
ci.createASTContext();
|
||||||
ci.createSema(clang::TU_Prefix, NULL);
|
ci.createSema(clang::TU_Prefix, NULL);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user