diff options
author | David Blaikie <dblaikie@gmail.com> | 2012-08-10 00:55:35 +0000 |
---|---|---|
committer | David Blaikie <dblaikie@gmail.com> | 2012-08-10 00:55:35 +0000 |
commit | 4ef832ffc1147ce2f9777f9fad650cb3139a1d00 (patch) | |
tree | dc93f3b50bb92e4186c00d1311690f5325daa33f /lib/AST/DeclPrinter.cpp | |
parent | 74896e074856c3248d88ddddf45bfda7256ab022 (diff) |
Provide isConst/Volatile on CXXMethodDecl.
This also provides isConst/Volatile/Restrict on FunctionTypes to coalesce
the implementation with other callers (& update those other callers).
Patch contributed by Sam Panzer (panzer@google.com).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161647 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/AST/DeclPrinter.cpp')
-rw-r--r-- | lib/AST/DeclPrinter.cpp | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/lib/AST/DeclPrinter.cpp b/lib/AST/DeclPrinter.cpp index 8e00e5af6d..aad0ca1b53 100644 --- a/lib/AST/DeclPrinter.cpp +++ b/lib/AST/DeclPrinter.cpp @@ -440,13 +440,12 @@ void DeclPrinter::VisitFunctionDecl(FunctionDecl *D) { Proto += ")"; - if (FT && FT->getTypeQuals()) { - unsigned TypeQuals = FT->getTypeQuals(); - if (TypeQuals & Qualifiers::Const) + if (FT) { + if (FT->isConst()) Proto += " const"; - if (TypeQuals & Qualifiers::Volatile) + if (FT->isVolatile()) Proto += " volatile"; - if (TypeQuals & Qualifiers::Restrict) + if (FT->isRestrict()) Proto += " restrict"; } |