ruiu added inline comments.
================ Comment at: lib/Sema/SemaInit.cpp:875 if (!VerifyOnly) { StructuredSubobjectInitList->setType(T); ---------------- Is it intentional that you run the new code only when !VerifyOnly? ================ Comment at: lib/Sema/SemaInit.cpp:890-891 if (T->isArrayType() || T->isRecordType()) { + SourceLocation SpellingLoc = StructuredSubobjectInitList->getLocStart(); + SpellingLoc = SemaRef.getSourceManager().getSpellingLoc(SpellingLoc); + if (SpellingLoc.isValid() && ---------------- This piece of code seems a bit puzzling as you initialize a variable to some value and immediately re-assign to some other value. It's better to initialize it only once. SourceLocation SpellingLoc = SemaRef.getSourceManager().getSpellingLoc( StructuredSubobjectInitList->getLocStart()); https://reviews.llvm.org/D32646 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits