summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--clang/lib/Analysis/CheckSizeofPointer.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/Analysis/CheckSizeofPointer.cpp b/clang/lib/Analysis/CheckSizeofPointer.cpp
index ada6082dd28..827c512b754 100644
--- a/clang/lib/Analysis/CheckSizeofPointer.cpp
+++ b/clang/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. "
OpenPOWER on IntegriCloud