]> granicus.if.org Git - clang/commit
Provide operator<< for stream output of DeclarationNames
authorDavid Blaikie <dblaikie@gmail.com>
Tue, 14 May 2013 21:04:00 +0000 (21:04 +0000)
committerDavid Blaikie <dblaikie@gmail.com>
Tue, 14 May 2013 21:04:00 +0000 (21:04 +0000)
commit17828ca5857d5d9cadfffd339f888de58182c8f1
treed0ac9c7d802c724739a99835e6aed789606fae8c
parenta3d813a8c292bee8349ef43065dab9b344650351
Provide operator<< for stream output of DeclarationNames

ASTDumper was already trying to do this & instead got an implicit bool
conversion by surprise (thus printing out 0 or 1 instead of the name of
the declaration). To avoid that issue & simplify call sites, simply make
it the normal/expected operator<<(raw_ostream&, ...) overload & simplify
all the existing call sites. (bonus: this function doesn't need to be a
member or friend, it's just using public API in DeclarationName)

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181832 91177308-0d34-0410-b5e6-96231b3b80d8
include/clang/AST/Decl.h
include/clang/AST/DeclarationName.h
lib/AST/ASTDiagnostic.cpp
lib/AST/ASTDumper.cpp
lib/AST/DeclarationName.cpp
lib/Sema/SemaLookup.cpp
lib/StaticAnalyzer/Core/BugReporterVisitors.cpp
test/Misc/ast-dump-templates.cpp
tools/libclang/CIndexUSRs.cpp