diff options
author | John McCall <rjmccall@apple.com> | 2013-02-16 00:17:33 +0000 |
---|---|---|
committer | John McCall <rjmccall@apple.com> | 2013-02-16 00:17:33 +0000 |
commit | 5a758de93fa2a28a84eb0d918a31d9522472990c (patch) | |
tree | 2016980e67909d016f06a75e570da1751d91326a /include/clang/AST/TemplateBase.h | |
parent | a6e0a0db0afcbdcd5b7c939869a39754332ad040 (diff) |
Rework the visibility computation algorithm in preparation
for distinguishing type vs. value visibility.
The changes to the visibility of explicit specializations
are intentional. The change to the "ugly" test case is
a consequence of a sensible implementation, and I am happy
to argue that this is better behavior. Other changes may
or may not be intended; it is quite difficult to divine
intent from some of the code I altered.
I've left behind a comment which I hope explains the
philosophy behind visibility computation.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@175326 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/clang/AST/TemplateBase.h')
-rw-r--r-- | include/clang/AST/TemplateBase.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/include/clang/AST/TemplateBase.h b/include/clang/AST/TemplateBase.h index 6899fdb7d9..da57293b08 100644 --- a/include/clang/AST/TemplateBase.h +++ b/include/clang/AST/TemplateBase.h @@ -317,6 +317,12 @@ public: return Args.NumArgs; } + /// \brief Return the array of arguments in this template argument pack. + llvm::ArrayRef<TemplateArgument> getPackAsArray() const { + assert(Kind == Pack); + return llvm::ArrayRef<TemplateArgument>(Args.Args, Args.NumArgs); + } + /// \brief Determines whether two template arguments are superficially the /// same. bool structurallyEquals(const TemplateArgument &Other) const; |