diff options
author | Richard Smith <richard-llvm@metafoo.co.uk> | 2013-06-07 02:33:37 +0000 |
---|---|---|
committer | Richard Smith <richard-llvm@metafoo.co.uk> | 2013-06-07 02:33:37 +0000 |
commit | c3d2ebb60f6048cf99a5c30ce77b9ec9118b635b (patch) | |
tree | 097f01e3d2d992fa92d4396cd9c85b84ae9227ea /clang/lib/Parse/ParseDecl.cpp | |
parent | a1acb49188281013ca1eea3ab1b758f1adef0377 (diff) | |
download | bcm5719-llvm-c3d2ebb60f6048cf99a5c30ce77b9ec9118b635b.tar.gz bcm5719-llvm-c3d2ebb60f6048cf99a5c30ce77b9ec9118b635b.zip |
PR16243: Use CXXThisOverride during template instantiation, and fix up the
places which weren't setting it up properly. This allows us to get the right
cv-qualifiers for 'this' when it appears outside a method body in a class
template.
llvm-svn: 183483
Diffstat (limited to 'clang/lib/Parse/ParseDecl.cpp')
-rw-r--r-- | clang/lib/Parse/ParseDecl.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/clang/lib/Parse/ParseDecl.cpp b/clang/lib/Parse/ParseDecl.cpp index cb0dc374ae1..03e4879db68 100644 --- a/clang/lib/Parse/ParseDecl.cpp +++ b/clang/lib/Parse/ParseDecl.cpp @@ -1063,9 +1063,8 @@ void Parser::ParseLexedAttribute(LateParsedAttribute &LA, RecordDecl *RD = dyn_cast_or_null<RecordDecl>(D->getDeclContext()); // Allow 'this' within late-parsed attributes. - Sema::CXXThisScopeRAII ThisScope(Actions, RD, - /*TypeQuals=*/0, - ND && RD && ND->isCXXInstanceMember()); + Sema::CXXThisScopeRAII ThisScope(Actions, RD, /*TypeQuals=*/0, + ND && ND->isCXXInstanceMember()); if (LA.Decls.size() == 1) { // If the Decl is templatized, add template parameters to scope. |