aboutsummaryrefslogtreecommitdiff
path: root/clang-tools-extra
diff options
context:
space:
mode:
authorHaojian Wu <hokein.wu@gmail.com>2022-08-09 21:46:56 +0200
committerHaojian Wu <hokein.wu@gmail.com>2022-08-09 21:46:56 +0200
commitc2c5c39c401b39d2057ebb19b843f53deb950f6e (patch)
tree5bb854ce6e89660f7d61f7051494f42ea4aaae25 /clang-tools-extra
parentf20147651822b7e41d6b07e17a4b160452bdd044 (diff)
downloadllvm-c2c5c39c401b39d2057ebb19b843f53deb950f6e.zip
llvm-c2c5c39c401b39d2057ebb19b843f53deb950f6e.tar.gz
llvm-c2c5c39c401b39d2057ebb19b843f53deb950f6e.tar.bz2
[pseudo] Fix a suspicious usage of `sizeof(this)`.
It should be `sizeof(*this)`.
Diffstat (limited to 'clang-tools-extra')
-rw-r--r--clang-tools-extra/pseudo/include/clang-pseudo/Forest.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/clang-tools-extra/pseudo/include/clang-pseudo/Forest.h b/clang-tools-extra/pseudo/include/clang-pseudo/Forest.h
index 130cf1a..f25e4cf 100644
--- a/clang-tools-extra/pseudo/include/clang-pseudo/Forest.h
+++ b/clang-tools-extra/pseudo/include/clang-pseudo/Forest.h
@@ -179,7 +179,7 @@ public:
}
size_t nodeCount() const { return NodeCount; }
- size_t bytes() const { return Arena.getBytesAllocated() + sizeof(this); }
+ size_t bytes() const { return Arena.getBytesAllocated() + sizeof(*this); }
private:
ForestNode &create(ForestNode::Kind K, SymbolID SID, Token::Index Start,