aboutsummaryrefslogtreecommitdiff
path: root/include/clang/Sema/DeclSpec.h
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2011-07-13 21:47:47 +0000
committerDouglas Gregor <dgregor@apple.com>2011-07-13 21:47:47 +0000
commit90ebed0734fac9b464c9bdff53fbf85a86b27f32 (patch)
treeffe3f053b64d63f91e58237e6159f00e81b9214d /include/clang/Sema/DeclSpec.h
parent1255aaf10285ca60f236b4fe7c326b629b5cf788 (diff)
Add 'mutable' to the function declarator chunk, to be used when
parsing lambda expressions, from John Freeman! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135090 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/clang/Sema/DeclSpec.h')
-rw-r--r--include/clang/Sema/DeclSpec.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/include/clang/Sema/DeclSpec.h b/include/clang/Sema/DeclSpec.h
index cbf47e8b05..a66649955c 100644
--- a/include/clang/Sema/DeclSpec.h
+++ b/include/clang/Sema/DeclSpec.h
@@ -1097,6 +1097,10 @@ struct DeclaratorChunk {
/// If this is an invalid location, there is no ref-qualifier.
unsigned RefQualifierLoc;
+ /// \brief The location of the 'mutable' qualifer in a lambda-declarator, if
+ /// any.
+ unsigned MutableLoc;
+
/// \brief When ExceptionSpecType isn't EST_None or EST_Delayed, the
/// location of the keyword introducing the spec.
unsigned ExceptionSpecLoc;
@@ -1158,10 +1162,19 @@ struct DeclaratorChunk {
return SourceLocation::getFromRawEncoding(RefQualifierLoc);
}
+ /// \brief Retrieve the location of the 'mutable' qualifier, if any.
+ SourceLocation getMutableLoc() const {
+ return SourceLocation::getFromRawEncoding(MutableLoc);
+ }
+
/// \brief Determine whether this function declaration contains a
/// ref-qualifier.
bool hasRefQualifier() const { return getRefQualifierLoc().isValid(); }
+ /// \brief Determine whether this lambda-declarator contains a 'mutable'
+ /// qualifier.
+ bool hasMutableQualifier() const { return getMutableLoc().isValid(); }
+
/// \brief Get the type of exception specification this function has.
ExceptionSpecificationType getExceptionSpecType() const {
return static_cast<ExceptionSpecificationType>(ExceptionSpecType);
@@ -1285,6 +1298,7 @@ struct DeclaratorChunk {
unsigned TypeQuals,
bool RefQualifierIsLvalueRef,
SourceLocation RefQualifierLoc,
+ SourceLocation MutableLoc,
ExceptionSpecificationType ESpecType,
SourceLocation ESpecLoc,
ParsedType *Exceptions,