rjmccall added inline comments.
================
Comment at: lib/Sema/SemaCast.cpp:125
+ assert(Self.getLangOpts().ObjCAutoRefCount ||
+ Self.getLangOpts().ObjCWeak);
----------------
Unlike the other patches, we do clearly need to be checking the language
options in places like this. Still, it's a shame to repeat the same condition
in a million places.
I think the right thing to do here is to add a helper method to LangOpts:
/// Returns true if any types in the program might have non-trivial lifetime
qualifiers.
bool allowsNonTrivialObjCLifetimeQualifiers() const {
return ObjCAutoRefCount || ObjCWeak;
}
https://reviews.llvm.org/D31006
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits