diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2017-12-24 01:08:34 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2017-12-24 01:08:34 +0000 |
commit | 13ddaa8416c02b81fbab9357336f4e70624b7652 (patch) | |
tree | 7a0f6b255a547001b88203525cf7cd0e399acdf9 /contrib/llvm/tools/clang/lib/AST/TypePrinter.cpp | |
parent | da09e106efc76da569f2bad3d59b6b19b503bf39 (diff) | |
parent | 6252156da5066bd47f63f8bd40404d1f89909d32 (diff) | |
download | src-13ddaa8416c02b81fbab9357336f4e70624b7652.tar.gz src-13ddaa8416c02b81fbab9357336f4e70624b7652.zip |
Merge clang trunk r321414 to contrib/llvm.
Notes
Notes:
svn path=/projects/clang600-import/; revision=327135
Diffstat (limited to 'contrib/llvm/tools/clang/lib/AST/TypePrinter.cpp')
-rw-r--r-- | contrib/llvm/tools/clang/lib/AST/TypePrinter.cpp | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/contrib/llvm/tools/clang/lib/AST/TypePrinter.cpp b/contrib/llvm/tools/clang/lib/AST/TypePrinter.cpp index 35e0b75f3c22..c28ada7dcb8b 100644 --- a/contrib/llvm/tools/clang/lib/AST/TypePrinter.cpp +++ b/contrib/llvm/tools/clang/lib/AST/TypePrinter.cpp @@ -213,7 +213,7 @@ bool TypePrinter::canPrefixQualifiers(const Type *T, case Type::VariableArray: case Type::DependentSizedArray: NeedARCStrongQualifier = true; - // Fall through + LLVM_FALLTHROUGH; case Type::Adjusted: case Type::Decayed: @@ -1712,16 +1712,20 @@ void Qualifiers::print(raw_ostream &OS, const PrintingPolicy& Policy, OS << ' '; } +std::string QualType::getAsString() const { + return getAsString(split(), LangOptions()); +} + std::string QualType::getAsString(const PrintingPolicy &Policy) const { std::string S; getAsStringInternal(S, Policy); return S; } -std::string QualType::getAsString(const Type *ty, Qualifiers qs) { +std::string QualType::getAsString(const Type *ty, Qualifiers qs, + const PrintingPolicy &Policy) { std::string buffer; - LangOptions options; - getAsStringInternal(ty, qs, buffer, PrintingPolicy(options)); + getAsStringInternal(ty, qs, buffer, Policy); return buffer; } |