summaryrefslogtreecommitdiffstats
path: root/clang/lib/AST
diff options
context:
space:
mode:
authorTed Kremenek <kremenek@apple.com>2012-01-20 21:40:12 +0000
committerTed Kremenek <kremenek@apple.com>2012-01-20 21:40:12 +0000
commitf2a2f5f2bfe9da1a3e0a25934d833956b04bb8a5 (patch)
treeb372521b3a8a9159f3285c11df38c7c09c461d6c /clang/lib/AST
parentb9c822ab0b096efca7955bff361ab64e91d0876c (diff)
downloadbcm5719-llvm-f2a2f5f2bfe9da1a3e0a25934d833956b04bb8a5.tar.gz
bcm5719-llvm-f2a2f5f2bfe9da1a3e0a25934d833956b04bb8a5.zip
Add ability to specifiy 'restrict' on parameters of builtins, and correct this oversight for scanf functions.
llvm-svn: 148573
Diffstat (limited to 'clang/lib/AST')
-rw-r--r--clang/lib/AST/ASTContext.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/clang/lib/AST/ASTContext.cpp b/clang/lib/AST/ASTContext.cpp
index 476d221fdf3..27bbc72e881 100644
--- a/clang/lib/AST/ASTContext.cpp
+++ b/clang/lib/AST/ASTContext.cpp
@@ -6468,6 +6468,9 @@ static QualType DecodeTypeFromStr(const char *&Str, const ASTContext &Context,
case 'D':
Type = Context.getVolatileType(Type);
break;
+ case 'R':
+ Type = Type.withRestrict();
+ break;
}
}
OpenPOWER on IntegriCloud