summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema/SemaChecking.cpp
diff options
context:
space:
mode:
authorAaron Ballman <aaron@aaronballman.com>2014-05-02 13:35:42 +0000
committerAaron Ballman <aaron@aaronballman.com>2014-05-02 13:35:42 +0000
commita82eaa70f17a247f6b16c31f0c13406a105ceee8 (patch)
treed1cf2409ad892d31237b9d2a12e268ef530f9a7d /clang/lib/Sema/SemaChecking.cpp
parent73b3651e9de320746659fe4974dcd88c8e9d1e9b (diff)
downloadbcm5719-llvm-a82eaa70f17a247f6b16c31f0c13406a105ceee8.tar.gz
bcm5719-llvm-a82eaa70f17a247f6b16c31f0c13406a105ceee8.zip
Updated the attribute tablegen emitter for variadic arguments to emit a range accessor in addition to the iterators. Updated code using iterators to use range-based for loops.
llvm-svn: 207837
Diffstat (limited to 'clang/lib/Sema/SemaChecking.cpp')
-rw-r--r--clang/lib/Sema/SemaChecking.cpp7
1 files changed, 2 insertions, 5 deletions
diff --git a/clang/lib/Sema/SemaChecking.cpp b/clang/lib/Sema/SemaChecking.cpp
index 526f891f87e..1b44fe9822c 100644
--- a/clang/lib/Sema/SemaChecking.cpp
+++ b/clang/lib/Sema/SemaChecking.cpp
@@ -717,11 +717,8 @@ static void CheckNonNullArguments(Sema &S,
SourceLocation CallSiteLoc) {
// Check the attributes attached to the method/function itself.
for (const auto *NonNull : FDecl->specific_attrs<NonNullAttr>()) {
- for (NonNullAttr::args_iterator i = NonNull->args_begin(),
- e = NonNull->args_end();
- i != e; ++i) {
- CheckNonNullArgument(S, ExprArgs[*i], CallSiteLoc);
- }
+ for (const auto &Val : NonNull->args())
+ CheckNonNullArgument(S, ExprArgs[Val], CallSiteLoc);
}
// Check the attributes on the parameters.
OpenPOWER on IntegriCloud