summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema/SemaDeclCXX.cpp
diff options
context:
space:
mode:
authorNick Lewycky <nicholas@mxc.ca>2014-01-11 02:50:57 +0000
committerNick Lewycky <nicholas@mxc.ca>2014-01-11 02:50:57 +0000
commit35a6ef4c35cca71540255d7531af91f14515577d (patch)
tree78e147cf9261b23f6c4657f3f90e07c62717699c /clang/lib/Sema/SemaDeclCXX.cpp
parent5641233047034ae122c0204cb91b6e5f2da29319 (diff)
downloadbcm5719-llvm-35a6ef4c35cca71540255d7531af91f14515577d.tar.gz
bcm5719-llvm-35a6ef4c35cca71540255d7531af91f14515577d.zip
Add a new attribute 'enable_if' which can be used to control overload resolution based on the values of the function arguments at the call site.
llvm-svn: 198996
Diffstat (limited to 'clang/lib/Sema/SemaDeclCXX.cpp')
-rw-r--r--clang/lib/Sema/SemaDeclCXX.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/clang/lib/Sema/SemaDeclCXX.cpp b/clang/lib/Sema/SemaDeclCXX.cpp
index 28f038a69e3..820f57f5f0c 100644
--- a/clang/lib/Sema/SemaDeclCXX.cpp
+++ b/clang/lib/Sema/SemaDeclCXX.cpp
@@ -6079,6 +6079,18 @@ void Sema::ActOnFinishDelayedMemberDeclarations(Scope *S, Decl *RecordD) {
PopDeclContext();
}
+/// This is used to implement the constant expression evaluation part of the
+/// attribute enable_if extension. There is nothing in standard C++ which would
+/// require reentering parameters.
+void Sema::ActOnReenterCXXMethodParameter(Scope *S, ParmVarDecl *Param) {
+ if (!Param)
+ return;
+
+ S->AddDecl(Param);
+ if (Param->getDeclName())
+ IdResolver.AddDecl(Param);
+}
+
/// ActOnStartDelayedCXXMethodDeclaration - We have completed
/// parsing a top-level (non-nested) C++ class, and we are now
/// parsing those parts of the given Method declaration that could
OpenPOWER on IntegriCloud