diff options
author | Brad King <brad.king@kitware.com> | 2016-11-10 19:04:56 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2016-11-10 19:51:04 (GMT) |
commit | bd226ccbaf3b9fed9ee31c42cf8a68852287c115 (patch) | |
tree | a83cb805e6f5c65415353fb0861cea6016595dec /src/Output.cxx | |
parent | 85211a28e9bdf73a92c9a88e861ae9d055e199f6 (diff) | |
download | CastXML-bd226ccbaf3b9fed9ee31c42cf8a68852287c115.zip CastXML-bd226ccbaf3b9fed9ee31c42cf8a68852287c115.tar.gz CastXML-bd226ccbaf3b9fed9ee31c42cf8a68852287c115.tar.bz2 |
Protect hand-formatted blocks from clang-format
Diffstat (limited to 'src/Output.cxx')
-rw-r--r-- | src/Output.cxx | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/Output.cxx b/src/Output.cxx index 54c7197..360caec 100644 --- a/src/Output.cxx +++ b/src/Output.cxx @@ -141,8 +141,10 @@ protected: #include "clang/AST/DeclNodes.inc" void OutputUnimplementedDecl(clang::Decl const* d, DumpNode const* dn) { + /* clang-format off */ this->OS << " <Unimplemented id=\"_" << dn->Index << "\" kind=\"" << encodeXML(d->getDeclKindName()) << "\"/>\n"; + /* clang-format on */ } // Report all type nodes as unimplemented until overridden. @@ -154,9 +156,11 @@ protected: #include "clang/AST/TypeNodes.def" void OutputUnimplementedType(clang::Type const* t, DumpNode const* dn) { + /* clang-format off */ this->OS << " <Unimplemented id=\"_" << dn->Index << "\" type_class=\"" << encodeXML(t->getTypeClassName()) << "\"/>\n"; + /* clang-format on */ } }; @@ -965,19 +969,23 @@ void ASTVisitor::ProcessQueue() void ASTVisitor::ProcessFileQueue() { if(this->FileBuiltin) { + /* clang-format off */ this->OS << " <File id=\"f0\" name=\"" << encodeXML("<builtin>") << "\"/>\n" ; + /* clang-format on */ } while(!this->FileQueue.empty()) { clang::FileEntry const* f = this->FileQueue.front(); this->FileQueue.pop(); + /* clang-format off */ this->OS << " <File" " id=\"f" << this->FileNodes[f] << "\"" " name=\"" << encodeXML(f->getName()) << "\"" "/>\n" ; + /* clang-format on */ } } @@ -1173,10 +1181,12 @@ void ASTVisitor::PrintLocationAttribute(clang::Decl const* d) this->CI.getSourceManager().getFileEntryForID(fsl.getFileID())) { unsigned int id = this->AddDumpFile(f); unsigned int line = fsl.getExpansionLineNumber(); + /* clang-format off */ this->OS << " location=\"f" << id << ":" << line << "\"" " file=\"f" << id << "\"" " line=\"" << line << "\""; + /* clang-format on */ return; } } @@ -2108,10 +2118,12 @@ void ASTVisitor::HandleTranslationUnit(clang::TranslationUnitDecl const* tu) } // Start dump with gccxml-compatible format. + /* clang-format off */ this->OS << "<?xml version=\"1.0\"?>\n" "<GCC_XML version=\"0.9.0\" cvs_revision=\"1.139\">\n" ; + /* clang-format on */ // Dump the complete nodes. this->ProcessQueue(); @@ -2127,9 +2139,11 @@ void ASTVisitor::HandleTranslationUnit(clang::TranslationUnitDecl const* tu) this->ProcessFileQueue(); // Finish dump. + /* clang-format off */ this->OS << "</GCC_XML>\n" ; + /* clang-format on */ } //---------------------------------------------------------------------------- |