ahatanak added inline comments.
================ Comment at: lib/Sema/SemaExprObjC.cpp:3358 var && - var->getStorageClass() == SC_Extern && + !var->isThisDeclarationADefinition() && var->getType().isConstQualified()) { ---------------- rjmccall wrote: > Hmm. Come to think of it, I wonder if we actually care whether the variable > has a definition, given that it's const. > > Well, we can consider that later. I agree that this change is good. If we don't care whether the variable is a definition, it's possible to check whether the variable declaration is directly contained in a language linkage instead (using a function like isSingleLineLanguageLinkage in lib/AST/Decl.cpp). ================ Comment at: test/SemaObjCXX/arc-bridged-cast.mm:59 +extern "C" const CFAnnotatedObjectRef r2; +extern "C" const CFAnnotatedObjectRef r3 = 0; + ---------------- rjmccall wrote: > These examples are a little unfortunate because these values are known to be > null pointers. Changed the initializer to be the address of a __CFAnnotatedObject variable. https://reviews.llvm.org/D31673 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits