svenvh marked an inline comment as done. svenvh added inline comments.
================ Comment at: lib/Sema/SemaDecl.cpp:6085 + // space qualifier or with the const qualifier. + if (DC->isTranslationUnit() && + !(R.getAddressSpace() == LangAS::opencl_constant || ---------------- yaxunl wrote: > should be else if ? > > if the previous error already happens, it is unnecessary to do the next check Sure, I can do that, I am just not sure what the desirable behaviour is here? They are different errors, so with the current patch it emits both diagnostics (see the first test change). If we just want one diagnostic (the first one in that test case), I can change it to else if; please let me know if you prefer that. https://reviews.llvm.org/D32856 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits