summaryrefslogtreecommitdiffstats
path: root/clang/lib/AST/TemplateBase.cpp
diff options
context:
space:
mode:
authorDavid Blaikie <dblaikie@gmail.com>2014-10-16 04:21:25 +0000
committerDavid Blaikie <dblaikie@gmail.com>2014-10-16 04:21:25 +0000
commit0f62c8d8f8338cbaeb1218e7c3b870439cebd4b9 (patch)
treee3e452eb7f8d4f643e18e5b151b69af23350d3c5 /clang/lib/AST/TemplateBase.cpp
parent7f52921976906112e9022006a1ca47cf80b16bc6 (diff)
downloadbcm5719-llvm-0f62c8d8f8338cbaeb1218e7c3b870439cebd4b9.tar.gz
bcm5719-llvm-0f62c8d8f8338cbaeb1218e7c3b870439cebd4b9.zip
PR21246: DebugInfo: Emit the appropriate type (cv qualifiers, reference-ness, etc) for non-type template parameters
Plumb through the full QualType of the TemplateArgument::Declaration, as it's insufficient to only know whether the type is a reference or pointer (that was necessary for mangling, but insufficient for debug info). This shouldn't increase the size of TemplateArgument as TemplateArgument::Integer is still longer by another 32 bits. Several bits of code were testing that the reference-ness of the parameters matched, but this seemed to be insufficient (various other features of the type could've mismatched and wouldn't've been caught) and unnecessary, at least insofar as removing those tests didn't cause anything to fail. (Richard - perchaps you can hypothesize why any of these checks might need to test reference-ness of the parameters (& explain why reference-ness is part of the mangling - I would've figured that for the reference-ness to be different, a prior template argument would have to be different). I'd be happy to add them in/beef them up and add test cases if there's a reason for them) llvm-svn: 219900
Diffstat (limited to 'clang/lib/AST/TemplateBase.cpp')
-rw-r--r--clang/lib/AST/TemplateBase.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/clang/lib/AST/TemplateBase.cpp b/clang/lib/AST/TemplateBase.cpp
index ac6a754fe73..929fdfc7ceb 100644
--- a/clang/lib/AST/TemplateBase.cpp
+++ b/clang/lib/AST/TemplateBase.cpp
@@ -294,8 +294,7 @@ bool TemplateArgument::structurallyEquals(const TemplateArgument &Other) const {
return TypeOrValue.V == Other.TypeOrValue.V;
case Declaration:
- return getAsDecl() == Other.getAsDecl() &&
- isDeclForReferenceParam() && Other.isDeclForReferenceParam();
+ return getAsDecl() == Other.getAsDecl();
case Integral:
return getIntegralType() == Other.getIntegralType() &&
OpenPOWER on IntegriCloud