diff options
author | Douglas Gregor <dgregor@apple.com> | 2010-11-19 18:44:34 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2010-11-19 18:44:34 +0000 |
commit | 8fc96fc55594b51475d2674cf907ed80849af1a5 (patch) | |
tree | a29accd097b520e4ffe16de790f51f4c6914f32d /clang/lib/AST/DeclPrinter.cpp | |
parent | 8be14414f6f3c4165c5686885e54d1ccfe53b035 (diff) | |
download | bcm5719-llvm-8fc96fc55594b51475d2674cf907ed80849af1a5.tar.gz bcm5719-llvm-8fc96fc55594b51475d2674cf907ed80849af1a5.zip |
Make sure to print cvr-qualifiers on function declarations
llvm-svn: 119817
Diffstat (limited to 'clang/lib/AST/DeclPrinter.cpp')
-rw-r--r-- | clang/lib/AST/DeclPrinter.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/clang/lib/AST/DeclPrinter.cpp b/clang/lib/AST/DeclPrinter.cpp index a8f19952b69..a6e60aa5afa 100644 --- a/clang/lib/AST/DeclPrinter.cpp +++ b/clang/lib/AST/DeclPrinter.cpp @@ -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()) |