projects
/
clang
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
75f91d6
)
Make sure to print cvr-qualifiers on function declarations
author
Douglas Gregor
<dgregor@apple.com>
Fri, 19 Nov 2010 18:44:34 +0000
(18:44 +0000)
committer
Douglas Gregor
<dgregor@apple.com>
Fri, 19 Nov 2010 18:44:34 +0000
(18:44 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119817
91177308
-0d34-0410-b5e6-
96231b3b80d8
lib/AST/DeclPrinter.cpp
patch
|
blob
|
history
diff --git
a/lib/AST/DeclPrinter.cpp
b/lib/AST/DeclPrinter.cpp
index a8f19952b698e1f8b5c3d410ba066dbe9ce82e28..a6e60aa5afaa007474690b5a05a1c710c6c939e9 100644
(file)
--- 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())