diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2017-12-18 20:11:37 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2017-12-18 20:11:37 +0000 |
commit | 461a67fa15370a9ec88f8f8a240bf7c123bb2029 (patch) | |
tree | 6942083d7d56bba40ec790a453ca58ad3baf6832 /lib/AST/DeclFriend.cpp | |
parent | 75c3240472ba6ac2669ee72ca67eb72d4e2851fc (diff) |
Diffstat (limited to 'lib/AST/DeclFriend.cpp')
-rw-r--r-- | lib/AST/DeclFriend.cpp | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/lib/AST/DeclFriend.cpp b/lib/AST/DeclFriend.cpp index 121403b07e575..461bf36858b74 100644 --- a/lib/AST/DeclFriend.cpp +++ b/lib/AST/DeclFriend.cpp @@ -1,4 +1,4 @@ -//===--- DeclFriend.cpp - C++ Friend Declaration AST Node Implementation --===// +//===- DeclFriend.cpp - C++ Friend Declaration AST Node Implementation ----===// // // The LLVM Compiler Infrastructure // @@ -12,12 +12,20 @@ // //===----------------------------------------------------------------------===// -#include "clang/AST/ASTContext.h" #include "clang/AST/DeclFriend.h" +#include "clang/AST/Decl.h" +#include "clang/AST/DeclBase.h" +#include "clang/AST/DeclCXX.h" +#include "clang/AST/ASTContext.h" #include "clang/AST/DeclTemplate.h" +#include "clang/Basic/LLVM.h" +#include "llvm/Support/Casting.h" +#include <cassert> +#include <cstddef> + using namespace clang; -void FriendDecl::anchor() { } +void FriendDecl::anchor() {} FriendDecl *FriendDecl::getNextFriendSlowCase() { return cast_or_null<FriendDecl>( @@ -28,9 +36,9 @@ FriendDecl *FriendDecl::Create(ASTContext &C, DeclContext *DC, SourceLocation L, FriendUnion Friend, SourceLocation FriendL, - ArrayRef<TemplateParameterList*> FriendTypeTPLists) { + ArrayRef<TemplateParameterList *> FriendTypeTPLists) { #ifndef NDEBUG - if (Friend.is<NamedDecl*>()) { + if (Friend.is<NamedDecl *>()) { NamedDecl *D = Friend.get<NamedDecl*>(); assert(isa<FunctionDecl>(D) || isa<CXXRecordDecl>(D) || @@ -42,7 +50,7 @@ FriendDecl *FriendDecl::Create(ASTContext &C, DeclContext *DC, assert(D->getFriendObjectKind() || (cast<CXXRecordDecl>(DC)->getTemplateSpecializationKind())); // These template parameters are for friend types only. - assert(FriendTypeTPLists.size() == 0); + assert(FriendTypeTPLists.empty()); } #endif |