summaryrefslogtreecommitdiffstats
path: root/clang/lib/AST/ASTImporter.cpp
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2012-04-06 22:40:38 +0000
committerDouglas Gregor <dgregor@apple.com>2012-04-06 22:40:38 +0000
commit31f55dced546449acde6de1fb892caa4f6fb4fd1 (patch)
tree8405327c4506ef1cacce6c021fd2d5752061f4ff /clang/lib/AST/ASTImporter.cpp
parent4460e0f805c21bc23c157dda6329aa86abf9b6eb (diff)
downloadbcm5719-llvm-31f55dced546449acde6de1fb892caa4f6fb4fd1.tar.gz
bcm5719-llvm-31f55dced546449acde6de1fb892caa4f6fb4fd1.zip
Implement support for null non-type template arguments for non-type
template parameters of pointer, pointer-to-member, or nullptr_t type in C++11. Fixes PR9700 / <rdar://problem/11193097>. llvm-svn: 154219
Diffstat (limited to 'clang/lib/AST/ASTImporter.cpp')
-rw-r--r--clang/lib/AST/ASTImporter.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/clang/lib/AST/ASTImporter.cpp b/clang/lib/AST/ASTImporter.cpp
index 621658c7f0a..3879907ec6d 100644
--- a/clang/lib/AST/ASTImporter.cpp
+++ b/clang/lib/AST/ASTImporter.cpp
@@ -325,6 +325,8 @@ static bool IsStructurallyEquivalent(StructuralEquivalenceContext &Context,
return IsSameValue(*Arg1.getAsIntegral(), *Arg2.getAsIntegral());
case TemplateArgument::Declaration:
+ if (!Arg1.getAsDecl() || !Arg2.getAsDecl())
+ return !Arg1.getAsDecl() && !Arg2.getAsDecl();
return Context.IsStructurallyEquivalent(Arg1.getAsDecl(), Arg2.getAsDecl());
case TemplateArgument::Template:
OpenPOWER on IntegriCloud