<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;">Benjamin,<div><br></div><div>Your commits (175895, <span style="font-size: medium;">175894, </span><span style="font-size: medium;">175896</span>) are breaking our internal MSVC build with errors like these:</div><div><br></div><div><div>279>CheckerRegistration.cpp</div><div>279>.\llvm\tools\clang\include\clang/AST/Decl.h(176) : error C2027: use of undefined type 'llvm::raw_ostream'</div><div>279> .\llvm\tools\clang\include\clang/Basic/LLVM.h(47) : see declaration of 'llvm::raw_ostream'</div><div>279>.\llvm\tools\clang\include\clang/AST/Decl.h(176) : error C2027: use of undefined type 'llvm::raw_ostream'</div><div>279> .\llvm\tools\clang\include\clang/Basic/LLVM.h(47) : see declaration of 'llvm::raw_ostream'</div><div>279>.\llvm\include\llvm/Support/raw_ostream.h(309) : error C2504: 'llvm::raw_ostream' : base class undefined</div><div>279>.\llvm\include\llvm/Support/raw_ostream.h(441) : error C2504: 'llvm::raw_ostream' : base class undefined</div><div>279>.\llvm\include\llvm/Support/raw_ostream.h(457) : error C3861: 'flush': identifier not found</div><div>279>.\llvm\include\llvm/Support/raw_ostream.h(465) : error C2504: 'llvm::raw_ostream' : base class undefined</div><div>279>.\llvm\include\llvm/Support/raw_ostream.h(493) : error C2504: 'llvm::raw_ostream' : base class undefined</div><div>275>Performing Pre-Link Event...</div><div>..</div><div>281>VariableNaming.cpp</div><div>279>.\llvm\include\llvm/Support/raw_ostream.h(309) : error C2504: 'llvm::raw_ostream' : base class undefined</div><div>279>.\llvm\include\llvm/Support/raw_ostream.h(441) : error C2504: 'llvm::raw_ostream' : base class undefined</div><div>279>.\llvm\include\llvm/Support/raw_ostream.h(457) : error C3861: 'flush': identifier not found</div><div>279>.\llvm\include\llvm/Support/raw_ostream.h(465) : error C2504: 'llvm::raw_ostream' : base class undefined</div><div>279>.\llvm\include\llvm/Support/raw_ostream.h(493) : error C2504: 'llvm::raw_ostream' : base class undefined</div><div>283>RemoveCStrCalls.cpp</div><div>279>..\..\..\..\..\..\tools\clang\lib\StaticAnalyzer\Frontend\AnalysisConsumer.cpp(96) : error C2678: binary '<<' : no operator found which takes a left-hand operand of type 'llvm::raw_svector_ostream' (or there is no acceptable conversion)</div><div>279> .\llvm\include\llvm/ADT/APInt.h(1576): could be 'llvm::raw_ostream &llvm::operator <<(llvm::raw_ostream &,const llvm::APInt &)' [found using argument-dependent lookup]</div><div>279> .\llvm\include\llvm/ADT/APSInt.h(305): or 'llvm::raw_ostream &llvm::operator <<(llvm::raw_ostream &,const llvm::APSInt &)' [found using argument-dependent lookup]</div><div>279> .\llvm\include\llvm/ADT/Twine.h(516): or 'llvm::raw_ostream &llvm::operator <<(llvm::raw_ostream &,const llvm::Twine &)' [found using argument-dependent lookup]</div><div>279> .\llvm\tools\clang\include\clang/StaticAnalyzer/Core/PathSensitive/SymbolManager.h(668): or 'llvm::raw_ostream &llvm::operator <<(llvm::raw_ostream &,const clang::ento::SymExpr *)' [found using argument-dependent lookup]</div><div>279> .\llvm\tools\clang\include\clang/StaticAnalyzer/Core/PathSensitive/SVals.h(539): or 'llvm::raw_ostream &llvm::operator <<(llvm::raw_ostream &,clang::ento::SVal)' [found using argument-dependent lookup]</div><div>279> .\llvm\tools\clang\include\clang/StaticAnalyzer/Core/PathSensitive/MemRegion.h(1290): or 'llvm::raw_ostream &llvm::operator <<(llvm::raw_ostream &,const clang::ento::MemRegion *)' [found using argument-dependent lookup]</div><div>279> .\llvm\tools\clang\include\clang/Basic/Diagnostic.h(988): or 'const clang::DiagnosticBuilder &clang::operator <<(const clang::DiagnosticBuilder &,llvm::StringRef)'</div><div>279> .\llvm\tools\clang\include\clang/Basic/Diagnostic.h(994): or 'const clang::DiagnosticBuilder &clang::operator <<(const clang::DiagnosticBuilder &,const char *)'</div><div>279> .\llvm\tools\clang\include\clang/Basic/Diagnostic.h(1001): or 'const clang::DiagnosticBuilder &clang::operator <<(const clang::DiagnosticBuilder &,int)'</div><div>279> .\llvm\tools\clang\include\clang/Basic/Diagnostic.h(1006): or 'const clang::DiagnosticBuilder &clang::operator <<(const clang::DiagnosticBuilder &,bool)'</div><div>279> .\llvm\tools\clang\include\clang/Basic/Diagnostic.h(1011): or 'const clang::DiagnosticBuilder &clang::operator <<(const clang::DiagnosticBuilder &,unsigned int)'</div><div>279> .\llvm\tools\clang\include\clang/Basic/Diagnostic.h(1017): or 'const clang::DiagnosticBuilder &clang::operator <<(const clang::DiagnosticBuilder &,const clang::IdentifierInfo *)'</div><div>279> .\llvm\tools\clang\include\clang/Basic/Diagnostic.h(1038): or 'const clang::DiagnosticBuilder &clang::operator <<(const clang::DiagnosticBuilder &,const clang::SourceRange &)'</div><div>279> .\llvm\tools\clang\include\clang/Basic/Diagnostic.h(1044): or 'const clang::DiagnosticBuilder &clang::operator <<(const clang::DiagnosticBuilder &,const clang::CharSourceRange &)'</div><div>279> .\llvm\tools\clang\include\clang/Basic/Diagnostic.h(1050): or 'const clang::DiagnosticBuilder &clang::operator <<(const clang::DiagnosticBuilder &,const clang::FixItHint &)'</div><div>279> .\llvm\tools\clang\include\clang/Basic/PartialDiagnostic.h(390): or 'const clang::DiagnosticBuilder &clang::operator <<(const clang::DiagnosticBuilder &,const clang::PartialDiagnostic &)'</div><div>279> .\llvm\tools\clang\include\clang/AST/DeclarationName.h(537): or 'const clang::DiagnosticBuilder &clang::operator <<(const clang::DiagnosticBuilder &,clang::DeclarationName)'</div><div>279> .\llvm\tools\clang\include\clang/AST/DeclarationName.h(546): or 'const clang::PartialDiagnostic &clang::operator <<(const clang::PartialDiagnostic &,clang::DeclarationName)'</div><div>279> .\llvm\tools\clang\include\clang/AST/DeclarationName.h(553): or 'llvm::raw_ostream &clang::operator <<(llvm::raw_ostream &,clang::DeclarationNameInfo)'</div><div>279> .\llvm\tools\clang\include\clang/AST/NestedNameSpecifier.h(472): or 'const clang::DiagnosticBuilder &clang::operator <<(const clang::DiagnosticBuilder &,clang::NestedNameSpecifier *)'</div><div>279> .\llvm\tools\clang\include\clang/AST/TemplateName.h(333): or 'const clang::DiagnosticBuilder &clang::operator <<(const clang::DiagnosticBuilder &,clang::TemplateName)'</div><div>279> .\llvm\tools\clang\include\clang/AST/Type.h(5058): or 'const clang::DiagnosticBuilder &clang::operator <<(const clang::DiagnosticBuilder &,clang::QualType)'</div><div>279> .\llvm\tools\clang\include\clang/AST/Type.h(5067): or 'const clang::PartialDiagnostic &clang::operator <<(const clang::PartialDiagnostic &,clang::QualType)'</div><div>279> .\llvm\tools\clang\include\clang/AST/Decl.h(336): or 'llvm::raw_ostream &clang::operator <<(llvm::raw_ostream &,const clang::NamedDecl &)'</div><div>279> .\llvm\tools\clang\include\clang/AST/Decl.h(3304): or 'const clang::DiagnosticBuilder &clang::operator <<(const clang::DiagnosticBuilder &,const clang::NamedDecl *)'</div><div>279> .\llvm\tools\clang\include\clang/AST/Decl.h(3310): or 'const clang::PartialDiagnostic &clang::operator <<(const clang::PartialDiagnostic &,const clang::NamedDecl *)'</div><div>279> .\llvm\tools\clang\include\clang/AST/TemplateBase.h(625): or 'const clang::DiagnosticBuilder &clang::operator <<(const clang::DiagnosticBuilder &,const clang::TemplateArgument &)'</div><div>279> .\llvm\tools\clang\include\clang/AST/DeclCXX.h(2989): or 'const clang::DiagnosticBuilder &clang::operator <<(const clang::DiagnosticBuilder &,clang::AccessSpecifier)'</div><div>279> .\llvm\tools\clang\include\clang/AST/DeclCXX.h(2992): or 'const clang::PartialDiagnostic &clang::operator <<(const clang::PartialDiagnostic &,clang::AccessSpecifier)'</div><div>279> .\llvm\tools\clang\include\clang/AST/DeclObjC.h(1763): or 'llvm::raw_ostream &clang::operator <<(llvm::raw_ostream &,const clang::ObjCCategoryImplDecl &)'</div><div>279> .\llvm\tools\clang\include\clang/AST/DeclObjC.h(1917): or 'llvm::raw_ostream &clang::operator <<(llvm::raw_ostream &,const clang::ObjCImplementationDecl &)'</div><div>279> .\llvm\tools\clang\include\clang/Basic/VersionTuple.h(135): or 'llvm::raw_ostream &clang::operator <<(llvm::raw_ostream &,const clang::VersionTuple &)'</div><div>279> .\llvm\tools\clang\include\clang/Basic/ObjCRuntime.h(307): or 'llvm::raw_ostream &clang::operator <<(llvm::raw_ostream &,const clang::ObjCRuntime &)'</div><div>279> .\llvm\tools\clang\include\clang/AST/CanonicalType.h(205): or 'const clang::DiagnosticBuilder &clang::operator <<(const clang::DiagnosticBuilder &,clang::CanQualType)'</div><div>279> while trying to match the argument list '(llvm::raw_svector_ostream, const char [3])'</div><div>..</div><div><div>On Feb 22, 2013, at 7:46 AM, Benjamin Kramer <<a href="mailto:benny.kra@googlemail.com">benny.kra@googlemail.com</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite">Author: d0k<br>Date: Fri Feb 22 09:46:08 2013<br>New Revision: 175895<br><br>URL: <a href="http://llvm.org/viewvc/llvm-project?rev=175895&view=rev">http://llvm.org/viewvc/llvm-project?rev=175895&view=rev</a><br>Log:<br>Streamify FormatASTNodeDiagnosticArgument.<br><br>Modified:<br> cfe/trunk/lib/AST/ASTDiagnostic.cpp<br><br>Modified: cfe/trunk/lib/AST/ASTDiagnostic.cpp<br>URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/AST/ASTDiagnostic.cpp?rev=175895&r1=175894&r2=175895&view=diff">http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/AST/ASTDiagnostic.cpp?rev=175895&r1=175894&r2=175895&view=diff</a><br>==============================================================================<br>--- cfe/trunk/lib/AST/ASTDiagnostic.cpp (original)<br>+++ cfe/trunk/lib/AST/ASTDiagnostic.cpp Fri Feb 22 09:46:08 2013<br>@@ -247,7 +247,8 @@ void clang::FormatASTNodeDiagnosticArgum<br> ArrayRef<intptr_t> QualTypeVals) {<br> ASTContext &Context = *static_cast<ASTContext*>(Cookie);<br><br>- std::string S;<br>+ size_t OldEnd = Output.size();<br>+ llvm::raw_svector_ostream OS(Output);<br> bool NeedQuotes = true;<br><br> switch (Kind) {<br>@@ -259,6 +260,7 @@ void clang::FormatASTNodeDiagnosticArgum<br> QualType ToType =<br> QualType::getFromOpaquePtr(reinterpret_cast<void*>(TDT.ToType));<br><br>+ std::string S;<br> if (FormatTemplateTypeDiff(Context, FromType, ToType, TDT.PrintTree,<br> TDT.PrintFromType, TDT.ElideType,<br> TDT.ShowColors, S)) {<br>@@ -266,13 +268,14 @@ void clang::FormatASTNodeDiagnosticArgum<br> TDT.TemplateDiffUsed = true;<br> break;<br> }<br>+ OS << S;<br><br> // Don't fall-back during tree printing. The caller will handle<br> // this case.<br> if (TDT.PrintTree)<br> return;<br><br>- // Attempting to do a templete diff on non-templates. Set the variables<br>+ // Attempting to do a template diff on non-templates. Set the variables<br> // and continue with regular type printing of the appropriate type.<br> Val = TDT.PrintFromType ? TDT.FromType : TDT.ToType;<br> ModLen = 0;<br>@@ -284,23 +287,23 @@ void clang::FormatASTNodeDiagnosticArgum<br> "Invalid modifier for QualType argument");<br><br> QualType Ty(QualType::getFromOpaquePtr(reinterpret_cast<void*>(Val)));<br>- S = ConvertTypeToDiagnosticString(Context, Ty, PrevArgs, NumPrevArgs,<br>- QualTypeVals);<br>+ OS << ConvertTypeToDiagnosticString(Context, Ty, PrevArgs, NumPrevArgs,<br>+ QualTypeVals);<br> NeedQuotes = false;<br> break;<br> }<br> case DiagnosticsEngine::ak_declarationname: {<br>- DeclarationName N = DeclarationName::getFromOpaqueInteger(Val);<br>- S = N.getAsString();<br>- <br> if (ModLen == 9 && !memcmp(Modifier, "objcclass", 9) && ArgLen == 0)<br>- S = '+' + S;<br>+ OS << '+';<br> else if (ModLen == 12 && !memcmp(Modifier, "objcinstance", 12)<br> && ArgLen==0)<br>- S = '-' + S;<br>+ OS << '-';<br> else<br> assert(ModLen == 0 && ArgLen == 0 &&<br> "Invalid modifier for DeclarationName argument");<br>+<br>+ DeclarationName N = DeclarationName::getFromOpaqueInteger(Val);<br>+ N.printName(OS);<br> break;<br> }<br> case DiagnosticsEngine::ak_nameddecl: {<br>@@ -313,14 +316,12 @@ void clang::FormatASTNodeDiagnosticArgum<br> Qualified = false;<br> }<br> const NamedDecl *ND = reinterpret_cast<const NamedDecl*>(Val);<br>- llvm::raw_string_ostream OS(S);<br> ND->getNameForDiagnostic(OS, Context.getPrintingPolicy(), Qualified);<br> break;<br> }<br> case DiagnosticsEngine::ak_nestednamespec: {<br>- llvm::raw_string_ostream OS(S);<br>- reinterpret_cast<NestedNameSpecifier*>(Val)->print(OS,<br>- Context.getPrintingPolicy());<br>+ NestedNameSpecifier *NNS = reinterpret_cast<NestedNameSpecifier*>(Val);<br>+ NNS->print(OS, Context.getPrintingPolicy());<br> NeedQuotes = false;<br> break;<br> }<br>@@ -331,42 +332,39 @@ void clang::FormatASTNodeDiagnosticArgum<br> if (DC->isTranslationUnit()) {<br> // FIXME: Get these strings from some localized place<br> if (Context.getLangOpts().CPlusPlus)<br>- S = "the global namespace";<br>+ OS << "the global namespace";<br> else<br>- S = "the global scope";<br>+ OS << "the global scope";<br> } else if (TypeDecl *Type = dyn_cast<TypeDecl>(DC)) {<br>- S = ConvertTypeToDiagnosticString(Context, <br>- Context.getTypeDeclType(Type),<br>- PrevArgs, NumPrevArgs, QualTypeVals);<br>+ OS << ConvertTypeToDiagnosticString(Context,<br>+ Context.getTypeDeclType(Type),<br>+ PrevArgs, NumPrevArgs,<br>+ QualTypeVals);<br> } else {<br> // FIXME: Get these strings from some localized place<br> NamedDecl *ND = cast<NamedDecl>(DC);<br> if (isa<NamespaceDecl>(ND))<br>- S += "namespace ";<br>+ OS << "namespace ";<br> else if (isa<ObjCMethodDecl>(ND))<br>- S += "method ";<br>+ OS << "method ";<br> else if (isa<FunctionDecl>(ND))<br>- S += "function ";<br>- <br>- S += "'";<br>- {<br>- llvm::raw_string_ostream OS(S);<br>- ND->getNameForDiagnostic(OS, Context.getPrintingPolicy(), true);<br>- }<br>- S += "'";<br>+ OS << "function ";<br>+<br>+ OS << '\'';<br>+ ND->getNameForDiagnostic(OS, Context.getPrintingPolicy(), true);<br>+ OS << '\'';<br> }<br> NeedQuotes = false;<br> break;<br> }<br> }<br>- <br>- if (NeedQuotes)<br>- Output.push_back('\'');<br>- <br>- Output.append(S.begin(), S.end());<br>- <br>- if (NeedQuotes)<br>+<br>+ OS.flush();<br>+<br>+ if (NeedQuotes) {<br>+ Output.insert(Output.begin()+OldEnd, '\'');<br> Output.push_back('\'');<br>+ }<br> }<br><br> /// TemplateDiff - A class that constructs a pretty string for a pair of<br><br><br>_______________________________________________<br>cfe-commits mailing list<br><a href="mailto:cfe-commits@cs.uiuc.edu">cfe-commits@cs.uiuc.edu</a><br>http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits<br></blockquote></div><br></div></body></html>