summaryrefslogtreecommitdiffstats
path: root/clang/lib/Parse/ParseDecl.cpp
diff options
context:
space:
mode:
authorRichard Smith <richard-llvm@metafoo.co.uk>2014-08-12 00:22:39 +0000
committerRichard Smith <richard-llvm@metafoo.co.uk>2014-08-12 00:22:39 +0000
commit3d1a94c6a63692541896a42388a4c08efbd59959 (patch)
tree4640bb1eebc86f5d6516c4a72817efc4ba0383da /clang/lib/Parse/ParseDecl.cpp
parent3ae6e1528a29a0c717d2f2c6a63e9dcb67731cd7 (diff)
downloadbcm5719-llvm-3d1a94c6a63692541896a42388a4c08efbd59959.tar.gz
bcm5719-llvm-3d1a94c6a63692541896a42388a4c08efbd59959.zip
Reject virt-specifiers on friend declarations. Give anonymous bitfields a
location so their diagnostics have somewhere to point. llvm-svn: 215416
Diffstat (limited to 'clang/lib/Parse/ParseDecl.cpp')
-rw-r--r--clang/lib/Parse/ParseDecl.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/clang/lib/Parse/ParseDecl.cpp b/clang/lib/Parse/ParseDecl.cpp
index 76f1e084423..75bae65fc05 100644
--- a/clang/lib/Parse/ParseDecl.cpp
+++ b/clang/lib/Parse/ParseDecl.cpp
@@ -3274,7 +3274,8 @@ ParseStructDeclaration(ParsingDeclSpec &DS, FieldCallback &Fields) {
// Don't parse FOO:BAR as if it were a typo for FOO::BAR.
ColonProtectionRAIIObject X(*this);
ParseDeclarator(DeclaratorInfo.D);
- }
+ } else
+ DeclaratorInfo.D.SetIdentifier(nullptr, Tok.getLocation());
if (TryConsumeToken(tok::colon)) {
ExprResult Res(ParseConstantExpression());
OpenPOWER on IntegriCloud