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 | b95cfe4bb01f18a112bcb7eea3b82bc8d6dfe20b (patch) | |
tree | 97535094df475cee983060f4711fff356ceab114 | |
parent | 75f91d6c5d654cb8570e299e19b18fe8aff4bba6 (diff) |
Make sure to print cvr-qualifiers on function declarations
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119817 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | lib/AST/DeclPrinter.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/AST/DeclPrinter.cpp b/lib/AST/DeclPrinter.cpp index a8f19952b6..a6e60aa5af 100644 --- a/lib/AST/DeclPrinter.cpp +++ b/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()) |