Make sure to print cvr-qualifiers on function declarations

llvm-svn: 119817
This commit is contained in:
Douglas Gregor 2010-11-19 18:44:34 +00:00
parent 8be14414f6
commit 8fc96fc555
1 changed files with 10 additions and 0 deletions

View File

@ -379,6 +379,16 @@ void DeclPrinter::VisitFunctionDecl(FunctionDecl *D) {
Proto += ")";
if (FT && FT->getTypeQuals()) {
unsigned TypeQuals = FT->getTypeQuals();
if (TypeQuals & Qualifiers::Const)
Proto += " const";
if (TypeQuals & Qualifiers::Volatile)
Proto += " volatile";
if (TypeQuals & Qualifiers::Restrict)
Proto += " restrict";
}
if (FT && FT->hasExceptionSpec()) {
Proto += " throw(";
if (FT->hasAnyExceptionSpec())