草庐IT

langOpts

全部标签

c++ - 如何将 Clang 置于 C++ 模式?

我正在使用Clang开发AST转换器。它应该将文件名作为输入,对该文件中的代码执行一些转换,然后返回转换后的代码。它基于ahelpfulexamplefromEliBendersky.代码如下:std::stringtransform(std::stringfileName){//CompilerInstancewillholdtheinstanceoftheClangcompilerforus,//managingthevariousobjectsneededtorunthecompiler.CompilerInstancecompilerInstance;compilerInsta