[cfe-commits] r71936 - in /cfe/trunk/lib/Sema: SemaDeclAttr.cpp SemaDeclCXX.cpp SemaDeclObjC.cpp SemaExpr.cpp SemaExprCXX.cpp SemaExprObjC.cpp SemaInit.cpp SemaLookup.cpp SemaNamedCast.cpp SemaOverload.cpp SemaStmt.cpp SemaTemplate.cpp SemaTemplateInstantiate.cpp SemaTemplateInstantiateDecl.cpp SemaTemplateInstantiateExpr.cpp SemaTemplateInstantiateStmt.cpp SemaType.cpp
Mike Stump
mrs at apple.com
Sat May 16 00:39:56 PDT 2009
Author: mrs
Date: Sat May 16 02:39:55 2009
New Revision: 71936
URL: http://llvm.org/viewvc/llvm-project?rev=71936&view=rev
Log:
Reflow some comments.
Modified:
cfe/trunk/lib/Sema/SemaDeclAttr.cpp
cfe/trunk/lib/Sema/SemaDeclCXX.cpp
cfe/trunk/lib/Sema/SemaDeclObjC.cpp
cfe/trunk/lib/Sema/SemaExpr.cpp
cfe/trunk/lib/Sema/SemaExprCXX.cpp
cfe/trunk/lib/Sema/SemaExprObjC.cpp
cfe/trunk/lib/Sema/SemaInit.cpp
cfe/trunk/lib/Sema/SemaLookup.cpp
cfe/trunk/lib/Sema/SemaNamedCast.cpp
cfe/trunk/lib/Sema/SemaOverload.cpp
cfe/trunk/lib/Sema/SemaStmt.cpp
cfe/trunk/lib/Sema/SemaTemplate.cpp
cfe/trunk/lib/Sema/SemaTemplateInstantiate.cpp
cfe/trunk/lib/Sema/SemaTemplateInstantiateDecl.cpp
cfe/trunk/lib/Sema/SemaTemplateInstantiateExpr.cpp
cfe/trunk/lib/Sema/SemaTemplateInstantiateStmt.cpp
cfe/trunk/lib/Sema/SemaType.cpp
Modified: cfe/trunk/lib/Sema/SemaDeclAttr.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaDeclAttr.cpp?rev=71936&r1=71935&r2=71936&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaDeclAttr.cpp (original)
+++ cfe/trunk/lib/Sema/SemaDeclAttr.cpp Sat May 16 02:39:55 2009
@@ -1152,19 +1152,17 @@
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 @@
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;
Modified: cfe/trunk/lib/Sema/SemaDeclCXX.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaDeclCXX.cpp?rev=71936&r1=71935&r2=71936&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaDeclCXX.cpp (original)
+++ cfe/trunk/lib/Sema/SemaDeclCXX.cpp Sat May 16 02:39:55 2009
@@ -696,8 +696,8 @@
}
// 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 @@
// 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 @@
// 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 @@
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 @@
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 @@
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 @@
// 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 @@
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();
Modified: cfe/trunk/lib/Sema/SemaDeclObjC.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaDeclObjC.cpp?rev=71936&r1=71935&r2=71936&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaDeclObjC.cpp (original)
+++ cfe/trunk/lib/Sema/SemaDeclObjC.cpp Sat May 16 02:39:55 2009
@@ -667,8 +667,8 @@
// 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 @@
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 @@
// 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
Modified: cfe/trunk/lib/Sema/SemaExpr.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaExpr.cpp?rev=71936&r1=71935&r2=71936&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaExpr.cpp (original)
+++ cfe/trunk/lib/Sema/SemaExpr.cpp Sat May 16 02:39:55 2009
@@ -101,9 +101,8 @@
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 @@
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 @@
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 @@
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 @@
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 @@
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 @@
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 @@
// 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 @@
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) {
Modified: cfe/trunk/lib/Sema/SemaExprCXX.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaExprCXX.cpp?rev=71936&r1=71935&r2=71936&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaExprCXX.cpp (original)
+++ cfe/trunk/lib/Sema/SemaExprCXX.cpp Sat May 16 02:39:55 2009
@@ -813,9 +813,9 @@
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 @@
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 @@
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 @@
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 @@
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 @@
// 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 @@
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 @@
/// 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.
Modified: cfe/trunk/lib/Sema/SemaExprObjC.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaExprObjC.cpp?rev=71936&r1=71935&r2=71936&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaExprObjC.cpp (original)
+++ cfe/trunk/lib/Sema/SemaExprObjC.cpp Sat May 16 02:39:55 2009
@@ -444,12 +444,12 @@
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 @@
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 @@
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;
}
Modified: cfe/trunk/lib/Sema/SemaInit.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaInit.cpp?rev=71936&r1=71935&r2=71936&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaInit.cpp (original)
+++ cfe/trunk/lib/Sema/SemaInit.cpp Sat May 16 02:39:55 2009
@@ -174,8 +174,8 @@
// 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 @@
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 @@
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 @@
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 @@
// 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 @@
// [...] 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;
Modified: cfe/trunk/lib/Sema/SemaLookup.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaLookup.cpp?rev=71936&r1=71935&r2=71936&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaLookup.cpp (original)
+++ cfe/trunk/lib/Sema/SemaLookup.cpp Sat May 16 02:39:55 2009
@@ -131,9 +131,9 @@
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 @@
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 @@
// 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)
Modified: cfe/trunk/lib/Sema/SemaNamedCast.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaNamedCast.cpp?rev=71936&r1=71935&r2=71936&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaNamedCast.cpp (original)
+++ cfe/trunk/lib/Sema/SemaNamedCast.cpp Sat May 16 02:39:55 2009
@@ -548,9 +548,9 @@
}
// 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;
Modified: cfe/trunk/lib/Sema/SemaOverload.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaOverload.cpp?rev=71936&r1=71935&r2=71936&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaOverload.cpp (original)
+++ cfe/trunk/lib/Sema/SemaOverload.cpp Sat May 16 02:39:55 2009
@@ -745,8 +745,8 @@
// 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 @@
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 @@
}
}
-// 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 @@
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 @@
<< 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,
Modified: cfe/trunk/lib/Sema/SemaStmt.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaStmt.cpp?rev=71936&r1=71935&r2=71936&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaStmt.cpp (original)
+++ cfe/trunk/lib/Sema/SemaStmt.cpp Sat May 16 02:39:55 2009
@@ -380,9 +380,9 @@
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 @@
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 @@
<< 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();
Modified: cfe/trunk/lib/Sema/SemaTemplate.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaTemplate.cpp?rev=71936&r1=71935&r2=71936&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaTemplate.cpp (original)
+++ cfe/trunk/lib/Sema/SemaTemplate.cpp Sat May 16 02:39:55 2009
@@ -436,8 +436,7 @@
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 @@
// 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 @@
// 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 @@
// 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 @@
// 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 @@
//
// 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 @@
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;
}
Modified: cfe/trunk/lib/Sema/SemaTemplateInstantiate.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaTemplateInstantiate.cpp?rev=71936&r1=71935&r2=71936&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaTemplateInstantiate.cpp (original)
+++ cfe/trunk/lib/Sema/SemaTemplateInstantiate.cpp Sat May 16 02:39:55 2009
@@ -502,8 +502,7 @@
}
}
- // 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 @@
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 @@
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 @@
- // 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;
}
Modified: cfe/trunk/lib/Sema/SemaTemplateInstantiateDecl.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaTemplateInstantiateDecl.cpp?rev=71936&r1=71935&r2=71936&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaTemplateInstantiateDecl.cpp (original)
+++ cfe/trunk/lib/Sema/SemaTemplateInstantiateDecl.cpp Sat May 16 02:39:55 2009
@@ -32,9 +32,9 @@
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 @@
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);
Modified: cfe/trunk/lib/Sema/SemaTemplateInstantiateExpr.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaTemplateInstantiateExpr.cpp?rev=71936&r1=71935&r2=71936&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaTemplateInstantiateExpr.cpp (original)
+++ cfe/trunk/lib/Sema/SemaTemplateInstantiateExpr.cpp Sat May 16 02:39:55 2009
@@ -33,9 +33,9 @@
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 @@
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
Modified: cfe/trunk/lib/Sema/SemaTemplateInstantiateStmt.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaTemplateInstantiateStmt.cpp?rev=71936&r1=71935&r2=71936&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaTemplateInstantiateStmt.cpp (original)
+++ cfe/trunk/lib/Sema/SemaTemplateInstantiateStmt.cpp Sat May 16 02:39:55 2009
@@ -33,9 +33,9 @@
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 @@
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();
Modified: cfe/trunk/lib/Sema/SemaType.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaType.cpp?rev=71936&r1=71935&r2=71936&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaType.cpp (original)
+++ cfe/trunk/lib/Sema/SemaType.cpp Sat May 16 02:39:55 2009
@@ -128,10 +128,9 @@
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 @@
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,
More information about the cfe-commits
mailing list