зеркало из https://github.com/microsoft/clang-1.git
Include the appropriate header for malloc
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65471 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Родитель
a985b31fc3
Коммит
ac1afdc58e
|
@ -17,6 +17,7 @@
|
|||
#include "clang/Basic/TemplateKinds.h"
|
||||
#include "clang/Basic/TokenKinds.h"
|
||||
#include "clang/Basic/SourceLocation.h"
|
||||
#include <cstdlib>
|
||||
|
||||
namespace clang {
|
||||
|
||||
|
@ -295,7 +296,7 @@ struct TemplateIdAnnotation {
|
|||
|
||||
static TemplateIdAnnotation* Allocate(unsigned NumArgs) {
|
||||
TemplateIdAnnotation *TemplateId
|
||||
= (TemplateIdAnnotation *)malloc(sizeof(TemplateIdAnnotation) +
|
||||
= (TemplateIdAnnotation *)std::malloc(sizeof(TemplateIdAnnotation) +
|
||||
sizeof(void*) * NumArgs +
|
||||
sizeof(SourceLocation) * NumArgs +
|
||||
sizeof(bool) * NumArgs);
|
||||
|
|
|
@ -41,4 +41,5 @@ void testme(X<int_type> *x1, X<float, int> *x2) {
|
|||
x2->bar(); // okay: refers to #2
|
||||
}
|
||||
|
||||
// FIXME: diagnose specializations in a different namespace
|
||||
// Diagnose specializations in a different namespace
|
||||
class A<double> { };
|
||||
|
|
Загрузка…
Ссылка в новой задаче