[cfe-commits] r72304 - /cfe/trunk/include/clang/AST/Stmt.h
Ted Kremenek
kremenek at apple.com
Fri May 22 17:22:11 PDT 2009
Author: kremenek
Date: Fri May 22 19:22:11 2009
New Revision: 72304
URL: http://llvm.org/viewvc/llvm-project?rev=72304&view=rev
Log:
Use 'Exprs.data()' instead of 'Exprs.empty() ? NULL : ...'
Modified:
cfe/trunk/include/clang/AST/Stmt.h
Modified: cfe/trunk/include/clang/AST/Stmt.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/AST/Stmt.h?rev=72304&r1=72303&r2=72304&view=diff
==============================================================================
--- cfe/trunk/include/clang/AST/Stmt.h (original)
+++ cfe/trunk/include/clang/AST/Stmt.h Fri May 22 19:22:11 2009
@@ -1161,19 +1161,19 @@
typedef ConstExprIterator const_inputs_iterator;
inputs_iterator begin_inputs() {
- return Exprs.empty() ? NULL : &Exprs[0] + NumOutputs;
+ return Exprs.data() + NumOutputs;
}
inputs_iterator end_inputs() {
- return Exprs.empty() ? NULL : &Exprs[0] + NumOutputs + NumInputs;
+ return Exprs.data() + NumOutputs + NumInputs;
}
const_inputs_iterator begin_inputs() const {
- return Exprs.empty() ? NULL : &Exprs[0] + NumOutputs;
+ return Exprs.data() + NumOutputs;
}
const_inputs_iterator end_inputs() const {
- return Exprs.empty() ? NULL : &Exprs[0] + NumOutputs + NumInputs;
+ return Exprs.data() + NumOutputs + NumInputs;
}
// Output expr iterators.
@@ -1182,17 +1182,17 @@
typedef ConstExprIterator const_outputs_iterator;
outputs_iterator begin_outputs() {
- return Exprs.empty() ? NULL : &Exprs[0];
+ return Exprs.data();
}
outputs_iterator end_outputs() {
- return Exprs.empty() ? NULL : &Exprs[0] + NumOutputs;
+ return Exprs.data() + NumOutputs;
}
const_outputs_iterator begin_outputs() const {
- return Exprs.empty() ? NULL : &Exprs[0];
+ return Exprs.data();
}
const_outputs_iterator end_outputs() const {
- return Exprs.empty() ? NULL : &Exprs[0] + NumOutputs;
+ return Exprs.data() + NumOutputs;
}
// Input name iterator.
More information about the cfe-commits
mailing list