Now we can safely use the argument expression's source range.

llvm-svn: 86663
This commit is contained in:
Zhongxing Xu 2009-11-10 04:22:08 +00:00
parent 9a7448ceef
commit 456706c205
1 changed files with 1 additions and 1 deletions

View File

@ -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. "