aboutsummaryrefslogtreecommitdiff
path: root/lib/Analysis/PrintfFormatString.cpp
diff options
context:
space:
mode:
authorHans Wennborg <hans@hanshq.net>2012-08-07 08:59:46 +0000
committerHans Wennborg <hans@hanshq.net>2012-08-07 08:59:46 +0000
commit58e1e54476d610d6c33ef483f216ed8a1282d35c (patch)
tree53ddc9b5444c8e4da14bfcf799a740466ed66a3d /lib/Analysis/PrintfFormatString.cpp
parent5d435b6001fb853747426bfa47b0e0f49a736fe4 (diff)
Remove ScanfArgType and bake that logic into ArgType.
This is useful for example for %n in printf, which expects a pointer to int with the same logic for checking as %d would have in scanf. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161407 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis/PrintfFormatString.cpp')
-rw-r--r--lib/Analysis/PrintfFormatString.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Analysis/PrintfFormatString.cpp b/lib/Analysis/PrintfFormatString.cpp
index 7e078938d0..0a30328b12 100644
--- a/lib/Analysis/PrintfFormatString.cpp
+++ b/lib/Analysis/PrintfFormatString.cpp
@@ -331,7 +331,7 @@ ArgType PrintfSpecifier::getArgType(ASTContext &Ctx,
case ConversionSpecifier::pArg:
return ArgType::CPointerTy;
case ConversionSpecifier::nArg:
- return Ctx.getPointerType(Ctx.IntTy);
+ return ArgType::PtrTo(Ctx.IntTy);
case ConversionSpecifier::ObjCObjArg:
return ArgType::ObjCPointerTy;
default: