[llvm-bugs] [Bug 26383] New: QualType::print prints "&" when PrintingPolicy.SuppressSpecifiers is true for reference types
via llvm-bugs
llvm-bugs at lists.llvm.org
Fri Jan 29 17:47:44 PST 2016
https://llvm.org/bugs/show_bug.cgi?id=26383
Bug ID: 26383
Summary: QualType::print prints "&" when
PrintingPolicy.SuppressSpecifiers is true for
reference types
Product: clang
Version: unspecified
Hardware: PC
OS: Windows NT
Status: NEW
Severity: normal
Priority: P
Component: libclang
Assignee: unassignedclangbugs at nondot.org
Reporter: dpldobrev at protonmail.com
CC: klimek at google.com, llvm-bugs at lists.llvm.org
Classification: Unclassified
Let have the type of "const QString&" and default (C++) language options. After
printing it like this:
PrintingPolicy TypePolicy(LangOpts);
TypePolicy.SuppressSpecifiers = true;
std::string String;
llvm::raw_string_ostream StringStream(String);
Type.print(StringStream, TypePolicy);
StringStream.flush();
String contains "&". Even if we assume skipping the entire type because of
"SuppressSpecifiers" is correct, the result should be an empty string because
"&" is part of the type.
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20160130/f8452c2c/attachment.html>
More information about the llvm-bugs
mailing list