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 02393111e3c..80a2a18c083 100644
--- a/clang/lib/Analysis/CheckSizeofPointer.cpp
+++ b/clang/lib/Analysis/CheckSizeofPointer.cpp
@@ -44,7 +44,7 @@ void WalkAST::VisitSizeOfAlignOfExpr(SizeOfAlignOfExpr *E) {
QualType T = E->getTypeOfArgument();
if (T->isPointerType()) {
- SourceRange R = E->getArgumentExpr()->getSourceRange();
+ SourceRange R = E->getSourceRange();
BR.EmitBasicReport("Potential unintended use of sizeof() on pointer type",
"Logic",
"The code calls sizeof() on a pointer type. "
OpenPOWER on IntegriCloud