/// \brief The first type on the list.
typedef T1 head;
- /// \brief A sub list with the tail. ie everything but the head.
+ /// \brief A sublist with the tail. ie everything but the head.
///
/// This type is used to do recursion. TypeList<>/EmptyTypeList indicates the
/// end of the list.
mutable IdentifierInfo *Ident_final;
mutable IdentifierInfo *Ident_override;
- // C++ type trait keywords that have can be reverted to identifiers and
- // still used as type traits.
- llvm::SmallDenseMap<IdentifierInfo *, tok::TokenKind> RevertableTypeTraits;
+ // C++ type trait keywords that can be reverted to identifiers and still be
+ // used as type traits.
+ llvm::SmallDenseMap<IdentifierInfo *, tok::TokenKind> RevertibleTypeTraits;
OwningPtr<PragmaHandler> AlignHandler;
OwningPtr<PragmaHandler> GCCVisibilityHandler;
"Should be called only during statement reading!");
// Subexpressions are stored from last to first, so the next Stmt we need
// is at the back of the stack.
- assert(!StmtStack.empty() && "Read too many sub statements!");
+ assert(!StmtStack.empty() && "Read too many sub-statements!");
return StmtStack.pop_back_val();
}
/// @name FlushStmt Caches
/// @{
- /// \brief Set of parent Stmts for the currently serializing sub stmt.
+ /// \brief Set of parent Stmts for the currently serializing sub-stmt.
llvm::DenseSet<Stmt *> ParentStmts;
- /// \brief Offsets of sub stmts already serialized. The offset points
+ /// \brief Offsets of sub-stmts already serialized. The offset points
/// just after the stmt record.
llvm::DenseMap<Stmt *, uint64_t> SubStmtEntries;
virtual SVal evalComplement(NonLoc val) = 0;
- /// Create a new value which represents a binary expression with two non
+ /// Create a new value which represents a binary expression with two non-
/// location operands.
virtual SVal evalBinOpNN(ProgramStateRef state, BinaryOperator::Opcode op,
NonLoc lhs, NonLoc rhs, QualType resultTy) = 0;
PrintExpr(Node->getInitializer());
}
void StmtPrinter::VisitImplicitCastExpr(ImplicitCastExpr *Node) {
- // No need to print anything, simply forward to the sub expression.
+ // No need to print anything, simply forward to the subexpression.
PrintExpr(Node->getSubExpr());
}
void StmtPrinter::VisitBinaryOperator(BinaryOperator *Node) {
}
void StmtPrinter::VisitExprWithCleanups(ExprWithCleanups *E) {
- // Just forward to the sub expression.
+ // Just forward to the subexpression.
PrintExpr(E->getSubExpr());
}
Tok.is(tok::identifier) &&
Tok.getIdentifierInfo()->hasRevertedTokenIDToIdentifier()) {
IdentifierInfo *II = Tok.getIdentifierInfo();
- // Build up the mapping of revertable type traits, for future use.
- if (RevertableTypeTraits.empty()) {
+ // Build up the mapping of revertible type traits, for future use.
+ if (RevertibleTypeTraits.empty()) {
#define RTT_JOIN(X,Y) X##Y
-#define REVERTABLE_TYPE_TRAIT(Name) \
- RevertableTypeTraits[PP.getIdentifierInfo(#Name)] \
+#define REVERTIBLE_TYPE_TRAIT(Name) \
+ RevertibleTypeTraits[PP.getIdentifierInfo(#Name)] \
= RTT_JOIN(tok::kw_,Name)
- REVERTABLE_TYPE_TRAIT(__is_arithmetic);
- REVERTABLE_TYPE_TRAIT(__is_convertible);
- REVERTABLE_TYPE_TRAIT(__is_empty);
- REVERTABLE_TYPE_TRAIT(__is_floating_point);
- REVERTABLE_TYPE_TRAIT(__is_function);
- REVERTABLE_TYPE_TRAIT(__is_fundamental);
- REVERTABLE_TYPE_TRAIT(__is_integral);
- REVERTABLE_TYPE_TRAIT(__is_member_function_pointer);
- REVERTABLE_TYPE_TRAIT(__is_member_pointer);
- REVERTABLE_TYPE_TRAIT(__is_pod);
- REVERTABLE_TYPE_TRAIT(__is_pointer);
- REVERTABLE_TYPE_TRAIT(__is_same);
- REVERTABLE_TYPE_TRAIT(__is_scalar);
- REVERTABLE_TYPE_TRAIT(__is_signed);
- REVERTABLE_TYPE_TRAIT(__is_unsigned);
- REVERTABLE_TYPE_TRAIT(__is_void);
-#undef REVERTABLE_TYPE_TRAIT
+ REVERTIBLE_TYPE_TRAIT(__is_arithmetic);
+ REVERTIBLE_TYPE_TRAIT(__is_convertible);
+ REVERTIBLE_TYPE_TRAIT(__is_empty);
+ REVERTIBLE_TYPE_TRAIT(__is_floating_point);
+ REVERTIBLE_TYPE_TRAIT(__is_function);
+ REVERTIBLE_TYPE_TRAIT(__is_fundamental);
+ REVERTIBLE_TYPE_TRAIT(__is_integral);
+ REVERTIBLE_TYPE_TRAIT(__is_member_function_pointer);
+ REVERTIBLE_TYPE_TRAIT(__is_member_pointer);
+ REVERTIBLE_TYPE_TRAIT(__is_pod);
+ REVERTIBLE_TYPE_TRAIT(__is_pointer);
+ REVERTIBLE_TYPE_TRAIT(__is_same);
+ REVERTIBLE_TYPE_TRAIT(__is_scalar);
+ REVERTIBLE_TYPE_TRAIT(__is_signed);
+ REVERTIBLE_TYPE_TRAIT(__is_unsigned);
+ REVERTIBLE_TYPE_TRAIT(__is_void);
+#undef REVERTIBLE_TYPE_TRAIT
#undef RTT_JOIN
}
// update the token kind in place and parse again to treat it as
// the appropriate kind of type trait.
llvm::SmallDenseMap<IdentifierInfo *, tok::TokenKind>::iterator Known
- = RevertableTypeTraits.find(II);
- if (Known != RevertableTypeTraits.end()) {
+ = RevertibleTypeTraits.find(II);
+ if (Known != RevertibleTypeTraits.end()) {
Tok.setKind(Known->second);
return ParseCastExpression(isUnaryExpression, isAddressOfOperand,
NotCastExpr, isTypeCast);
// example, it is not possible to goto into a stmt expression apparently.
// More semantic analysis is needed.
- // If there are sub stmts in the compound stmt, take the type of the last one
+ // If there are sub-stmts in the compound stmt, take the type of the last one
// as the type of the stmtexpr.
QualType Ty = Context.VoidTy;
bool StmtExprMayBindToTemp = false;
}
Expr *Sema::MaybeCreateExprWithCleanups(Expr *SubExpr) {
- assert(SubExpr && "sub expression can't be null!");
+ assert(SubExpr && "subexpression can't be null!");
CleanupVarDeclMarking();
}
Stmt *Sema::MaybeCreateStmtWithCleanups(Stmt *SubStmt) {
- assert(SubStmt && "sub statement can't be null!");
+ assert(SubStmt && "sub-statement can't be null!");
CleanupVarDeclMarking();
// Do nothing: static member functions aren't any different
// from non-member functions.
} else {
- // Fix the sub expression, which really has to be an
+ // Fix the subexpression, which really has to be an
// UnresolvedLookupExpr holding an overloaded member function
// or template.
Expr *SubExpr = FixOverloadedFunctionReference(UnOp->getSubExpr(),
StmtStack.push_back(S);
}
Done:
- assert(StmtStack.size() > PrevNumStmts && "Read too many sub stmts!");
+ assert(StmtStack.size() > PrevNumStmts && "Read too many sub-stmts!");
assert(StmtStack.size() == PrevNumStmts + 1 && "Extra expressions on stack!");
return StmtStack.pop_back_val();
}
ParentStmtInserterRAII ParentStmtInserter(S, ParentStmts);
#endif
- // Redirect ASTWriter::AddStmt to collect sub stmts.
+ // Redirect ASTWriter::AddStmt to collect sub-stmts.
SmallVector<Stmt *, 16> SubStmts;
CollectedStmts = &SubStmts;
SourceManager &SrcMgr
= DeclIDs.begin()->first->getASTContext().getSourceManager();
S->dump(SrcMgr);
- llvm_unreachable("Unhandled sub statement writing AST file");
+ llvm_unreachable("Unhandled sub-statement writing AST file");
}
#endif
// Revert ASTWriter::AddStmt.
CollectedStmts = &StmtsToEmit;
- // Write the sub stmts in reverse order, last to first. When reading them back
+ // Write the sub-stmts in reverse order, last to first. When reading them back
// we will read them in correct order by "pop"ing them from the Stmts stack.
- // This simplifies reading and allows to store a variable number of sub stmts
+ // This simplifies reading and allows to store a variable number of sub-stmts
// without knowing it in advance.
while (!SubStmts.empty())
WriteSubStmt(SubStmts.pop_back_val(), SubStmtEntries, ParentStmts);
// We expect to be the only consumer of the two temporary statement maps,
// assert that they are empty.
- assert(SubStmtEntries.empty() && "unexpected entries in sub stmt map");
+ assert(SubStmtEntries.empty() && "unexpected entries in sub-stmt map");
assert(ParentStmts.empty() && "unexpected entries in parent stmt map");
for (unsigned I = 0, N = StmtsToEmit.size(); I != N; ++I) {