diff options
author | Zhongxing Xu <xuzhongxing@gmail.com> | 2009-11-10 04:22:08 +0000 |
---|---|---|
committer | Zhongxing Xu <xuzhongxing@gmail.com> | 2009-11-10 04:22:08 +0000 |
commit | cbe091f8ee3ff4479a15d45e2875492358bbce82 (patch) | |
tree | 7d971845555fe868995b82549ebc67e4ad7fa69f /lib/Analysis/CheckSizeofPointer.cpp | |
parent | 52cb277a1f4303f68a40112797cee86a138ef89b (diff) |
Now we can safely use the argument expression's source range.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86663 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis/CheckSizeofPointer.cpp')
-rw-r--r-- | lib/Analysis/CheckSizeofPointer.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Analysis/CheckSizeofPointer.cpp b/lib/Analysis/CheckSizeofPointer.cpp index ada6082dd2..827c512b75 100644 --- a/lib/Analysis/CheckSizeofPointer.cpp +++ b/lib/Analysis/CheckSizeofPointer.cpp @@ -49,7 +49,7 @@ void WalkAST::VisitSizeOfAlignOfExpr(SizeOfAlignOfExpr *E) { QualType T = E->getTypeOfArgument(); if (T->isPointerType()) { - SourceRange R = E->getSourceRange(); + SourceRange R = E->getArgumentExpr()->getSourceRange(); BR.EmitBasicReport("Potential unintended use of sizeof() on pointer type", "Logic", "The code calls sizeof() on a pointer type. " |