aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/clang/AST/ASTContext.h10
-rw-r--r--include/clang/AST/Stmt.h4
2 files changed, 7 insertions, 7 deletions
diff --git a/include/clang/AST/ASTContext.h b/include/clang/AST/ASTContext.h
index efd70badc9..78b808c144 100644
--- a/include/clang/AST/ASTContext.h
+++ b/include/clang/AST/ASTContext.h
@@ -1317,10 +1317,10 @@ static inline Selector GetUnarySelector(const char* name, ASTContext& Ctx) {
/// this ever changes, this operator will have to be changed, too.)
/// Usage looks like this (assuming there's an ASTContext 'Context' in scope):
/// @code
-/// // Default alignment (16)
+/// // Default alignment (8)
/// IntegerLiteral *Ex = new (Context) IntegerLiteral(arguments);
/// // Specific alignment
-/// IntegerLiteral *Ex2 = new (Context, 8) IntegerLiteral(arguments);
+/// IntegerLiteral *Ex2 = new (Context, 4) IntegerLiteral(arguments);
/// @endcode
/// Please note that you cannot use delete on the pointer; it must be
/// deallocated using an explicit destructor call followed by
@@ -1351,10 +1351,10 @@ inline void operator delete(void *Ptr, clang::ASTContext &C, size_t)
/// null on error.
/// Usage looks like this (assuming there's an ASTContext 'Context' in scope):
/// @code
-/// // Default alignment (16)
+/// // Default alignment (8)
/// char *data = new (Context) char[10];
/// // Specific alignment
-/// char *data = new (Context, 8) char[10];
+/// char *data = new (Context, 4) char[10];
/// @endcode
/// Please note that you cannot use delete on the pointer; it must be
/// deallocated using an explicit destructor call followed by
@@ -1366,7 +1366,7 @@ inline void operator delete(void *Ptr, clang::ASTContext &C, size_t)
/// allocator supports it).
/// @return The allocated memory. Could be NULL.
inline void *operator new[](size_t Bytes, clang::ASTContext& C,
- size_t Alignment = 16) throw () {
+ size_t Alignment = 8) throw () {
return C.Allocate(Bytes, Alignment);
}
diff --git a/include/clang/AST/Stmt.h b/include/clang/AST/Stmt.h
index 94caa6faad..466848976c 100644
--- a/include/clang/AST/Stmt.h
+++ b/include/clang/AST/Stmt.h
@@ -126,12 +126,12 @@ public:
// Only allow allocation of Stmts using the allocator in ASTContext
// or by doing a placement new.
void* operator new(size_t bytes, ASTContext& C,
- unsigned alignment = 16) throw() {
+ unsigned alignment = 8) throw() {
return ::operator new(bytes, C, alignment);
}
void* operator new(size_t bytes, ASTContext* C,
- unsigned alignment = 16) throw() {
+ unsigned alignment = 8) throw() {
return ::operator new(bytes, *C, alignment);
}