summaryrefslogtreecommitdiffstats
path: root/clang/lib/Parse/DeclSpec.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/lib/Parse/DeclSpec.cpp')
-rw-r--r--clang/lib/Parse/DeclSpec.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/clang/lib/Parse/DeclSpec.cpp b/clang/lib/Parse/DeclSpec.cpp
index d742ef2ed09..e592deecd04 100644
--- a/clang/lib/Parse/DeclSpec.cpp
+++ b/clang/lib/Parse/DeclSpec.cpp
@@ -294,6 +294,16 @@ bool DeclSpec::SetFunctionSpecExplicit(SourceLocation Loc, const char *&PrevSpec
return false;
}
+bool DeclSpec::SetFriendSpec(SourceLocation Loc, const char *&PrevSpec) {
+ if (Friend_specified) {
+ PrevSpec = "friend";
+ return true;
+ }
+
+ Friend_specified = true;
+ FriendLoc = Loc;
+ return false;
+}
/// Finish - This does final analysis of the declspec, rejecting things like
/// "_Imaginary" (lacking an FP type). This returns a diagnostic to issue or
OpenPOWER on IntegriCloud