forked from OSchip/llvm-project
Now we can safely use the argument expression's source range.
llvm-svn: 86663
This commit is contained in:
parent
9a7448ceef
commit
456706c205
|
@ -49,7 +49,7 @@ void WalkAST::VisitSizeOfAlignOfExpr(SizeOfAlignOfExpr *E) {
|
||||||
|
|
||||||
QualType T = E->getTypeOfArgument();
|
QualType T = E->getTypeOfArgument();
|
||||||
if (T->isPointerType()) {
|
if (T->isPointerType()) {
|
||||||
SourceRange R = E->getSourceRange();
|
SourceRange R = E->getArgumentExpr()->getSourceRange();
|
||||||
BR.EmitBasicReport("Potential unintended use of sizeof() on pointer type",
|
BR.EmitBasicReport("Potential unintended use of sizeof() on pointer type",
|
||||||
"Logic",
|
"Logic",
|
||||||
"The code calls sizeof() on a pointer type. "
|
"The code calls sizeof() on a pointer type. "
|
||||||
|
|
Loading…
Reference in New Issue