[clang] Add a raw_ostream operator<< overload for QualType
authorNathan James <n.james93@hotmail.co.uk>
Wed, 20 Apr 2022 21:09:03 +0000 (22:09 +0100)
committerNathan James <n.james93@hotmail.co.uk>
Wed, 20 Apr 2022 21:09:05 +0000 (22:09 +0100)
commitcfb8169059c807ed5fbfb66b3ed558b7b6eb2833
tree2a3167386c039eece5bccbdfceec00017c736eb7
parentfaef447e72a5c63dfb12bb7b02d44c3c916d31cd
[clang] Add a raw_ostream operator<< overload for QualType

Under the hood this prints the same as `QualType::getAsString()` but cuts out the middle-man when that string is sent to another raw_ostream.

Also cleaned up all the call sites where this occurs.

Reviewed By: aaron.ballman

Differential Revision: https://reviews.llvm.org/D123926
27 files changed:
clang/include/clang/AST/Type.h
clang/include/clang/StaticAnalyzer/Checkers/SValExplainer.h
clang/lib/AST/RecordLayoutBuilder.cpp
clang/lib/AST/TypePrinter.cpp
clang/lib/AST/VTableBuilder.cpp
clang/lib/Analysis/AnalysisDeclContext.cpp
clang/lib/Analysis/CFG.cpp
clang/lib/Analysis/FlowSensitive/DataflowEnvironment.cpp
clang/lib/Sema/CodeCompleteConsumer.cpp
clang/lib/Sema/SemaInit.cpp
clang/lib/StaticAnalyzer/Checkers/CStringChecker.cpp
clang/lib/StaticAnalyzer/Checkers/CheckObjCInstMethSignature.cpp
clang/lib/StaticAnalyzer/Checkers/CheckSecuritySyntaxOnly.cpp
clang/lib/StaticAnalyzer/Checkers/InnerPointerChecker.cpp
clang/lib/StaticAnalyzer/Checkers/LLVMConventionsChecker.cpp
clang/lib/StaticAnalyzer/Checkers/MallocChecker.cpp
clang/lib/StaticAnalyzer/Checkers/MallocSizeofChecker.cpp
clang/lib/StaticAnalyzer/Checkers/NumberObjectConversionChecker.cpp
clang/lib/StaticAnalyzer/Checkers/ObjCContainersASTChecker.cpp
clang/lib/StaticAnalyzer/Checkers/RetainCountChecker/RetainCountChecker.cpp
clang/lib/StaticAnalyzer/Checkers/RetainCountChecker/RetainCountDiagnostics.cpp
clang/lib/StaticAnalyzer/Checkers/UndefResultChecker.cpp
clang/lib/StaticAnalyzer/Core/DynamicType.cpp
clang/lib/StaticAnalyzer/Core/MemRegion.cpp
clang/lib/StaticAnalyzer/Core/SVals.cpp
clang/lib/StaticAnalyzer/Core/SymbolManager.cpp
clang/unittests/AST/ASTTraverserTest.cpp