зеркало из https://github.com/microsoft/clang-1.git
Reflow some comments.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71936 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Родитель
c6e35aae23
Коммит
390b4cc8b4
|
@ -1152,19 +1152,17 @@ static void HandleFormatAttr(Decl *d, const AttributeList &Attr, Sema &S) {
|
|||
return;
|
||||
}
|
||||
} else if (is_NSString) {
|
||||
// FIXME: do we need to check if the type is NSString*? What are
|
||||
// the semantics?
|
||||
// FIXME: do we need to check if the type is NSString*? What are the
|
||||
// semantics?
|
||||
if (!isNSStringType(Ty, S.Context)) {
|
||||
// FIXME: Should highlight the actual expression that has the
|
||||
// wrong type.
|
||||
// FIXME: Should highlight the actual expression that has the wrong type.
|
||||
S.Diag(Attr.getLoc(), diag::err_format_attribute_not)
|
||||
<< "an NSString" << IdxExpr->getSourceRange();
|
||||
return;
|
||||
}
|
||||
} else if (!Ty->isPointerType() ||
|
||||
!Ty->getAsPointerType()->getPointeeType()->isCharType()) {
|
||||
// FIXME: Should highlight the actual expression that has the
|
||||
// wrong type.
|
||||
// FIXME: Should highlight the actual expression that has the wrong type.
|
||||
S.Diag(Attr.getLoc(), diag::err_format_attribute_not)
|
||||
<< "a string type" << IdxExpr->getSourceRange();
|
||||
return;
|
||||
|
@ -1418,10 +1416,10 @@ static void HandleModeAttr(Decl *D, const AttributeList &Attr, Sema &S) {
|
|||
S.Diag(Attr.getLoc(), diag::err_mode_wrong_type);
|
||||
}
|
||||
|
||||
// FIXME: Sync this with InitializePredefinedMacros; we need to match
|
||||
// int8_t and friends, at least with glibc.
|
||||
// FIXME: Make sure 32/64-bit integers don't get defined to types of
|
||||
// the wrong width on unusual platforms.
|
||||
// FIXME: Sync this with InitializePredefinedMacros; we need to match int8_t
|
||||
// and friends, at least with glibc.
|
||||
// FIXME: Make sure 32/64-bit integers don't get defined to types of the wrong
|
||||
// width on unusual platforms.
|
||||
// FIXME: Make sure floating-point mappings are accurate
|
||||
// FIXME: Support XF and TF types
|
||||
QualType NewTy;
|
||||
|
|
|
@ -696,8 +696,8 @@ Sema::ActOnMemInitializer(DeclPtrTy ConstructorD,
|
|||
}
|
||||
|
||||
// Check for a virtual base class.
|
||||
// FIXME: We might be able to short-circuit this if we know in
|
||||
// advance that there are no virtual bases.
|
||||
// FIXME: We might be able to short-circuit this if we know in advance that
|
||||
// there are no virtual bases.
|
||||
const CXXBaseSpecifier *VirtualBaseSpec = 0;
|
||||
if (!DirectBaseSpec || !DirectBaseSpec->isVirtual()) {
|
||||
// We haven't found a base yet; search the class hierarchy for a
|
||||
|
@ -1539,9 +1539,8 @@ Sema::DeclPtrTy Sema::ActOnConversionDeclarator(CXXConversionDecl *Conversion) {
|
|||
// same object type (or a reference to it), to a (possibly
|
||||
// cv-qualified) base class of that type (or a reference to it),
|
||||
// or to (possibly cv-qualified) void.
|
||||
// FIXME: Suppress this warning if the conversion function ends up
|
||||
// being a virtual function that overrides a virtual function in a
|
||||
// base class.
|
||||
// FIXME: Suppress this warning if the conversion function ends up being a
|
||||
// virtual function that overrides a virtual function in a base class.
|
||||
QualType ClassType
|
||||
= Context.getCanonicalType(Context.getTypeDeclType(ClassDecl));
|
||||
if (const ReferenceType *ConvTypeRef = ConvType->getAsReferenceType())
|
||||
|
@ -1632,9 +1631,9 @@ Sema::DeclPtrTy Sema::ActOnStartNamespaceDef(Scope *NamespcScope,
|
|||
|
||||
// Although we could have an invalid decl (i.e. the namespace name is a
|
||||
// redefinition), push it as current DeclContext and try to continue parsing.
|
||||
// FIXME: We should be able to push Namespc here, so that the
|
||||
// each DeclContext for the namespace has the declarations
|
||||
// that showed up in that particular namespace definition.
|
||||
// FIXME: We should be able to push Namespc here, so that the each DeclContext
|
||||
// for the namespace has the declarations that showed up in that particular
|
||||
// namespace definition.
|
||||
PushDeclContext(NamespcScope, Namespc);
|
||||
return DeclPtrTy::make(Namespc);
|
||||
}
|
||||
|
@ -2117,8 +2116,8 @@ Sema::CheckReferenceInit(Expr *&Init, QualType DeclType,
|
|||
return false;
|
||||
} else {
|
||||
// Perform the conversion.
|
||||
// FIXME: Binding to a subobject of the lvalue is going to require
|
||||
// more AST annotation than this.
|
||||
// FIXME: Binding to a subobject of the lvalue is going to require more
|
||||
// AST annotation than this.
|
||||
ImpCastExprToType(Init, T1, /*isLvalue=*/true);
|
||||
}
|
||||
}
|
||||
|
@ -2176,8 +2175,8 @@ Sema::CheckReferenceInit(Expr *&Init, QualType DeclType,
|
|||
return false;
|
||||
} else {
|
||||
// Perform the conversion.
|
||||
// FIXME: Binding to a subobject of the lvalue is going to require
|
||||
// more AST annotation than this.
|
||||
// FIXME: Binding to a subobject of the lvalue is going to require more
|
||||
// AST annotation than this.
|
||||
ImpCastExprToType(Init, T1, /*isLvalue=*/true);
|
||||
}
|
||||
break;
|
||||
|
@ -2264,8 +2263,8 @@ Sema::CheckReferenceInit(Expr *&Init, QualType DeclType,
|
|||
ICS->Standard.RRefBinding = isRValRef;
|
||||
ICS->Standard.CopyConstructor = 0;
|
||||
} else {
|
||||
// FIXME: Binding to a subobject of the rvalue is going to require
|
||||
// more AST annotation than this.
|
||||
// FIXME: Binding to a subobject of the rvalue is going to require more
|
||||
// AST annotation than this.
|
||||
ImpCastExprToType(Init, T1, /*isLvalue=*/true);
|
||||
}
|
||||
return false;
|
||||
|
@ -2349,8 +2348,7 @@ bool Sema::CheckOverloadedOperatorDeclaration(FunctionDecl *FnDecl) {
|
|||
// described completely in 3.7.3. The attributes and restrictions
|
||||
// found in the rest of this subclause do not apply to them unless
|
||||
// explicitly stated in 3.7.3.
|
||||
// FIXME: Write a separate routine for checking this. For now, just
|
||||
// allow it.
|
||||
// FIXME: Write a separate routine for checking this. For now, just allow it.
|
||||
if (Op == OO_New || Op == OO_Array_New ||
|
||||
Op == OO_Delete || Op == OO_Array_Delete)
|
||||
return false;
|
||||
|
@ -2576,8 +2574,8 @@ Sema::DeclPtrTy Sema::ActOnExceptionDeclarator(Scope *S, Declarator &D) {
|
|||
AbstractVariableType))
|
||||
Invalid = true;
|
||||
|
||||
// FIXME: Need to test for ability to copy-construct and destroy the
|
||||
// exception variable.
|
||||
// FIXME: Need to test for ability to copy-construct and destroy the exception
|
||||
// variable.
|
||||
// FIXME: Need to check for abstract classes.
|
||||
|
||||
IdentifierInfo *II = D.getIdentifier();
|
||||
|
|
|
@ -667,8 +667,8 @@ Sema::DeclPtrTy Sema::ActOnStartClassImplementation(
|
|||
// Legacy case of @implementation with no corresponding @interface.
|
||||
// Build, chain & install the interface decl into the identifier.
|
||||
|
||||
// FIXME: Do we support attributes on the @implementation? If so
|
||||
// we should copy them over.
|
||||
// FIXME: Do we support attributes on the @implementation? If so we should
|
||||
// copy them over.
|
||||
IDecl = ObjCInterfaceDecl::Create(Context, CurContext, AtClassImplLoc,
|
||||
ClassName, ClassLoc, false, true);
|
||||
IDecl->setSuperClass(SDecl);
|
||||
|
@ -851,12 +851,11 @@ bool Sema::isPropertyReadonly(ObjCPropertyDecl *PDecl,
|
|||
return true;
|
||||
}
|
||||
|
||||
/// FIXME: Type hierarchies in Objective-C can be deep. We could most
|
||||
/// likely improve the efficiency of selector lookups and type
|
||||
/// checking by associating with each protocol / interface / category
|
||||
/// the flattened instance tables. If we used an immutable set to keep
|
||||
/// the table then it wouldn't add significant memory cost and it
|
||||
/// would be handy for lookups.
|
||||
/// FIXME: Type hierarchies in Objective-C can be deep. We could most likely
|
||||
/// improve the efficiency of selector lookups and type checking by associating
|
||||
/// with each protocol / interface / category the flattened instance tables. If
|
||||
/// we used an immutable set to keep the table then it wouldn't add significant
|
||||
/// memory cost and it would be handy for lookups.
|
||||
|
||||
/// CheckProtocolMethodDefs - This routine checks unimplemented methods
|
||||
/// Declared in protocol, and those referenced by it.
|
||||
|
@ -1353,11 +1352,10 @@ void Sema::ProcessPropertyDecl(ObjCPropertyDecl *property,
|
|||
|
||||
// Synthesize getter/setter methods if none exist.
|
||||
// Find the default getter and if one not found, add one.
|
||||
// FIXME: The synthesized property we set here is misleading. We
|
||||
// almost always synthesize these methods unless the user explicitly
|
||||
// provided prototypes (which is odd, but allowed). Sema should be
|
||||
// typechecking that the declarations jive in that situation (which
|
||||
// it is not currently).
|
||||
// FIXME: The synthesized property we set here is misleading. We almost always
|
||||
// synthesize these methods unless the user explicitly provided prototypes
|
||||
// (which is odd, but allowed). Sema should be typechecking that the
|
||||
// declarations jive in that situation (which it is not currently).
|
||||
if (!GetterMethod) {
|
||||
// No instance method of same name as property getter name was found.
|
||||
// Declare a getter method and add it to the list of methods
|
||||
|
|
|
@ -101,9 +101,8 @@ void Sema::DiagnoseSentinelCalls(NamedDecl *D, SourceLocation Loc,
|
|||
int sentinelPos = attr->getSentinel();
|
||||
int nullPos = attr->getNullPos();
|
||||
|
||||
// FIXME. ObjCMethodDecl and FunctionDecl need be derived from the
|
||||
// same common base class. Then we won't be needing two versions of
|
||||
// the same code.
|
||||
// FIXME. ObjCMethodDecl and FunctionDecl need be derived from the same common
|
||||
// base class. Then we won't be needing two versions of the same code.
|
||||
unsigned int i = 0;
|
||||
bool warnNotEnoughArgs = false;
|
||||
int isMethod = 0;
|
||||
|
@ -644,10 +643,9 @@ static Decl *getObjectForAnonymousRecordDecl(ASTContext &Context,
|
|||
assert(Record->isAnonymousStructOrUnion() &&
|
||||
"Record must be an anonymous struct or union!");
|
||||
|
||||
// FIXME: Once Decls are directly linked together, this will
|
||||
// be an O(1) operation rather than a slow walk through DeclContext's
|
||||
// vector (which itself will be eliminated). DeclGroups might make
|
||||
// this even better.
|
||||
// FIXME: Once Decls are directly linked together, this will be an O(1)
|
||||
// operation rather than a slow walk through DeclContext's vector (which
|
||||
// itself will be eliminated). DeclGroups might make this even better.
|
||||
DeclContext *Ctx = Record->getDeclContext();
|
||||
for (DeclContext::decl_iterator D = Ctx->decls_begin(Context),
|
||||
DEnd = Ctx->decls_end(Context);
|
||||
|
@ -873,8 +871,8 @@ Sema::ActOnDeclarationNameExpr(Scope *S, SourceLocation Loc,
|
|||
if (IV->getAccessControl() == ObjCIvarDecl::Private &&
|
||||
ClassDeclared != IFace)
|
||||
Diag(Loc, diag::error_private_ivar_access) << IV->getDeclName();
|
||||
// FIXME: This should use a new expr for a direct reference, don't turn
|
||||
// this into Self->ivar, just return a BareIVarExpr or something.
|
||||
// FIXME: This should use a new expr for a direct reference, don't
|
||||
// turn this into Self->ivar, just return a BareIVarExpr or something.
|
||||
IdentifierInfo &II = Context.Idents.get("self");
|
||||
OwningExprResult SelfExpr = ActOnIdentifierExpr(S, Loc, II, false);
|
||||
return Owned(new (Context)
|
||||
|
@ -2059,8 +2057,7 @@ Sema::ActOnMemberReferenceExpr(Scope *S, ExprArg Base, SourceLocation OpLoc,
|
|||
return ExprError();
|
||||
|
||||
// The record definition is complete, now make sure the member is valid.
|
||||
// FIXME: Qualified name lookup for C++ is a bit more complicated
|
||||
// than this.
|
||||
// FIXME: Qualified name lookup for C++ is a bit more complicated than this.
|
||||
LookupResult Result
|
||||
= LookupQualifiedName(RDecl, DeclarationName(&Member),
|
||||
LookupMemberName, false);
|
||||
|
@ -2161,10 +2158,10 @@ Sema::ActOnMemberReferenceExpr(Scope *S, ExprArg Base, SourceLocation OpLoc,
|
|||
else if (ObjCImpDecl && getCurFunctionDecl()) {
|
||||
// Case of a c-function declared inside an objc implementation.
|
||||
// FIXME: For a c-style function nested inside an objc implementation
|
||||
// class, there is no implementation context available, so we pass down
|
||||
// the context as argument to this routine. Ideally, this context need
|
||||
// be passed down in the AST node and somehow calculated from the AST
|
||||
// for a function decl.
|
||||
// class, there is no implementation context available, so we pass
|
||||
// down the context as argument to this routine. Ideally, this context
|
||||
// need be passed down in the AST node and somehow calculated from the
|
||||
// AST for a function decl.
|
||||
Decl *ImplDecl = ObjCImpDecl.getAs<Decl>();
|
||||
if (ObjCImplementationDecl *IMPD =
|
||||
dyn_cast<ObjCImplementationDecl>(ImplDecl))
|
||||
|
@ -2510,7 +2507,8 @@ Sema::ActOnCallExpr(Scope *S, ExprArg fn, SourceLocation LParenLoc,
|
|||
if (getLangOptions().CPlusPlus) {
|
||||
// Determine whether this is a dependent call inside a C++ template,
|
||||
// in which case we won't do any semantic analysis now.
|
||||
// FIXME: Will need to cache the results of name lookup (including ADL) in Fn.
|
||||
// FIXME: Will need to cache the results of name lookup (including ADL) in
|
||||
// Fn.
|
||||
bool Dependent = false;
|
||||
if (Fn->isTypeDependent())
|
||||
Dependent = true;
|
||||
|
@ -3043,9 +3041,10 @@ QualType Sema::CheckConditionalOperands(Expr *&Cond, Expr *&LHS, Expr *&RHS,
|
|||
Context.isObjCObjectPointerType(RHSTy)) ||
|
||||
(RHSTy->isObjCQualifiedIdType() &&
|
||||
Context.isObjCObjectPointerType(LHSTy))) {
|
||||
// FIXME: This is not the correct composite type. This only
|
||||
// happens to work because id can more or less be used anywhere,
|
||||
// however this may change the type of method sends.
|
||||
// FIXME: This is not the correct composite type. This only happens to
|
||||
// work because id can more or less be used anywhere, however this may
|
||||
// change the type of method sends.
|
||||
|
||||
// FIXME: gcc adds some type-checking of the arguments and emits
|
||||
// (confusing) incompatible comparison warnings in some
|
||||
// cases. Investigate.
|
||||
|
@ -4351,8 +4350,8 @@ static NamedDecl *getPrimaryDecl(Expr *E) {
|
|||
// Otherwise, the expression refers to a part of the base
|
||||
return getPrimaryDecl(cast<MemberExpr>(E)->getBase());
|
||||
case Stmt::ArraySubscriptExprClass: {
|
||||
// FIXME: This code shouldn't be necessary! We should catch the
|
||||
// implicit promotion of register arrays earlier.
|
||||
// FIXME: This code shouldn't be necessary! We should catch the implicit
|
||||
// promotion of register arrays earlier.
|
||||
Expr* Base = cast<ArraySubscriptExpr>(E)->getBase();
|
||||
if (ImplicitCastExpr* ICE = dyn_cast<ImplicitCastExpr>(Base)) {
|
||||
if (ICE->getSubExpr()->getType()->isArrayType())
|
||||
|
@ -4705,8 +4704,7 @@ Action::OwningExprResult Sema::CreateBuiltinUnaryOp(SourceLocation OpLoc,
|
|||
ExprArg InputArg) {
|
||||
UnaryOperator::Opcode Opc = static_cast<UnaryOperator::Opcode>(OpcIn);
|
||||
|
||||
// FIXME: Input is modified below, but InputArg is not updated
|
||||
// appropriately.
|
||||
// FIXME: Input is modified below, but InputArg is not updated appropriately.
|
||||
Expr *Input = (Expr *)InputArg.get();
|
||||
QualType resultType;
|
||||
switch (Opc) {
|
||||
|
|
|
@ -813,9 +813,9 @@ Sema::PerformImplicitConversion(Expr *&From, QualType ToType,
|
|||
break;
|
||||
|
||||
case ImplicitConversionSequence::UserDefinedConversion:
|
||||
// FIXME: This is, of course, wrong. We'll need to actually call
|
||||
// the constructor or conversion operator, and then cope with the
|
||||
// standard conversions.
|
||||
// FIXME: This is, of course, wrong. We'll need to actually call the
|
||||
// constructor or conversion operator, and then cope with the standard
|
||||
// conversions.
|
||||
ImpCastExprToType(From, ToType.getNonReferenceType(),
|
||||
ToType->isLValueReferenceType());
|
||||
return false;
|
||||
|
@ -842,16 +842,14 @@ bool
|
|||
Sema::PerformImplicitConversion(Expr *&From, QualType ToType,
|
||||
const StandardConversionSequence& SCS,
|
||||
const char *Flavor) {
|
||||
// Overall FIXME: we are recomputing too many types here and doing
|
||||
// far too much extra work. What this means is that we need to keep
|
||||
// track of more information that is computed when we try the
|
||||
// implicit conversion initially, so that we don't need to recompute
|
||||
// anything here.
|
||||
// Overall FIXME: we are recomputing too many types here and doing far too
|
||||
// much extra work. What this means is that we need to keep track of more
|
||||
// information that is computed when we try the implicit conversion initially,
|
||||
// so that we don't need to recompute anything here.
|
||||
QualType FromType = From->getType();
|
||||
|
||||
if (SCS.CopyConstructor) {
|
||||
// FIXME: Create a temporary object by calling the copy
|
||||
// constructor.
|
||||
// FIXME: Create a temporary object by calling the copy constructor.
|
||||
ImpCastExprToType(From, ToType.getNonReferenceType(),
|
||||
ToType->isLValueReferenceType());
|
||||
return false;
|
||||
|
@ -946,8 +944,8 @@ Sema::PerformImplicitConversion(Expr *&From, QualType ToType,
|
|||
break;
|
||||
|
||||
case ICK_Qualification:
|
||||
// FIXME: Not sure about lvalue vs rvalue here in the presence of
|
||||
// rvalue references.
|
||||
// FIXME: Not sure about lvalue vs rvalue here in the presence of rvalue
|
||||
// references.
|
||||
ImpCastExprToType(From, ToType.getNonReferenceType(),
|
||||
ToType->isLValueReferenceType());
|
||||
break;
|
||||
|
@ -966,9 +964,9 @@ Sema::OwningExprResult Sema::ActOnUnaryTypeTrait(UnaryTypeTrait OTT,
|
|||
TypeTy *Ty,
|
||||
SourceLocation RParen) {
|
||||
// FIXME: Some of the type traits have requirements. Interestingly, only the
|
||||
// __is_base_of requirement is explicitly stated to be diagnosed. Indeed,
|
||||
// G++ accepts __is_pod(Incomplete) without complaints, and claims that the
|
||||
// type is indeed a POD.
|
||||
// __is_base_of requirement is explicitly stated to be diagnosed. Indeed, G++
|
||||
// accepts __is_pod(Incomplete) without complaints, and claims that the type
|
||||
// is indeed a POD.
|
||||
|
||||
// There is no point in eagerly computing the value. The traits are designed
|
||||
// to be used from type trait templates, so Ty will be a template parameter
|
||||
|
@ -1015,8 +1013,8 @@ QualType Sema::CheckPointerToMemberOperands(
|
|||
Context.getCanonicalType(LType).getUnqualifiedType()) {
|
||||
BasePaths Paths(/*FindAmbiguities=*/true, /*RecordPaths=*/false,
|
||||
/*DetectVirtual=*/false);
|
||||
// FIXME: Would it be useful to print full ambiguity paths,
|
||||
// or is that overkill?
|
||||
// FIXME: Would it be useful to print full ambiguity paths, or is that
|
||||
// overkill?
|
||||
if (!IsDerivedFrom(LType, Class, Paths) ||
|
||||
Paths.isAmbiguous(Context.getCanonicalType(Class))) {
|
||||
Diag(Loc, diag::err_bad_memptr_lhs) << OpSpelling
|
||||
|
@ -1032,9 +1030,9 @@ QualType Sema::CheckPointerToMemberOperands(
|
|||
// in accordance with 5.5p5 and 5.2.5.
|
||||
// FIXME: This returns a dereferenced member function pointer as a normal
|
||||
// function type. However, the only operation valid on such functions is
|
||||
// calling them. There's also a GCC extension to get a function pointer to
|
||||
// the thing, which is another complication, because this type - unlike the
|
||||
// type that is the result of this expression - takes the class as the first
|
||||
// calling them. There's also a GCC extension to get a function pointer to the
|
||||
// thing, which is another complication, because this type - unlike the type
|
||||
// that is the result of this expression - takes the class as the first
|
||||
// argument.
|
||||
// We probably need a "MemberFunctionClosureType" or something like that.
|
||||
QualType Result = MemPtr->getPointeeType();
|
||||
|
@ -1162,8 +1160,8 @@ static bool FindConditionalOverload(Sema &Self, Expr *&LHS, Expr *&RHS,
|
|||
Self.Diag(Loc, diag::err_conditional_ambiguous_ovl)
|
||||
<< LHS->getType() << RHS->getType()
|
||||
<< LHS->getSourceRange() << RHS->getSourceRange();
|
||||
// FIXME: Print the possible common types by printing the return types
|
||||
// of the viable candidates.
|
||||
// FIXME: Print the possible common types by printing the return types of
|
||||
// the viable candidates.
|
||||
break;
|
||||
|
||||
case Sema::OR_Deleted:
|
||||
|
@ -1210,8 +1208,8 @@ static bool ConvertForConditional(Sema &Self, Expr *&E,
|
|||
/// extension. In this case, LHS == Cond. (But they're not aliases.)
|
||||
QualType Sema::CXXCheckConditionalOperands(Expr *&Cond, Expr *&LHS, Expr *&RHS,
|
||||
SourceLocation QuestionLoc) {
|
||||
// FIXME: Handle C99's complex types, vector types, block pointers and
|
||||
// Obj-C++ interface pointers.
|
||||
// FIXME: Handle C99's complex types, vector types, block pointers and Obj-C++
|
||||
// interface pointers.
|
||||
|
||||
// C++0x 5.16p1
|
||||
// The first expression is contextually converted to bool.
|
||||
|
|
|
@ -444,12 +444,12 @@ Sema::ExprResult Sema::ActOnClassMessage(
|
|||
lbrac, rbrac, returnType))
|
||||
return true;
|
||||
|
||||
// If we have the ObjCInterfaceDecl* for the class that is receiving
|
||||
// the message, use that to construct the ObjCMessageExpr. Otherwise
|
||||
// pass on the IdentifierInfo* for the class.
|
||||
// FIXME: need to do a better job handling 'super' usage within a class
|
||||
// For now, we simply pass the "super" identifier through (which isn't
|
||||
// consistent with instance methods.
|
||||
// If we have the ObjCInterfaceDecl* for the class that is receiving the
|
||||
// message, use that to construct the ObjCMessageExpr. Otherwise pass on the
|
||||
// IdentifierInfo* for the class.
|
||||
// FIXME: need to do a better job handling 'super' usage within a class. For
|
||||
// now, we simply pass the "super" identifier through (which isn't consistent
|
||||
// with instance methods.
|
||||
if (isSuper)
|
||||
return new (Context) ObjCMessageExpr(receiverName, Sel, returnType, Method,
|
||||
lbrac, rbrac, ArgExprs, NumArgs);
|
||||
|
@ -580,7 +580,7 @@ Sema::ExprResult Sema::ActOnInstanceMessage(ExprTy *receiver, Selector Sel,
|
|||
|
||||
ClassDecl = OCIType->getDecl();
|
||||
// FIXME: consider using LookupInstanceMethodInGlobalPool, since it will be
|
||||
// faster than the following method (which can do *many* linear searches).
|
||||
// faster than the following method (which can do *many* linear searches).
|
||||
// The idea is to add class info to InstanceMethodPool.
|
||||
Method = ClassDecl->lookupInstanceMethod(Context, Sel);
|
||||
|
||||
|
@ -668,12 +668,12 @@ static bool ClassImplementsProtocol(ObjCProtocolDecl *lProto,
|
|||
E = Protocols.end(); PI != E; ++PI) {
|
||||
if (ProtocolCompatibleWithProtocol(lProto, *PI))
|
||||
return true;
|
||||
// This is dubious and is added to be compatible with gcc.
|
||||
// In gcc, it is also allowed assigning a protocol-qualified 'id'
|
||||
// type to a LHS object when protocol in qualified LHS is in list
|
||||
// of protocols in the rhs 'id' object. This IMO, should be a bug.
|
||||
// FIXME: Treat this as an extension, and flag this as an error when
|
||||
// GCC extensions are not enabled.
|
||||
// This is dubious and is added to be compatible with gcc. In gcc, it is
|
||||
// also allowed assigning a protocol-qualified 'id' type to a LHS object
|
||||
// when protocol in qualified LHS is in list of protocols in the rhs 'id'
|
||||
// object. This IMO, should be a bug.
|
||||
// FIXME: Treat this as an extension, and flag this as an error when GCC
|
||||
// extensions are not enabled.
|
||||
if (RHSIsQualifiedID && ProtocolCompatibleWithProtocol(*PI, lProto))
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -174,8 +174,8 @@ bool Sema::CheckInitializerTypes(Expr *&Init, QualType &DeclType,
|
|||
// expression as its argument; if the function is a
|
||||
// constructor, the call initializes a temporary of the
|
||||
// destination type.
|
||||
// FIXME: We're pretending to do copy elision here; return to
|
||||
// this when we have ASTs for such things.
|
||||
// FIXME: We're pretending to do copy elision here; return to this when we
|
||||
// have ASTs for such things.
|
||||
if (!PerformImplicitConversion(Init, DeclType, "initializing"))
|
||||
return false;
|
||||
|
||||
|
@ -349,10 +349,9 @@ void InitListChecker::FillInValueInitializations(InitListExpr *ILE) {
|
|||
return;
|
||||
}
|
||||
|
||||
// FIXME: If value-initialization involves calling a
|
||||
// constructor, should we make that call explicit in the
|
||||
// representation (even when it means extending the
|
||||
// initializer list)?
|
||||
// FIXME: If value-initialization involves calling a constructor, should
|
||||
// we make that call explicit in the representation (even when it means
|
||||
// extending the initializer list)?
|
||||
if (Init < NumInits && !hadError)
|
||||
ILE->setInit(Init,
|
||||
new (SemaRef.Context) ImplicitValueInitExpr(Field->getType()));
|
||||
|
@ -390,10 +389,9 @@ void InitListChecker::FillInValueInitializations(InitListExpr *ILE) {
|
|||
return;
|
||||
}
|
||||
|
||||
// FIXME: If value-initialization involves calling a
|
||||
// constructor, should we make that call explicit in the
|
||||
// representation (even when it means extending the
|
||||
// initializer list)?
|
||||
// FIXME: If value-initialization involves calling a constructor, should
|
||||
// we make that call explicit in the representation (even when it means
|
||||
// extending the initializer list)?
|
||||
if (Init < NumInits && !hadError)
|
||||
ILE->setInit(Init,
|
||||
new (SemaRef.Context) ImplicitValueInitExpr(ElementType));
|
||||
|
@ -761,10 +759,10 @@ void InitListChecker::CheckReferenceType(InitListExpr *IList, QualType DeclType,
|
|||
UpdateStructuredListElement(StructuredList, StructuredIndex, expr);
|
||||
++Index;
|
||||
} else {
|
||||
// FIXME: It would be wonderful if we could point at the actual
|
||||
// member. In general, it would be useful to pass location
|
||||
// information down the stack, so that we know the location (or
|
||||
// decl) of the "current object" being initialized.
|
||||
// FIXME: It would be wonderful if we could point at the actual member. In
|
||||
// general, it would be useful to pass location information down the stack,
|
||||
// so that we know the location (or decl) of the "current object" being
|
||||
// initialized.
|
||||
SemaRef.Diag(IList->getLocStart(),
|
||||
diag::err_init_reference_member_uninitialized)
|
||||
<< DeclType
|
||||
|
@ -1733,8 +1731,8 @@ bool Sema::CheckValueInitialization(QualType Type, SourceLocation Loc) {
|
|||
// called (and the initialization is ill-formed if T has no
|
||||
// accessible default constructor);
|
||||
if (ClassDecl->hasUserDeclaredConstructor())
|
||||
// FIXME: Eventually, we'll need to put the constructor decl
|
||||
// into the AST.
|
||||
// FIXME: Eventually, we'll need to put the constructor decl into the
|
||||
// AST.
|
||||
return PerformInitializationByConstructor(Type, 0, 0, Loc,
|
||||
SourceRange(Loc),
|
||||
DeclarationName(),
|
||||
|
@ -1747,8 +1745,8 @@ bool Sema::CheckValueInitialization(QualType Type, SourceLocation Loc) {
|
|||
// [...] A program that calls for default-initialization or
|
||||
// value-initialization of an entity of reference type is
|
||||
// ill-formed. [...]
|
||||
// FIXME: Once we have code that goes through this path, add an
|
||||
// actual diagnostic :)
|
||||
// FIXME: Once we have code that goes through this path, add an actual
|
||||
// diagnostic :)
|
||||
}
|
||||
|
||||
return false;
|
||||
|
|
|
@ -131,9 +131,9 @@ MaybeConstructOverloadSet(ASTContext &Context,
|
|||
OverloadedFunctionDecl *Ovl = 0;
|
||||
for (++Last; Last != IEnd && isa<FunctionDecl>(*Last); ++Last) {
|
||||
if (!Ovl) {
|
||||
// FIXME: We leak this overload set. Eventually, we want to
|
||||
// stop building the declarations for these overload sets, so
|
||||
// there will be nothing to leak.
|
||||
// FIXME: We leak this overload set. Eventually, we want to stop
|
||||
// building the declarations for these overload sets, so there will be
|
||||
// nothing to leak.
|
||||
Ovl = OverloadedFunctionDecl::Create(Context, (*I)->getDeclContext(),
|
||||
(*I)->getDeclName());
|
||||
Ovl->addOverload(cast<FunctionDecl>(*I));
|
||||
|
@ -677,12 +677,11 @@ Sema::CppLookupName(Scope *S, DeclarationName Name,
|
|||
if (DeclContext *Ctx = static_cast<DeclContext*>(S->getEntity())) {
|
||||
LookupResult R;
|
||||
// Perform member lookup into struct.
|
||||
// FIXME: In some cases, we know that every name that could be
|
||||
// found by this qualified name lookup will also be on the
|
||||
// identifier chain. For example, inside a class without any
|
||||
// base classes, we never need to perform qualified lookup
|
||||
// because all of the members are on top of the identifier
|
||||
// chain.
|
||||
// FIXME: In some cases, we know that every name that could be found by
|
||||
// this qualified name lookup will also be on the identifier chain. For
|
||||
// example, inside a class without any base classes, we never need to
|
||||
// perform qualified lookup because all of the members are on top of the
|
||||
// identifier chain.
|
||||
if (isa<RecordDecl>(Ctx)) {
|
||||
R = LookupQualifiedName(Ctx, Name, NameKind, RedeclarationOnly);
|
||||
if (R || RedeclarationOnly)
|
||||
|
@ -705,10 +704,9 @@ Sema::CppLookupName(Scope *S, DeclarationName Name,
|
|||
|
||||
// Collect UsingDirectiveDecls in all scopes, and recursively all
|
||||
// nominated namespaces by those using-directives.
|
||||
// UsingDirectives are pushed to heap, in common ancestor pointer
|
||||
// value order.
|
||||
// FIXME: Cache this sorted list in Scope structure, and DeclContext,
|
||||
// so we don't build it for each lookup!
|
||||
// UsingDirectives are pushed to heap, in common ancestor pointer value order.
|
||||
// FIXME: Cache this sorted list in Scope structure, and DeclContext, so we
|
||||
// don't build it for each lookup!
|
||||
UsingDirectivesTy UDirs;
|
||||
for (Scope *SC = Initial; SC; SC = SC->getParent())
|
||||
if (SC->getFlags() & Scope::DeclScope)
|
||||
|
|
|
@ -548,9 +548,9 @@ CheckStaticCast(Sema &Self, Expr *&SrcExpr, QualType DestType,
|
|||
}
|
||||
|
||||
// We tried everything. Everything! Nothing works! :-(
|
||||
// FIXME: Error reporting could be a lot better. Should store the reason
|
||||
// why every substep failed and, at the end, select the most specific and
|
||||
// report that.
|
||||
// FIXME: Error reporting could be a lot better. Should store the reason why
|
||||
// every substep failed and, at the end, select the most specific and report
|
||||
// that.
|
||||
Self.Diag(OpRange.getBegin(), diag::err_bad_cxx_cast_generic)
|
||||
<< "static_cast" << DestType << OrigSrcType
|
||||
<< OpRange;
|
||||
|
|
|
@ -745,8 +745,8 @@ bool Sema::IsIntegralPromotion(Expr *From, QualType FromType, QualType ToType)
|
|||
// the bit-field is larger yet, no integral promotion applies to
|
||||
// it. If the bit-field has an enumerated type, it is treated as any
|
||||
// other value of that type for promotion purposes (C++ 4.5p3).
|
||||
// FIXME: We should delay checking of bit-fields until we actually
|
||||
// perform the conversion.
|
||||
// FIXME: We should delay checking of bit-fields until we actually perform the
|
||||
// conversion.
|
||||
using llvm::APSInt;
|
||||
if (From)
|
||||
if (FieldDecl *MemberDecl = From->getBitField()) {
|
||||
|
@ -1141,8 +1141,8 @@ bool Sema::CheckPointerConversion(Expr *From, QualType ToType) {
|
|||
ToPointeeType = ToPtrType->getPointeeType();
|
||||
|
||||
// Objective-C++ conversions are always okay.
|
||||
// FIXME: We should have a different class of conversions for
|
||||
// the Objective-C++ implicit conversions.
|
||||
// FIXME: We should have a different class of conversions for the
|
||||
// Objective-C++ implicit conversions.
|
||||
if (Context.isObjCIdStructType(FromPointeeType) ||
|
||||
Context.isObjCIdStructType(ToPointeeType) ||
|
||||
Context.isObjCClassStructType(FromPointeeType) ||
|
||||
|
@ -2385,9 +2385,9 @@ void Sema::AddSurrogateCandidate(CXXConversionDecl *Conversion,
|
|||
}
|
||||
}
|
||||
|
||||
// FIXME: This will eventually be removed, once we've migrated all of
|
||||
// the operator overloading logic over to the scheme used by binary
|
||||
// operators, which works for template instantiation.
|
||||
// FIXME: This will eventually be removed, once we've migrated all of the
|
||||
// operator overloading logic over to the scheme used by binary operators, which
|
||||
// works for template instantiation.
|
||||
void Sema::AddOperatorCandidates(OverloadedOperatorKind Op, Scope *S,
|
||||
SourceLocation OpLoc,
|
||||
Expr **Args, unsigned NumArgs,
|
||||
|
@ -2580,8 +2580,8 @@ BuiltinCandidateTypeSet::AddPointerWithMoreQualifiedTypeVariants(QualType Ty) {
|
|||
QualType PointeeTy = PointerTy->getPointeeType();
|
||||
// FIXME: Optimize this so that we don't keep trying to add the same types.
|
||||
|
||||
// FIXME: Do we have to add CVR qualifiers at *all* levels to deal
|
||||
// with all pointer conversions that don't cast away constness?
|
||||
// FIXME: Do we have to add CVR qualifiers at *all* levels to deal with all
|
||||
// pointer conversions that don't cast away constness?
|
||||
if (!PointeeTy.isConstQualified())
|
||||
AddPointerWithMoreQualifiedTypeVariants
|
||||
(Context.getPointerType(PointeeTy.withConst()));
|
||||
|
@ -3546,8 +3546,8 @@ Sema::PrintOverloadCandidates(OverloadCandidateSet& CandidateSet,
|
|||
<< FnType;
|
||||
} else {
|
||||
// FIXME: We need to get the identifier in here
|
||||
// FIXME: Do we want the error message to point at the
|
||||
// operator? (built-ins won't have a location)
|
||||
// FIXME: Do we want the error message to point at the operator?
|
||||
// (built-ins won't have a location)
|
||||
QualType FnType
|
||||
= Context.getFunctionType(Cand->BuiltinTypes.ResultTy,
|
||||
Cand->BuiltinTypes.ParamTypes,
|
||||
|
|
|
@ -380,9 +380,9 @@ Sema::ActOnFinishSwitchStmt(SourceLocation SwitchLoc, StmtArg Switch,
|
|||
Diag(TheDefaultStmt->getDefaultLoc(), diag::note_duplicate_case_prev);
|
||||
|
||||
// FIXME: Remove the default statement from the switch block so that
|
||||
// we'll return a valid AST. This requires recursing down the
|
||||
// AST and finding it, not something we are set up to do right now. For
|
||||
// now, just lop the entire switch stmt out of the AST.
|
||||
// we'll return a valid AST. This requires recursing down the AST and
|
||||
// finding it, not something we are set up to do right now. For now,
|
||||
// just lop the entire switch stmt out of the AST.
|
||||
CaseListIsErroneous = true;
|
||||
}
|
||||
TheDefaultStmt = DS;
|
||||
|
@ -436,8 +436,8 @@ Sema::ActOnFinishSwitchStmt(SourceLocation SwitchLoc, StmtArg Switch,
|
|||
diag::err_duplicate_case) << CaseVals[i].first.toString(10);
|
||||
Diag(CaseVals[i].second->getLHS()->getLocStart(),
|
||||
diag::note_duplicate_case_prev);
|
||||
// FIXME: We really want to remove the bogus case stmt from
|
||||
// the substmt, but we have no way to do this right now.
|
||||
// FIXME: We really want to remove the bogus case stmt from the
|
||||
// substmt, but we have no way to do this right now.
|
||||
CaseListIsErroneous = true;
|
||||
}
|
||||
}
|
||||
|
@ -522,17 +522,16 @@ Sema::ActOnFinishSwitchStmt(SourceLocation SwitchLoc, StmtArg Switch,
|
|||
<< OverlapVal.toString(10);
|
||||
Diag(OverlapStmt->getLHS()->getLocStart(),
|
||||
diag::note_duplicate_case_prev);
|
||||
// FIXME: We really want to remove the bogus case stmt from
|
||||
// the substmt, but we have no way to do this right now.
|
||||
// FIXME: We really want to remove the bogus case stmt from the
|
||||
// substmt, but we have no way to do this right now.
|
||||
CaseListIsErroneous = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// FIXME: If the case list was broken is some way, we don't have a
|
||||
// good system to patch it up. Instead, just return the whole
|
||||
// substmt as broken.
|
||||
// FIXME: If the case list was broken is some way, we don't have a good system
|
||||
// to patch it up. Instead, just return the whole substmt as broken.
|
||||
if (CaseListIsErroneous)
|
||||
return StmtError();
|
||||
|
||||
|
|
|
@ -436,8 +436,7 @@ Sema::ActOnClassTemplate(Scope *S, unsigned TagSpec, TagKind TK,
|
|||
if (SS.isNotEmpty() && !SS.isInvalid()) {
|
||||
SemanticContext = computeDeclContext(SS);
|
||||
|
||||
// FIXME: need to match up several levels of template parameter
|
||||
// lists here.
|
||||
// FIXME: need to match up several levels of template parameter lists here.
|
||||
}
|
||||
|
||||
// FIXME: member templates!
|
||||
|
@ -668,9 +667,8 @@ bool Sema::CheckTemplateParameterList(TemplateParameterList *NewParams,
|
|||
// Merge the default argument from the old declaration to the
|
||||
// new declaration.
|
||||
SawDefaultArgument = true;
|
||||
// FIXME: We need to create a new kind of "default argument"
|
||||
// expression that points to a previous template template
|
||||
// parameter.
|
||||
// FIXME: We need to create a new kind of "default argument" expression
|
||||
// that points to a previous template template parameter.
|
||||
NewTemplateParm->setDefaultArgument(
|
||||
OldTemplateParm->getDefaultArgument());
|
||||
PreviousDefaultArgLoc = OldTemplateParm->getDefaultArgumentLoc();
|
||||
|
@ -1802,12 +1800,11 @@ Sema::TemplateParameterListsAreEqual(TemplateParameterList *New,
|
|||
// Okay; all template type parameters are equivalent (since we
|
||||
// know we're at the same index).
|
||||
#if 0
|
||||
// FIXME: Enable this code in debug mode *after* we properly go
|
||||
// through and "instantiate" the template parameter lists of
|
||||
// template template parameters. It's only after this
|
||||
// instantiation that (1) any dependent types within the
|
||||
// template parameter list of the template template parameter
|
||||
// can be checked, and (2) the template type parameter depths
|
||||
// FIXME: Enable this code in debug mode *after* we properly go through
|
||||
// and "instantiate" the template parameter lists of template template
|
||||
// parameters. It's only after this instantiation that (1) any dependent
|
||||
// types within the template parameter list of the template template
|
||||
// parameter can be checked, and (2) the template type parameter depths
|
||||
// will match up.
|
||||
QualType OldParmType
|
||||
= Context.getTypeDeclType(cast<TemplateTypeParmDecl>(*OldParm));
|
||||
|
@ -1960,8 +1957,8 @@ Sema::CheckClassTemplateSpecializationScope(ClassTemplateDecl *ClassTemplate,
|
|||
// We have a previous declaration of this entity. Make sure that
|
||||
// this redeclaration (or definition) occurs in an enclosing namespace.
|
||||
if (!CurContext->Encloses(TemplateContext)) {
|
||||
// FIXME: In C++98, we would like to turn these errors into
|
||||
// warnings, dependent on a -Wc++0x flag.
|
||||
// FIXME: In C++98, we would like to turn these errors into warnings,
|
||||
// dependent on a -Wc++0x flag.
|
||||
bool SuppressedDiag = false;
|
||||
if (isa<TranslationUnitDecl>(TemplateContext)) {
|
||||
if (!ExplicitInstantiation || getLangOptions().CPlusPlus0x)
|
||||
|
@ -2117,8 +2114,8 @@ Sema::ActOnClassTemplateSpecialization(Scope *S, unsigned TagSpec, TagKind TK,
|
|||
// Check that this isn't a redefinition of this specialization.
|
||||
if (TK == TK_Definition) {
|
||||
if (RecordDecl *Def = Specialization->getDefinition(Context)) {
|
||||
// FIXME: Should also handle explicit specialization after
|
||||
// implicit instantiation with a special diagnostic.
|
||||
// FIXME: Should also handle explicit specialization after implicit
|
||||
// instantiation with a special diagnostic.
|
||||
SourceRange Range(TemplateNameLoc, RAngleLoc);
|
||||
Diag(TemplateNameLoc, diag::err_redefinition)
|
||||
<< Specialization << Range;
|
||||
|
@ -2389,8 +2386,8 @@ Sema::ActOnExplicitInstantiation(Scope *S, SourceLocation TemplateLoc,
|
|||
//
|
||||
// This is C++ DR 275.
|
||||
if (getLangOptions().CPlusPlus0x) {
|
||||
// FIXME: In C++98, we would like to turn these errors into
|
||||
// warnings, dependent on a -Wc++0x flag.
|
||||
// FIXME: In C++98, we would like to turn these errors into warnings,
|
||||
// dependent on a -Wc++0x flag.
|
||||
DeclContext *PatternContext
|
||||
= Pattern->getDeclContext()->getEnclosingNamespaceContext();
|
||||
if (!CurContext->Encloses(PatternContext)) {
|
||||
|
@ -2415,10 +2412,10 @@ Sema::ActOnExplicitInstantiation(Scope *S, SourceLocation TemplateLoc,
|
|||
getTemplateInstantiationArgs(Record));
|
||||
}
|
||||
|
||||
// FIXME: We don't have any representation for explicit
|
||||
// instantiations of member classes. Such a representation is not
|
||||
// needed for compilation, but it should be available for clients
|
||||
// that want to see all of the declarations in the source code.
|
||||
// FIXME: We don't have any representation for explicit instantiations of
|
||||
// member classes. Such a representation is not needed for compilation, but it
|
||||
// should be available for clients that want to see all of the declarations in
|
||||
// the source code.
|
||||
return TagD;
|
||||
}
|
||||
|
||||
|
|
|
@ -502,8 +502,7 @@ InstantiateTemplateSpecializationType(
|
|||
}
|
||||
}
|
||||
|
||||
// FIXME: We're missing the locations of the template name, '<', and
|
||||
// '>'.
|
||||
// FIXME: We're missing the locations of the template name, '<', and '>'.
|
||||
|
||||
TemplateName Name = SemaRef.InstantiateTemplateName(T->getTemplateName(),
|
||||
Loc,
|
||||
|
@ -752,9 +751,8 @@ Sema::InstantiateClass(SourceLocation PointOfInstantiation,
|
|||
Fields.push_back(DeclPtrTy::make(Field));
|
||||
} else {
|
||||
// FIXME: Eventually, a NULL return will mean that one of the
|
||||
// instantiations was a semantic disaster, and we'll want to set
|
||||
// Invalid = true. For now, we expect to skip some members that
|
||||
// we can't yet handle.
|
||||
// instantiations was a semantic disaster, and we'll want to set Invalid =
|
||||
// true. For now, we expect to skip some members that we can't yet handle.
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -790,12 +788,11 @@ Sema::InstantiateClassTemplateSpecialization(
|
|||
if (ClassTemplateSpec->getSpecializationKind() != TSK_Undeclared)
|
||||
return true;
|
||||
|
||||
// FIXME: Push this class template instantiation onto the
|
||||
// instantiation stack, checking for recursion that exceeds a
|
||||
// certain depth.
|
||||
// FIXME: Push this class template instantiation onto the instantiation stack,
|
||||
// checking for recursion that exceeds a certain depth.
|
||||
|
||||
// FIXME: Perform class template partial specialization to select
|
||||
// the best template.
|
||||
// FIXME: Perform class template partial specialization to select the best
|
||||
// template.
|
||||
ClassTemplateDecl *Template = ClassTemplateSpec->getSpecializedTemplate();
|
||||
|
||||
CXXRecordDecl *Pattern = Template->getTemplatedDecl();
|
||||
|
@ -977,9 +974,8 @@ Sema::InstantiateTemplateName(TemplateName Name, SourceLocation Loc,
|
|||
|
||||
|
||||
|
||||
// FIXME: Even if we're referring to a Decl that isn't a template
|
||||
// template parameter, we may need to instantiate the outer contexts
|
||||
// of that Decl. However, this won't be needed until we implement
|
||||
// member templates.
|
||||
// FIXME: Even if we're referring to a Decl that isn't a template template
|
||||
// parameter, we may need to instantiate the outer contexts of that
|
||||
// Decl. However, this won't be needed until we implement member templates.
|
||||
return Name;
|
||||
}
|
||||
|
|
|
@ -32,9 +32,9 @@ namespace {
|
|||
const TemplateArgumentList &TemplateArgs)
|
||||
: SemaRef(SemaRef), Owner(Owner), TemplateArgs(TemplateArgs) { }
|
||||
|
||||
// FIXME: Once we get closer to completion, replace these
|
||||
// manually-written declarations with automatically-generated ones
|
||||
// from clang/AST/DeclNodes.def.
|
||||
// FIXME: Once we get closer to completion, replace these manually-written
|
||||
// declarations with automatically-generated ones from
|
||||
// clang/AST/DeclNodes.def.
|
||||
Decl *VisitTranslationUnitDecl(TranslationUnitDecl *D);
|
||||
Decl *VisitNamespaceDecl(NamespaceDecl *D);
|
||||
Decl *VisitTypedefDecl(TypedefDecl *D);
|
||||
|
@ -116,8 +116,8 @@ Decl *TemplateDeclInstantiator::VisitVarDecl(VarDecl *D) {
|
|||
Var->setCXXDirectInitializer(D->hasCXXDirectInitializer());
|
||||
Var->setDeclaredInCondition(D->isDeclaredInCondition());
|
||||
|
||||
// FIXME: In theory, we could have a previous declaration for
|
||||
// variables that are not static data members.
|
||||
// FIXME: In theory, we could have a previous declaration for variables that
|
||||
// are not static data members.
|
||||
bool Redeclaration = false;
|
||||
SemaRef.CheckVariableDeclaration(Var, 0, Redeclaration);
|
||||
Owner->addDecl(SemaRef.Context, Var);
|
||||
|
|
|
@ -33,9 +33,9 @@ namespace {
|
|||
const TemplateArgumentList &TemplateArgs)
|
||||
: SemaRef(SemaRef), TemplateArgs(TemplateArgs) { }
|
||||
|
||||
// FIXME: Once we get closer to completion, replace these
|
||||
// manually-written declarations with automatically-generated ones
|
||||
// from clang/AST/StmtNodes.def.
|
||||
// FIXME: Once we get closer to completion, replace these manually-written
|
||||
// declarations with automatically-generated ones from
|
||||
// clang/AST/StmtNodes.def.
|
||||
OwningExprResult VisitIntegerLiteral(IntegerLiteral *E);
|
||||
OwningExprResult VisitDeclRefExpr(DeclRefExpr *E);
|
||||
OwningExprResult VisitParenExpr(ParenExpr *E);
|
||||
|
@ -247,8 +247,8 @@ TemplateExprInstantiator::VisitCXXOperatorCallExpr(CXXOperatorCallExpr *E) {
|
|||
Functions, move(First));
|
||||
}
|
||||
|
||||
// FIXME: This would be far less ugly if CreateOverloadedBinOp took
|
||||
// in ExprArg arguments!
|
||||
// FIXME: This would be far less ugly if CreateOverloadedBinOp took in ExprArg
|
||||
// arguments!
|
||||
BinaryOperator::Opcode Opc =
|
||||
BinaryOperator::getOverloadedOpcode(E->getOperator());
|
||||
OwningExprResult Result
|
||||
|
|
|
@ -33,9 +33,9 @@ namespace {
|
|||
const TemplateArgumentList &TemplateArgs)
|
||||
: SemaRef(SemaRef), TemplateArgs(TemplateArgs) { }
|
||||
|
||||
// FIXME: Once we get closer to completion, replace these
|
||||
// manually-written declarations with automatically-generated ones
|
||||
// from clang/AST/StmtNodes.def.
|
||||
// FIXME: Once we get closer to completion, replace these manually-written
|
||||
// declarations with automatically-generated ones from
|
||||
// clang/AST/StmtNodes.def.
|
||||
OwningStmtResult VisitDeclStmt(DeclStmt *S);
|
||||
OwningStmtResult VisitNullStmt(NullStmt *S);
|
||||
OwningStmtResult VisitCompoundStmt(CompoundStmt *S);
|
||||
|
@ -140,8 +140,8 @@ TemplateStmtInstantiator::VisitReturnStmt(ReturnStmt *S) {
|
|||
|
||||
Sema::OwningStmtResult
|
||||
TemplateStmtInstantiator::VisitCompoundStmt(CompoundStmt *S) {
|
||||
// FIXME: We need an *easy* RAII way to delete these statements if
|
||||
// something goes wrong.
|
||||
// FIXME: We need an *easy* RAII way to delete these statements if something
|
||||
// goes wrong.
|
||||
llvm::SmallVector<Stmt *, 16> Statements;
|
||||
|
||||
for (CompoundStmt::body_iterator B = S->body_begin(), BEnd = S->body_end();
|
||||
|
|
|
@ -128,10 +128,9 @@ QualType Sema::ConvertDeclSpecToType(const DeclSpec &DS,
|
|||
Diag(DeclLoc, diag::warn_missing_type_specifier)
|
||||
<< DS.getSourceRange();
|
||||
|
||||
// FIXME: If we could guarantee that the result would be
|
||||
// well-formed, it would be useful to have a code insertion hint
|
||||
// here. However, after emitting this warning/error, we often
|
||||
// emit other errors.
|
||||
// FIXME: If we could guarantee that the result would be well-formed, it
|
||||
// would be useful to have a code insertion hint here. However, after
|
||||
// emitting this warning/error, we often emit other errors.
|
||||
}
|
||||
|
||||
// FALL THROUGH.
|
||||
|
@ -191,8 +190,8 @@ QualType Sema::ConvertDeclSpecToType(const DeclSpec &DS,
|
|||
Result = QualType::getFromOpaquePtr(DS.getTypeRep());
|
||||
|
||||
if (DeclSpec::ProtocolQualifierListTy PQ = DS.getProtocolQualifiers()) {
|
||||
// FIXME: Adding a TST_objcInterface clause doesn't seem ideal, so
|
||||
// we have this "hack" for now...
|
||||
// FIXME: Adding a TST_objcInterface clause doesn't seem ideal, so we have
|
||||
// this "hack" for now...
|
||||
if (const ObjCInterfaceType *Interface = Result->getAsObjCInterfaceType())
|
||||
Result = Context.getObjCQualifiedInterfaceType(Interface->getDecl(),
|
||||
(ObjCProtocolDecl**)PQ,
|
||||
|
|
Загрузка…
Ссылка в новой задаче