aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Smith <richard-llvm@metafoo.co.uk>2011-02-23 00:09:59 +0000
committerRichard Smith <richard-llvm@metafoo.co.uk>2011-02-23 00:09:59 +0000
commitb80f66847d103aee7988b791a380fc563bf89a19 (patch)
tree61dae27bc5ae054149a2895a29be127379a6a511
parent65b34d7bc314c7d4b448164e1a889311bd30b375 (diff)
DeclGroup's operator[] always returned the first Decl in the group.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126268 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--include/clang/AST/DeclGroup.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/include/clang/AST/DeclGroup.h b/include/clang/AST/DeclGroup.h
index cb9e1681cc..63cdac5949 100644
--- a/include/clang/AST/DeclGroup.h
+++ b/include/clang/AST/DeclGroup.h
@@ -39,12 +39,12 @@ public:
Decl*& operator[](unsigned i) {
assert (i < NumDecls && "Out-of-bounds access.");
- return *((Decl**) (this+1));
+ return ((Decl**) (this+1))[i];
}
Decl* const& operator[](unsigned i) const {
assert (i < NumDecls && "Out-of-bounds access.");
- return *((Decl* const*) (this+1));
+ return ((Decl* const*) (this+1))[i];
}
};